Comment 23 for bug 1523638

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/276519
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=96c67e22f9cba2ea0e7fb3ba2a63e4905e48c1a4
Submitter: Jenkins
Branch: master

commit 96c67e22f9cba2ea0e7fb3ba2a63e4905e48c1a4
Author: Kevin Benton <email address hidden>
Date: Thu Feb 4 13:49:42 2016 -0800

    Only ensure admin state on ports that exist

    The linux bridge agent was calling ensure_port_admin state
    unconditionally on ports in treat_devices_added_or_updated.
    This would cause it to throw an error on interfaces that
    didn't exist so it would restart the entire processing loop.

    If another port was being updated in the same loop before this
    one, that port would experience a port status life-cycle of
    DOWN->BUILD->ACTIVE->BUILD->ACTIVE
                       ^ <--- Exception in unrelated port causes cycle
                              to start over again.

    This causes the bug below because the first active transition will
    cause Nova to boot the VM. At this point tempest tests expect the
    ports that belong to the VM to be in the ACTIVE state so it filters
    Neutron port list calls with "status=ACTIVE". Therefore tempest would
    not get any ports back and assume there was some kind of error with
    the port and bail.

    This patch just makes sure the admin state call is skipped if the port
    doesn't exist and it includes a basic unit test to prevent a regression.

    Closes-Bug: #1523638
    Change-Id: I5330c6111cbb20bf45aec9ade7e30d34e8dd16ca