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,
Upstream bug info: https://bugs.launchpad.net/networking-odl/+bug/1686799
https://code.engineering.redhat.com/gerrit/#/c/104754/