Bug 1286829 - fedmsg-tail "hangs" when host cannot be resolved
fedmsg-tail "hangs" when host cannot be resolved
Product: Fedora
Classification: Fedora
Component: fedmsg (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ralph Bean
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-11-30 15:36 EST by Zbigniew Jędrzejewski-Szmek
Modified: 2016-03-17 11:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-17 10:59:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zbigniew Jędrzejewski-Szmek 2015-11-30 15:36:13 EST
Description of problem:
$ fedmsg-tail --pretty
[2015-11-30 15:21:42][    fedmsg WARNING] Couldn't resolve 'hub.fedoraproject.org'

If the host cannot be resolved, continuing doesn't seem to make much sense. Should exit with an error.
Comment 1 Ralph Bean 2016-03-17 10:55:46 EDT
Good idea, yes.
Comment 2 Ralph Bean 2016-03-17 10:59:43 EDT
Actually, on second thought - take a look at the code here:  https://github.com/fedora-infra/fedmsg/blob/develop/fedmsg/core.py#L359-L364

A fedmsg client can (and usually does) connect to many message producing endpoints.  For a Fedora end-user, you are typically only subscribed to one:  the Fedora Infrastructure outbound gateway at hub.fedoraproject.org:9940.  But you could also be subscribed to debian's endpoint, or others.  Internally in Fedora Infrastructure, our message consumers are connected to hundreds of message producing endpoints.

If *one* of those endpoints is not resolvable for some reason, should the consumer crash?  fedmsg's design suggests "no".  One of our main goals is to be able to fail graceful in the face of partial network outages, so things can continue to operate "as best they can".  That's why there's a warning there, and not an error.

Thanks for the report!  I'm going to close as NOTABUG.  Feel free to take it up on the upstream fedmsg issue tracker if you like and we can debate it more :)
Comment 3 Zbigniew Jędrzejewski-Szmek 2016-03-17 11:08:17 EDT
It could fail if *all* endpoints failed (in particular in this case all==one).

But the whole issue is a bit of an edge case, so I'm not going to open a bug upstream.

Note You need to log in before you can comment on or make changes to this bug.