Bug 1460745 - MAC not updated when VM booted and attached to SRIOV PF
MAC not updated when VM booted and attached to SRIOV PF
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-odl (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
medium Severity medium
: ---
: 10.0 (Newton)
Assigned To: Victor Pickard
Toni Freger
: Triaged, ZStream
Depends On:
  Show dependency treegraph
Reported: 2017-06-12 10:59 EDT by Victor Pickard
Modified: 2017-07-23 07:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-23 07:10:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1686799 None None None 2017-06-16 10:25 EDT
OpenStack gerrit 461136 None None None 2017-06-16 10:27 EDT

  None (edit)
Description Victor Pickard 2017-06-12 10:59:49 EDT
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:

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?


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.
Comment 1 Victor Pickard 2017-06-12 11:04:56 EDT
Upstream bug info:

Comment 2 Victor Pickard 2017-06-12 11:07:04 EDT

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