Handle binding_failed vif plug errors on compute restart
Like change Ia584dba66affb86787e3069df19bd17b89cb5c49 which
came before, is port binding fails and we have a "binding_failed"
vif type in the info cache, we'll fail to plug vifs for an
instance on compute restart which will prevent the service
from restarting. Before the os-vif conversion code, this was
handled with VirtualInterfacePlugException but the os-vif conversion
code fails in a different way by raising a generic NovaException
because the os-vif conversion utility doesn't handle a vif_type of
"binding_failed".
To resolve this and make the os-vif flow for binding_failed behave
the same as the legacy path, we implement a translation function
in os_vif_util for binding_failed which will make the plug_vifs
code raise VirtualInterfacePlugException which is what the
_init_instance code in ComputeManager is already handling.
Admittedly this isn't the smartest thing and doesn't attempt
to recover / fix the instance networking info, but it at least
gives a more clear indication of what's wrong and lets the
nova-compute service start up. A note is left in the
_init_instance error handling that we could potentially try
to heal binding_failed vifs in _heal_instance_info_cache, but
that would need to be done in a separate change since it's more
invasive.
Reviewed: https:/ /review. openstack. org/587498 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=cdf8ba5acb7 f65042af9c21fcb e1a126bd857ad0
Committed: https:/
Submitter: Zuul
Branch: master
commit cdf8ba5acb7f650 42af9c21fcbe1a1 26bd857ad0
Author: Matt Riedemann <email address hidden>
Date: Tue Jul 31 11:20:47 2018 -0400
Handle binding_failed vif plug errors on compute restart
Like change Ia584dba66affb8 6787e3069df19bd 17b89cb5c49 which ePlugException but the os-vif conversion failed" .
came before, is port binding fails and we have a "binding_failed"
vif type in the info cache, we'll fail to plug vifs for an
instance on compute restart which will prevent the service
from restarting. Before the os-vif conversion code, this was
handled with VirtualInterfac
code fails in a different way by raising a generic NovaException
because the os-vif conversion utility doesn't handle a vif_type of
"binding_
To resolve this and make the os-vif flow for binding_failed behave ePlugException which is what the
the same as the legacy path, we implement a translation function
in os_vif_util for binding_failed which will make the plug_vifs
code raise VirtualInterfac
_init_instance code in ComputeManager is already handling.
Admittedly this isn't the smartest thing and doesn't attempt info_cache, but
to recover / fix the instance networking info, but it at least
gives a more clear indication of what's wrong and lets the
nova-compute service start up. A note is left in the
_init_instance error handling that we could potentially try
to heal binding_failed vifs in _heal_instance_
that would need to be done in a separate change since it's more
invasive.
Change-Id: Ia963a093a1b26d 90b4de2e8fc6230 31cf175aece
Closes-Bug: #1784579