[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH - 2 alternatives] util: fix libvirtd startup failure due to netlink error



The two following patches fix the same problem (described in
https://bugzilla.redhat.com/show_bug.cgi?id=816465) in two alternate
ways - one by retrying the failing operation after a delay, the other by
using knowledge of how libnl works internally to artificially "reserve"
a particular address so libnl doesn't attempt to bind to it.

You might think that libnl is the right place to fix this bug.
Unfortunately, that isn't possible, because it would involve changing
libnl's API - currently libnl decides what address to use for future
binds of a netlink socket at the time nl_handle_alloc() is called, but
doesn't actually attempt to bind it. Later, during nl_connect(), it
calls bind() with the address it had earlier decided. It would be nice
if we could just retry the bind with a different address when the first
attempt failed, but libnl allows client applications to retrieve the
bind address *before nl_connect() is called*, so an application may have
already gotten the address prior to calling nl_connect(), and changing
it would render the applications information incorrect.

So the best we can do (for now at least) is work around the problem, and
these are two possible workarounds.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]