Bug 1460745 - MAC not updated when VM booted and attached to SRIOV PF
Summary: MAC not updated when VM booted and attached to SRIOV PF
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-odl
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 10.0 (Newton)
Assignee: Victor Pickard
QA Contact: Toni Freger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-12 14:59 UTC by Victor Pickard
Modified: 2017-07-23 11:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-23 11:10:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1686799 0 None None None 2017-06-16 14:25:49 UTC
OpenStack gerrit 461136 0 None None None 2017-06-16 14:27:35 UTC

Description Victor Pickard 2017-06-12 14:59:49 UTC
Description of problem:

ODL does not get MAC update when VM booted and attached to SRIOV PF
when using ODL_v2 driver. Works with ODL_v1 driver.


Version-Release number of selected component (if applicable):




How reproducible:
Always

Steps to Reproduce:
I've got a setup based on the following:

ODL: stable/boron
OpenStack: stable/newton
ODL ML2: opendaylight_v2
ODL is configured as DHCP server

I create a port, as follows:

port2_id=$(neutron port-create multinet --name pf1 --binding:vnic_type direct-physical --device-owner nova-compute | grep "\ id\ " | awk '{ print $4 }')

Then, boot the VM as follows:

nova boot test-pf1 --flavor m1.large --key-name mykey --image centos --nic port-id=$port2_id --availability-zone nova:overcloud-compute-0.localdomain:overcloud-compute-0.localdomain

The VM boots, but is not able to get an IP address, DHCP is not working. Debugged, and what I see is that the neutron port in ODL has the generated MAC, not the MAC that Nova (and sriovnicswitch agent ) choose, which is the actual MAC of the physical interface.

When I do a "neutron port-show", the MAC is correct, and matches the MAC of the physical interface.
When I dump neutron ports in ODL MD-SAL, the MAC is still the original, generated MAC.

Based on neutron debug logs, and ODL logs, neutron never sends the updated MAC to ODL.

So, this appears to be a bug in neutron.

Logs, and relevant debug inform can be found at [1].

Is this a known issue, or should I open a new bug for this?

I've looked at the neutron code a bit, to see if I could find the root cause. So far, haven't found it, would be helpful if someone could point me to where neutron updates the MAC in the neutron DB. Maybe, it is something simple...

Lastly, this scenario works if I use the v1 driver for ODL.

[1] https://gist.github.com/vpickard/97e48b3eb466578064e06f056646def0
Actual results:


Expected results:


Additional info:

Email from Isaku. Thanks!

The cause lives in odl v2 mechanism driver.
Can you please try to remove mac_address in the below line?

https://review.openstack.org/gitweb?p=openstack/networking-odl.git;a=blob;f=networking_odl/common/filters.py;hb=HEAD#l101

It intentionally doesn't update mac_address(and other values like id etc)
assuming that they aren't updated.
But given your scenario, the assumption for mac_address is wrong.
Somehow v1driver sends mac_address. git log doesn't tell much though.

I'm looking forward for your patch to fix it.
thanks,

Comment 1 Victor Pickard 2017-06-12 15:04:56 UTC
Upstream bug info:

https://bugs.launchpad.net/networking-odl/+bug/1686799

Comment 2 Victor Pickard 2017-06-12 15:07:04 UTC
https://code.engineering.redhat.com/gerrit/#/c/104754/


Note You need to log in before you can comment on or make changes to this bug.