Security-group-name is case sensitive when booting instance with neutron

Bug #1286463 reported by Joshua Hesketh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Low
Sivasathurappan Radhakrishnan
python-novaclient
Invalid
Undecided
Abhilash Goyal

Bug Description

When using nova-networking an instance boots correctly despite the case of the security-group name that is used (assuming it exists, case-insensitive). http://paste.openstack.org/show/70477/

However, when using neutron the instance will queue with the scheduler but fail to boot.

stack@devstack:~$ neutron security-group-list
+--------------------------------------+---------+-------------+
| id | name | description |
+--------------------------------------+---------+-------------+
| 57597299-782e-4820-b814-b27c2f125ee2 | FooBar | |
| 9ae55da3-5246-4a28-b4d6-d45affe7b5d8 | default | default |
+--------------------------------------+---------+-------------+

stack@devstack:~$ nova boot --image e051efff-ddd7-4b57-88af-d47b65aaa333 --flavor 1 --security-group NotARealGroup myinst2
ERROR: Unable to find security_group with name 'NotARealGroup' (HTTP 400) (Request-ID: req-bb34592c-fc38-4a39-be8f-787e2a754b98)

stack@devstack:~/devstack$ nova boot --image e051efff-ddd7-4b57-88af-d47b65aaa333 --flavor 1 --security-group FOOBAR myinst2
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | ZzsCcS5AHHGR |
| config_drive | |
| created | 2014-03-01T07:30:24Z |
| flavor | m1.tiny (1) |
| hostId | |
| id | 050af9f8-dbe0-4e69-afa4-d29d1e153913 |
| image | cirros-0.3.1-x86_64-uec (e051efff-ddd7-4b57-88af-d47b65aaa333) |
| key_name | - |
| metadata | {} |
| name | myinst2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | FOOBAR |
| status | BUILD |
| tenant_id | be91fea7b53e4ad189dd66ef2d65cfa8 |
| updated | 2014-03-01T07:30:24Z |
| user_id | 4f0af1fd11a140e5807f2c436fd2660f |
+--------------------------------------+----------------------------------------------------------------+

stack@devstack:~/devstack$ nova show myinst2
+--------------------------------------+------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | error |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2014-03-01T07:30:24Z |
| fault | {"message": "No valid host was found. ", "code": 500, "created": "2014-03-01T07:30:26Z"} |
| flavor | m1.tiny (1) |
| hostId | c2f2dfd04efbfd096879e6bb2902aa2ff1f5c3713e1d53d005f142c2 |
| id | 050af9f8-dbe0-4e69-afa4-d29d1e153913 |
| image | cirros-0.3.1-x86_64-uec (e051efff-ddd7-4b57-88af-d47b65aaa333) |
| key_name | - |
| metadata | {} |
| name | myinst2 |
| os-extended-volumes:volumes_attached | [] |
| status | ERROR |
| tenant_id | be91fea7b53e4ad189dd66ef2d65cfa8 |
| updated | 2014-03-01T07:30:26Z |
| user_id | 4f0af1fd11a140e5807f2c436fd2660f |
+--------------------------------------+------------------------------------------------------------------------------------------+

Also pasted here for formatting: http://paste.openstack.org/show/70925/

2014-03-01 07:30:26.709 ERROR nova.compute.manager [req-acb67b2f-49ba-48df-bd02-01e9a170bb15 demo demo] [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] Error: Security group FOOBAR not found.
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] Traceback (most recent call last):
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/compute/manager.py", line 1069, in _build_instance
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] set_access_ip=set_access_ip)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/compute/manager.py", line 360, in decorated_function
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] return function(self, context, *args, **kwargs)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/compute/manager.py", line 1479, in _spawn
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] LOG.exception(_('Instance failed to spawn'), instance=instance)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] six.reraise(self.type_, self.value, self.tb)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/compute/manager.py", line 1476, in _spawn
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] block_device_info)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2210, in spawn
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] admin_pass=admin_password)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2575, in _create_image
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] content=files, extra_md=extra_md, network_info=network_info)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/api/metadata/base.py", line 165, in __init__
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] ec2utils.get_ip_info_for_instance_from_nw_info(network_info)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/api/ec2/ec2utils.py", line 147, in get_ip_info_for_instance_from_nw_info
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] fixed_ips = nw_info.fixed_ips()
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/network/model.py", line 366, in _sync_wrapper
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] self.wait()
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/network/model.py", line 398, in wait
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] self[:] = self._gt.wait()
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, in wait
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] return self._exit_event.wait()
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 120, in wait
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] current.throw(*self._exc)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] result = function(*args, **kwargs)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/compute/manager.py", line 1257, in _allocate_network_async
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] dhcp_options=dhcp_options)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] File "/opt/stack/nova/nova/network/neutronv2/api.py", line 285, in allocate_for_instance
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] security_group_id=security_group)
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] SecurityGroupNotFound: Security group FOOBAR not found.
2014-03-01 07:30:26.709 TRACE nova.compute.manager [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913]
2014-03-01 07:30:26.711 DEBUG nova.compute.utils [req-acb67b2f-49ba-48df-bd02-01e9a170bb15 demo demo] [instance: 050af9f8-dbe0-4e69-afa4-d29d1e153913] Build of instance 050af9f8-dbe0-4e69-afa4-d29d1e153913 was re-scheduled: Security group FOOBAR not found. from (pid=6525) notify_about_instance_usage /opt/stack/nova/nova/compute/utils.py:335

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/77417

tags: added: havana-backport-potential
Changed in nova:
status: New → Confirmed
Changed in nova:
assignee: nobody → Joshua Hesketh (joshua.hesketh)
Changed in nova:
status: Confirmed → In Progress
Aaron Rosen (arosen)
no longer affects: neutron
Revision history for this message
Tracy Jones (tjones-i) wrote :

this has not been touched in a long time and the patches are abandoned. Please set back to in progress if you start to work on it

Changed in nova:
status: In Progress → Triaged
Brent Eagles (beagles)
tags: added: neutron
Revision history for this message
Abhishek Talwar (abhishek-talwar) wrote :

Hi, I am seeing that nobody is working on this bug from a long time. So, if it is possible i would like to contribute for this bug and fix it. Kindly unassign it if nobody is currently working on it so that i can assign it to myself.

Thanks

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/77347
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in nova:
assignee: Joshua Hesketh (joshua.hesketh) → Amandeep (rattenpal-amandeep)
Revision history for this message
Amandeep (rattenpal-amandeep) wrote :

I think this bug does not affect now .

Changed in nova:
assignee: Amandeep (rattenpal-amandeep) → nobody
assignee: nobody → Amandeep (rattenpal-amandeep)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/141995

Changed in nova:
status: Triaged → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Joe Gordon (<email address hidden>) on branch: master
Review: https://review.openstack.org/141995
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Alan Pevec (apevec)
tags: removed: havana-backport-potential
Changed in nova:
assignee: Amandeep (rattenpal-amandeep) → nobody
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Abhilash Goyal (abhilash-goyal)
Changed in python-novaclient:
assignee: nobody → Abhilash Goyal (abhilash-goyal)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/302095

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
melanie witt (melwitt) wrote :

This doesn't seem related to novaclient

Changed in python-novaclient:
status: New → Invalid
Changed in nova:
assignee: Abhilash Goyal (abhilash-goyal) → Sarafraj Singh (sarafraj-singh)
Changed in nova:
assignee: Sarafraj Singh (sarafraj-singh) → nobody
status: In Progress → New
Changed in nova:
assignee: nobody → Sivasathurappan Radhakrishnan (siva-radhakrishnan)
Revision history for this message
Sivasathurappan Radhakrishnan (siva-radhakrishnan) wrote :

Since nova-network is gonna be deprecated in near future, I don't feel the real need of making this change. I see most of the commands in OpenStack client seems to be case sensitive. Hence I am changing the bug status to 'won't fix'. If this needs to be fixed, please feel free to reopen the bug.

Changed in nova:
status: New → Won't Fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/302095
Reason: This patch has been sitting unchanged for more than 12 weeks. I am therefore going to abandon it to keep the nova review queue sane. Please feel free to restore the change if you're still working on it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.