rcbops / rpcdaemon

AMQP RPC Daemon
Apache License 2.0
2 stars 3 forks source link

RPCDaemon Crashes on Failure to Unschedule Network #11

Closed seancarlisle closed 9 years ago

seancarlisle commented 9 years ago

There are situations where the neutronclient.v2_0.client.remove_network_from_dhcp_agent() method will fail to unschedule a network. One such case is when an attempt is made to unschedule a non-hosted network from an agent that is detected as down. In RPCDaemon's DHCPAgent.handle() method, "on_fail" is specified and currently points to "self.warn()", an attribute that the DHCPAgent class does not possess. When the above situation is encountered, RPCDaemon crashes. As a consequence, no networks after the non-hosted network in the list are re-scheduled appropriately. In addition, this can cause RPCDaemon to crash before re-scheduling any routers, which leaves any instances on GRE networks unable to access the outside world until manual intervention re-schedules the router.

Line of the bug: https://github.com/rcbops/rpcdaemon/blob/master/rpcdaemon/plugins/dhcpagent.py#L99