← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1596528] [NEW] Cannot attach a DHCP network to VM

 

Public bug reported:

When a flat DHCP network is created and an attempt is made to attach a network interface to a VM, it fails with an error :
2016-06-27 03:26:14.857 32668 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 600, in allocate_for_instance
2016-06-27 03:26:14.857 32668 ERROR nova.api.openstack.extensions     raise exception.SecurityGroupCannotBeApplied()

Debugging, the code breaking is :
            port_security_enabled = network.get('port_security_enabled', True)

and network is :
(Pdb) p network
{u'status': u'ACTIVE', u'subnets': [], u'availability_zone_hints': [], u'availability_zones': [], u'name': u'DHCP', u'provider:physical_network': u'default0', u'admin_state_up': True, u'tenant_id': u'500dc4679e6f4063a47ac3c17728085f', u'created_at': u'2016-06-27T07:25:55', u'tags': [], u'updated_at': u'2016-06-27T07:25:55', u'provider:segmentation_id': 300, u'ipv6_address_scope': None, u'router:external': False, u'ipv4_address_scope': None, u'id': u'815b219c-272e-4cb6-8711-c17df5e0894e', u'shared': False, u'provider:network_type': u'vlan', u'mtu': 1500, u'description': u''}
(Pub)

this code returns True in this context. port_security_enabled is not
present in the network dictionary.

This code needs to be :
port_security_enabled = network.get('port_security_enabled')

** Affects: neutron
     Importance: Undecided
     Assignee: Sridhar Venkat (svenkat)
         Status: In Progress

** Changed in: neutron
     Assignee: (unassigned) => Sridhar Venkat (svenkat)

** Changed in: neutron
       Status: New => In Progress

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

Title:
  Cannot attach a DHCP network to VM

Status in neutron:
  In Progress

Bug description:
  When a flat DHCP network is created and an attempt is made to attach a network interface to a VM, it fails with an error :
  2016-06-27 03:26:14.857 32668 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 600, in allocate_for_instance
  2016-06-27 03:26:14.857 32668 ERROR nova.api.openstack.extensions     raise exception.SecurityGroupCannotBeApplied()

  Debugging, the code breaking is :
              port_security_enabled = network.get('port_security_enabled', True)

  and network is :
  (Pdb) p network
  {u'status': u'ACTIVE', u'subnets': [], u'availability_zone_hints': [], u'availability_zones': [], u'name': u'DHCP', u'provider:physical_network': u'default0', u'admin_state_up': True, u'tenant_id': u'500dc4679e6f4063a47ac3c17728085f', u'created_at': u'2016-06-27T07:25:55', u'tags': [], u'updated_at': u'2016-06-27T07:25:55', u'provider:segmentation_id': 300, u'ipv6_address_scope': None, u'router:external': False, u'ipv4_address_scope': None, u'id': u'815b219c-272e-4cb6-8711-c17df5e0894e', u'shared': False, u'provider:network_type': u'vlan', u'mtu': 1500, u'description': u''}
  (Pub)

  this code returns True in this context. port_security_enabled is not
  present in the network dictionary.

  This code needs to be :
  port_security_enabled = network.get('port_security_enabled')

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


Follow ups