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.
NOTE(mriedem): The compute manager conflicts are due to change
I2740ea14e0c4ecee0d91c7f3e401b2c29498d097 in Queens. The _LE()
marker has to be left intact for pep8 checks in Ocata. The
test_os_vif_util conflicts are due to not having change
Ic23effc05c901575f608f2b4c5ccd2b1fb3c2d5a nor change
I3f38954bc5cf7b1690182dc8af45078eea275aa4 in Ocata.
Change-Id: Ia963a093a1b26d90b4de2e8fc623031cf175aece
Closes-Bug: #1784579
(cherry picked from commit cdf8ba5acb7f65042af9c21fcbe1a126bd857ad0)
(cherry picked from commit a890e3d624a84d8eb0306fab580e2cec33e26bc3)
(cherry picked from commit 4827cedbc56033c2ac3caf0d7998fca6aff997d6)
(cherry picked from commit 254a19f0d326ae5d3b5890d0d5fc735a771fcc0b)
Reviewed: https:/ /review. openstack. org/626369 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d6491167a42 49bd6d57b8ba359 7c021332ee7420
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit d6491167a4249bd 6d57b8ba3597c02 1332ee7420
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.
Conflicts:
nova/ compute/ manager. py
nova/ tests/unit/ network/ test_os_ vif_util. py
NOTE(mriedem): The compute manager conflicts are due to change c4ecee0d91c7f3e 401b2c29498d097 in Queens. The _LE() os_vif_ util conflicts are due to not having change 901575f608f2b4c 5ccd2b1fb3c2d5a nor change cf7b1690182dc8a f45078eea275aa4 in Ocata.
I2740ea14e0
marker has to be left intact for pep8 checks in Ocata. The
test_
Ic23effc05c
I3f38954bc5
Change-Id: Ia963a093a1b26d 90b4de2e8fc6230 31cf175aece 42af9c21fcbe1a1 26bd857ad0) eb0306fab580e2c ec33e26bc3) 2ac3caf0d7998fc a6aff997d6) d3b5890d0d5fc73 5a771fcc0b)
Closes-Bug: #1784579
(cherry picked from commit cdf8ba5acb7f650
(cherry picked from commit a890e3d624a84d8
(cherry picked from commit 4827cedbc56033c
(cherry picked from commit 254a19f0d326ae5