← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Public bug reported:

When a 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')

I do not see port_security_enabled is mandatory for a network, so code
should handle this scenario.

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

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

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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1596535

Title:
  Cannot attach a DHCP network to VM

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  When a 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')

  I do not see port_security_enabled is mandatory for a network, so code
  should handle this scenario.

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


Follow ups