← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1768690] Re: [RFE] Regenerate mac address of a port

 

Reviewed:  https://review.openstack.org/565932
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8f3a066b20b7ffafec95a618d60e40727504f37c
Submitter: Zuul
Branch:    master

commit 8f3a066b20b7ffafec95a618d60e40727504f37c
Author: Harald Jensås <hjensas@xxxxxxxxxx>
Date:   Thu May 3 03:15:07 2018 +0200

    Add support to regenerate port mac_address
    
    Passing 'null' (None) as the mac address in a port update
    request causes the port's mac address to be re-generated
    using the base MAC address Neutron uses for VIFs.
    
    This change implementes a temporary lib api definition
    with a new converter that will generate valid mac if the
    data provided is None.
    
    APIImpact: Port mac_addr regenerated if None passed on update.
    Closes-Bug: #1768690
    Change-Id: I7d04beea4810718c3b745de8ea97897b1323267e


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1768690

Title:
  [RFE] Regenerate mac address of a port

Status in neutron:
  Fix Released

Bug description:
  Openstack Ironic need to set the mac address of neutron port to the
  actual mac address of the hardware for DHCP/PXE deployment to work.
  When using pre-created neutron ports there is an issue where
  previously used ports cause a conflict when a new instance is
  scheduled onto the same baremetal hosts.

  Example:
   openstack port create --network private test-port1
   openstack port create --network private test-port2

    openstack server create \
      --image cirros-0.3.5-x86_64-disk \
      --port test-port1\
      --flavor baremetal \
      test-server

    openstack server delete test-server

    openstack server create \
      --image cirros-0.3.5-x86_64-disk \
      --port test-port2 \
      --flavor baremetal \
      test-server

  The second server create command fails with:
  fault:
    code: 500
    created: '2018-04-29T12:21:37Z'
    < .. snip .. >
    message: 'Build of instance 5982f29a-3d48-4eb8-88ca-cf794c8f31dd aborted: Failure
      prepping block device.'

  An in conductor log:
  Apr 29 14:21:35 ironic-devstack.lab.example.com ironic-conductor[445]: ERROR ironic.common.neutron MacAddressInUseClient: Unable to complete operation for network 52497681-18f4-47de-b48e-1265799caea9. The mac address 52:54:00:53:b5:b9 is in use.

  
  It should be possible to "return" the port by resetting a mac in the base MAC address Neutron uses for VIFs. e.g a port update request that triggers regeneration of the mac address. Ironic would add this to it's interface detach method, to ensure no previously used ports cause issues when deploying new baremetal instances.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1768690/+subscriptions


References