Comment 24 for bug 1784579

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

Reviewed: https://review.openstack.org/626218
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4827cedbc56033c2ac3caf0d7998fca6aff997d6
Submitter: Zuul
Branch: stable/queens

commit 4827cedbc56033c2ac3caf0d7998fca6aff997d6
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.

    Change-Id: Ia963a093a1b26d90b4de2e8fc623031cf175aece
    Closes-Bug: #1784579
    (cherry picked from commit cdf8ba5acb7f65042af9c21fcbe1a126bd857ad0)
    (cherry picked from commit a890e3d624a84d8eb0306fab580e2cec33e26bc3)