Red Hat Bugzilla – Bug 1286829
fedmsg-tail "hangs" when host cannot be resolved
Last modified: 2016-03-17 11:08:17 EDT
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.
Good idea, yes.
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 :)
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.