← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1291163] Re: Create VM use port' mac-address '123' failed

 

Reviewed:  https://review.openstack.org/86013
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=bb26eb7253c7fb51acd228c840a5365e1df9ae38
Submitter: Jenkins
Branch:    milestone-proposed

commit bb26eb7253c7fb51acd228c840a5365e1df9ae38
Author: Aaron Rosen <aaronorosen@xxxxxxxxx>
Date:   Fri Mar 14 22:57:09 2014 -0700

    Fix _validate_mac_address method
    
    The method _validate_mac_address previously used: netaddr.EUI(data)
    which would convert data passed in to the correct mac_address representation.
    For example if data=123 it would return: EUI('00-00-00-00-00-7B'). To fix
    this issue I used netaddr.valid_mac() instead which returns a bool if a mac is
    valid or not and does not raise. Note this file needs some improvements to
    improve how exception handling is done that will come later.
    
    Change-Id: I4fb868e40abbad9e743028cc768f47ca9b3e0e70
    Closes-bug: 1291163
    (cherry picked from commit b9390333a146d0435710f85d365318268e267fc3)


** Changed in: neutron
       Status: Fix Committed => 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/1291163

Title:
  Create VM use port' mac-address '123' failed

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  neutron api of "create port" can use mac of int value,but nova can't use the port to create vm!
  root@ubuntu01:~# neutron port-create  --mac-address 123 test2
  Created a new port:
  +-----------------------+-----------------------------------------------------------------------------------+
  | Field                 | Value                                                                             |
  +-----------------------+-----------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                              |
  | allowed_address_pairs |                                                                                   |
  | binding:capabilities  | {"port_filter": false}                                                            |
  | binding:host_id       |                                                                                   |
  | binding:vif_type      | unbound                                                                           |
  | device_id             |                                                                                   |
  | device_owner          |                                                                                   |
  | fixed_ips             | {"subnet_id": "5519e015-fc83-44c2-99ad-d669b3c2c9d7", "ip_address": "10.10.10.4"} |
  | id                    | ae33af6e-6f8f-4ce8-928b-4f05396a7db3                                              |
  | mac_address           | 123                                                                               |
  | name                  |                                                                                   |
  | network_id            | 255f3e92-5a6e-44a5-bbf9-1a62bf5d5935                                              |
  | security_groups       | f627556d-64a3-4c1b-8c50-10a58ddaf29f                                              |
  | status                | DOWN                                                                              |
  | tenant_id             | 34fddbc22c184214b823be267837ef81                                                  |

  the failed log of creating VM:

   Traceback (most recent call last):
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1037, in _build_instance
       set_access_ip=set_access_ip)
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1420, in _spawn
       LOG.exception(_('Instance failed to spawn'), instance=instance)
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1417, in _spawn
       block_device_info)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2070, in spawn
       block_device_info, context=context)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3225, in _create_domain_and_network
       domain = self._create_domain(xml, instance=instance, power_on=power_on)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3159, in _create_domain
       raise e
   libvirtError: XML error: unable to parse mac address '123'

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


References