nic port ordering is not honored

Bug #1300325 reported by Sean Chandler
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Aaron Rosen

Bug Description

This bug was fixed by https://bugs.launchpad.net/nova/+bug/1064524 previously but broken by version 46922068ac167f492dd303efb359d0c649d69118.

Instead of iterating the already ordered port list, the new code iterates the list from neutron and the result is random ordering.

Tags: network
Revision history for this message
Aaron Rosen (arosen) wrote :

Are you sure? I was the one who changed this code and was aware of nic ordering. Trying to reproduce now.

tags: added: network
removed: neutron nova
Changed in nova:
assignee: nobody → Aaron Rosen (arosen)
Revision history for this message
Sean Chandler (seandchandler) wrote : Re: [Bug 1300325] Re: nic port ordering is not honored

Fairly sure but I'm open to being wrong definitely :)

I end up with random port orderings unless I do the following:

sean@virl-ucs-14:/opt/stack/nova/nova$ git diff
diff --git a/nova/network/neutronv2/api.py b/nova/network/neutronv2/api.py
index 629ab32..87fcf1c 100644
--- a/nova/network/neutronv2/api.py
+++ b/nova/network/neutronv2/api.py
@@ -1085,6 +1085,11 @@ class API(base.Base):
                 context, instance, networks, port_ids)
         nw_info = network_model.NetworkInfo()

+ _ensure_requested_network_ordering(
+ lambda x: x['id'],
+ current_neutron_ports,
+ port_ids)
+
         for current_neutron_port in current_neutron_ports:
             if current_neutron_port['id'] in port_ids:
                 vif_active = False

On Mon, Mar 31, 2014 at 1:03 PM, Aaron Rosen <email address hidden> wrote:

> Are you sure? I was the one who changed this code and was aware of nic
> ordering. Trying to reproduce now.
>
> ** Tags removed: neutron nova
> ** Tags added: network
>
> ** Changed in: nova
> Assignee: (unassigned) => Aaron Rosen (arosen)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1300325
>
> Title:
> nic port ordering is not honored
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> This bug was fixed by https://bugs.launchpad.net/nova/+bug/1064524
> previously but broken by version
> 46922068ac167f492dd303efb359d0c649d69118.
>
> Instead of iterating the already ordered port list, the new code
> iterates the list from neutron and the result is random ordering.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/1300325/+subscriptions
>

--
-s

Revision history for this message
Aaron Rosen (arosen) wrote :

Hi Sean,

I was able to reproduce this. Good find! My fault :)

Changed in nova:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Sean Chandler (seandchandler) wrote :

Happy to be of service! Strange that the tests for ordering didnt catch
this one.

On Mon, Mar 31, 2014 at 2:13 PM, Aaron Rosen <email address hidden> wrote:

> Hi Sean,
>
> I was able to reproduce this. Good find! My fault :)
>
> ** Changed in: nova
> Status: New => Confirmed
>
> ** Changed in: nova
> Importance: Undecided => Critical
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1300325
>
> Title:
> nic port ordering is not honored
>
> Status in OpenStack Compute (Nova):
> Confirmed
>
> Bug description:
> This bug was fixed by https://bugs.launchpad.net/nova/+bug/1064524
> previously but broken by version
> 46922068ac167f492dd303efb359d0c649d69118.
>
> Instead of iterating the already ordered port list, the new code
> iterates the list from neutron and the result is random ordering.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/1300325/+subscriptions
>

--
-s

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

Fix proposed to branch: master
Review: https://review.openstack.org/84208

Changed in nova:
status: Confirmed → In Progress
Aaron Rosen (arosen)
tags: added: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/84208
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=721e7f939859fbfe6b0c79ef3a6d5e43c916da65
Submitter: Jenkins
Branch: master

commit 721e7f939859fbfe6b0c79ef3a6d5e43c916da65
Author: Aaron Rosen <email address hidden>
Date: Mon Mar 31 11:35:29 2014 -0700

    Ensure network interfaces are in requested order

    _build_network_info_model was iterating current_neutron_ports
    instead of port_ids which contains ports in their correctly requested
    order. Because of this the requested nic order was no longer being
    perserved. This patch fixes this and also changes the order of ports
    in test_build_network_info_model() so this case is tested.

    Change-Id: Ia9e71364bca6cbc24ebc1c234e6a5af14f51cd62
    Closes-bug: #1300325

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/84582

Thierry Carrez (ttx)
Changed in nova:
milestone: none → icehouse-rc2
tags: removed: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/85711

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/85711
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f78ee9c53a8cb28f5b8e1dfeb21adfa78be2e09a
Submitter: Jenkins
Branch: milestone-proposed

commit f78ee9c53a8cb28f5b8e1dfeb21adfa78be2e09a
Author: Aaron Rosen <email address hidden>
Date: Mon Mar 31 11:35:29 2014 -0700

    Ensure network interfaces are in requested order

    _build_network_info_model was iterating current_neutron_ports
    instead of port_ids which contains ports in their correctly requested
    order. Because of this the requested nic order was no longer being
    perserved. This patch fixes this and also changes the order of ports
    in test_build_network_info_model() so this case is tested.

    Change-Id: Ia9e71364bca6cbc24ebc1c234e6a5af14f51cd62
    Closes-bug: #1300325
    (cherry picked from commit 721e7f939859fbfe6b0c79ef3a6d5e43c916da65)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.