Comment 31 for bug 1784579

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ocata)

Reviewed: https://review.openstack.org/626369
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d6491167a4249bd6d57b8ba3597c021332ee7420
Submitter: Zuul
Branch: stable/ocata

commit d6491167a4249bd6d57b8ba3597c021332ee7420
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 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.

    Conflicts:
          nova/compute/manager.py
          nova/tests/unit/network/test_os_vif_util.py

    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)