Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

change the listening port #207

Merged
merged 4 commits into from
Feb 2, 2017
Merged

change the listening port #207

merged 4 commits into from
Feb 2, 2017

Conversation

galdor
Copy link

@galdor galdor commented Jan 31, 2017

No description provided.

@galdor galdor force-pushed the nicolas/listening-port branch from 446fb5a to 911eb0a Compare January 31, 2017 12:49
r.Listen(addr)

legacyAddr := fmt.Sprintf("%s:%d", r.conf.ReceiverHost, legacyReceiverPort)
r.Listen(legacyAddr)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, if 7777 is already binded, here, the agent won't start, and the user has no real way to change the port and/or discard it. Technically, a customer installing this version of the agent for the first time would need to clear port 7777 whatever happens, while we would probably not use it for real. Maybe only log an error in that case? OTOH such an agent could silently run along with an old deprecated one.

@galdor galdor force-pushed the nicolas/listening-port branch from 911eb0a to 55de123 Compare January 31, 2017 13:11
@talwai
Copy link

talwai commented Jan 31, 2017

i'd like us to emit a metric or log something when we see requests come in on the legacy port. this gives us some idea of when we can yank the legacy listener altogether.

@galdor
Copy link
Author

galdor commented Feb 1, 2017

I can add a metric for this if you wish, but I'm not sure it's that useful. As long as the port 7777 is available, those who use it will continue to do so because there is no incentive not to. If you want to make people use the new port, you have to actively do it (i.e. mark the old one as deprecated for the next stable version, then remove it for the one after that).

@galdor galdor force-pushed the nicolas/listening-port branch from 55de123 to ea7819a Compare February 1, 2017 14:57
Nicolas Martyanoff added 4 commits February 2, 2017 11:35
panic() should not be used for errors whose cause is expected. For
example, if a configuration file cannot be loaded, we know what is
happening and why. Therefore the backtrace is useless and gives the
impression that the software is crashing, even though this is a
perfectly fine exit.
It's not that obvious that we ignore the entire file when there is
something wrong with it.
@galdor galdor force-pushed the nicolas/listening-port branch from ea7819a to b88cce2 Compare February 2, 2017 10:37
@galdor galdor merged commit 4cabe01 into master Feb 2, 2017
@galdor galdor deleted the nicolas/listening-port branch February 2, 2017 10:40
talwai pushed a commit that referenced this pull request Feb 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants