Bug 1124429 - /servers/<instance-id>/os-security-groups returns an empty list when neutron secgroup proxy is enabled
Summary: /servers/<instance-id>/os-security-groups returns an empty list when neutron ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: z4
: 6.0 (Juno)
Assignee: Brent Eagles
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-29 13:13 UTC by Peter McGowan
Modified: 2019-09-09 14:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-15 16:09:36 UTC
Target Upstream Version:


Attachments (Terms of Use)
OpenStack Stack Trace (1.25 KB, text/plain)
2014-07-29 13:13 UTC, Peter McGowan
no flags Details
CloudForms Stack Trace (6.75 KB, text/plain)
2014-07-29 13:13 UTC, Peter McGowan
no flags Details


Links
System ID Priority Status Summary Last Updated
Launchpad 1291489 None None None Never

Description Peter McGowan 2014-07-29 13:13:11 UTC
Created attachment 922152 [details]
OpenStack Stack Trace

Description of problem:
Calling /servers/<instance-id>/os-security-groups returns an empty list when neutron secgroup proxy is enabled. This seems to have been reported here: https://bugs.launchpad.net/nova/+bug/1159793 but is still a problem with python-nova-2013.2.3-7.el6ost.noarch. The problem causes CloudForms to fail to connect to an OpenStack Provider if that OpenStack Provider has any VM instances.

Version-Release number of selected component (if applicable):
python-nova-2013.2.3-7.el6ost.noarch
CloudForms Management Engine 5.2.4.2

How reproducible:
Every Time

Steps to Reproduce:
1. Setup an OpenStack installation to use neutron networking, and enable the sec group proxy.
2. Create some VM Instances in OpenStack
3. Try to add the OpenStack IaaS as a Cloud Provider in CloudForms

Actual results:

On OpenStack:

2014-07-22 11:32:13.142 9915 ERROR nova.api.openstack.wsgi [req-a596d58d-e340-4781-8720-a2acfc594d7f 3a45f01cd42a4c8ab0cd9aa20d2357c5 d6c2ed4a851142d3a959d3a54db44d04] Exception handling resource: 'NoneType' object is not iterable
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 997, in _process_stack
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi     action_result = self.dispatch(meth, request, action_args)
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 1078, in dispatch
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi     return method(req=request, **action_args)
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/security_groups.py", line 438, in index
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi     for group in groups]
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi TypeError: 'NoneType' object is not iterable
2014-07-22 11:32:13.142 9915 TRACE nova.api.openstack.wsgi


On CloudForms:


[----] E, [2014-07-22T10:39:20.874325 #5617:ba6080] ERROR -- : <Fog> excon.error     #<Excon::Errors::BadRequest: Expected([200]) <=> Actual(400 Bad Request)
  response => #<Excon::Response:0x000000083298f0 @data={:body=>"{\"badRequest\": {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400}}", :headers=>{"Content-Length"=>"141", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-a4ab7c22-abb8-4435-a447-c41b194e9fe3", "Date"=>"Tue, 22 Jul 2014 10:39:20 GMT"}, :status=>400, :remote_ip=>"192.168.2.3"}, @body="{\"badRequest\": {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400}}", @headers={"Content-Length"=>"141", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-a4ab7c22-abb8-4435-a447-c41b194e9fe3", "Date"=>"Tue, 22 Jul 2014 10:39:20 GMT"}, @status=400, @remote_ip="192.168.2.3">>
[----] E, [2014-07-22T10:39:20.878117 #5617:ba6080] ERROR -- : MIQ(MiqQueue.deliver)    Message id: [1000002245218], Error: [Expected([200]) <=> Actual(400 Bad Request)
  response => #<Excon::Response:0x000000083298f0 @data={:body=>"{\"badRequest\": {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400}}", :headers=>{"Content-Length"=>"141", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-a4ab7c22-abb8-4435-a447-c41b194e9fe3", "Date"=>"Tue, 22 Jul 2014 10:39:20 GMT"}, :status=>400, :remote_ip=>"192.168.2.3"}, @body="{\"badRequest\": {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400}}", @headers={"Content-Length"=>"141", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-a4ab7c22-abb8-4435-a447-c41b194e9fe3", "Date"=>"Tue, 22 Jul 2014 10:39:20 GMT"}, @status=400, @remote_ip="192.168.2.3">]
[----] E, [2014-07-22T10:39:20.878510 #5617:ba6080] ERROR -- : [Excon::Errors::BadRequest]: Expected([200]) <=> Actual(400 Bad Request)
  response => #<Excon::Response:0x000000083298f0 @data={:body=>"{\"badRequest\": {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400}}", :headers=>{"Content-Length"=>"141", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-a4ab7c22-abb8-4435-a447-c41b194e9fe3", "Date"=>"Tue, 22 Jul 2014 10:39:20 GMT"}, :status=>400, :remote_ip=>"192.168.2.3"}, @body="{\"badRequest\": {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400}}", @headers={"Content-Length"=>"141", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-a4ab7c22-abb8-4435-a447-c41b194e9fe3", "Date"=>"Tue, 22 Jul 2014 10:39:20 GMT"}, @status=400, @remote_ip="192.168.2.3">  Method:[rescue in deliver]
[----] E, [2014-07-22T10:39:20.878750 #5617:ba6080] ERROR -- : /opt/rh/ruby193/root/usr/share/gems/gems/excon-0.31.0/lib/excon/middlewares/expects.rb:10:in `response_call'
/opt/rh/ruby193/root/usr/share/gems/gems/excon-0.31.0/lib/excon/middlewares/response_parser.rb:26:in `response_call'
/opt/rh/ruby193/root/usr/share/gems/gems/excon-0.31.0/lib/excon/connection.rb:398:in `response'
/opt/rh/ruby193/root/usr/share/gems/gems/excon-0.31.0/lib/excon/connection.rb:268:in `request'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/core/connection.rb:56:in `request'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/core/deprecated/connection.rb:20:in `request'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/openstack/compute.rb:342:in `request'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/openstack/requests/compute/list_security_groups.rb:14:in `list_security_groups'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/openstack/models/compute/server.rb:183:in `security_groups'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:325:in `parse_server'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:128:in `block in get_servers'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:135:in `block in process_collection'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/core/collection.rb:24:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.19.0/lib/fog/core/collection.rb:24:in `each'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:134:in `process_collection'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:128:in `get_servers'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:37:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:10:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_refresher.rb:22:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_refresher.rb:11:in `each'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_refresher.rb:11:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/base_refresher.rb:8:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:80:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:79:in `each'
/var/www/miq/vmdb/app/models/ems_refresh.rb:79:in `refresh'
/var/www/miq/vmdb/app/models/miq_queue.rb:369:in `block in deliver'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:365:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:111:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:139:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:156:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:150:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:150:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:328:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:325:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:325:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:139:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:127:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:27:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:8:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.13/lib/rails/commands/runner.rb:51:in `eval'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.13/lib/rails/commands/runner.rb:51:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.13/lib/rails/commands.rb:64:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.13/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

Expected results:
The OpenStack IaaS should be added as a Cloud Provider to CloudForms

Additional info:
If I delete all existing VM instances in OpenStack, the connection succeeds and I am able to add the OpenStack IaaS as a Cloud Provider

Comment 1 Peter McGowan 2014-07-29 13:13:46 UTC
Created attachment 922153 [details]
CloudForms Stack Trace

Comment 3 Stephen Gordon 2014-10-08 01:27:40 UTC
Hi Brent,

Looks like this made it all the way to stable/havana, can you just confirm which RHELOSP releases we have picked it up in via stable rebases so far?

Thanks,

Steve

Comment 4 Brent Eagles 2014-11-19 17:02:58 UTC
Fix was marked as included in:
2014.2 - not relevant, as we are not there yet.
2013.2.4 - which corresponds to RHEL OSP 4 A5

AFAICT, it was not marked as included in Icehouse, but it does appear in the logs of the 2014.1.2 tag. It likely did not show up in the list of patches for the release because it wasn't marked with the milestone in launchpad.


Note You need to log in before you can comment on or make changes to this bug.