Cluster creation fails with disabled security groups

Bug #1433017 reported by Daniele Venzano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
Medium
Nikolay Starodubtsev
Kilo
Fix Released
Medium
Vitalii Gridnev

Bug Description

When security groups are disabled in neutron in this way:

enable_security_group = False in ml2_conf.ini
firewall_driver = nova.virt.firewall.NoopFirewallDriver in nova.conf

Neutron client says:
$ neutron security-group-list
Not Found (HTTP 404) (Request-ID: req-9d62d94b-f37d-409e-9428-65991edf3573)

This is what happens in Sahara:

2015-03-17 09:50:20.450 28930 INFO sahara.utils.general [-] Cluster status has been changed: id=c3e6ce83-b4f7-4e77-81bd-5395eb1c64fd, New status=Validating
2015-03-17 09:50:20.552 28930 DEBUG neutronclient.client [-]
REQ: curl -i http://m1:9696/v2.0/quotas/118bb14e507543148a7580487beaac20.json -X GET -H "X-Auth-Token: ca302708b6a3416a9fcc64f03f265fa8" -H "User-Agent: python-neutronclient"
 http_log_req /home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/common/utils.py:130
2015-03-17 09:50:20.563 28930 DEBUG neutronclient.client [-] RESP:200 {'content-length': '80', 'date': 'Tue, 17 Mar 2015 09:50:20 GMT', 'connection': 'keep-alive', 'content-type': 'application/json; charset=UTF-8', 'x
-openstack-request-id': 'req-55261de6-ee7f-4ada-877d-0c378937f469'} {"quota": {"port": 50, "subnet": 1, "floatingip": 0, "network": 1, "router": 0}}
 http_log_resp /home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/common/utils.py:139
2015-03-17 09:50:20.564 28930 DEBUG neutronclient.client [-]
REQ: curl -i http://m1:9696/v2.0/security-groups.json?tenant_id=118bb14e507543148a7580487beaac20 -X GET -H "X-Auth-Token: ca302708b6a3416a9fcc64f03f265fa8" -H "User-Agent: python-neutronclient"
 http_log_req /home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/common/utils.py:130
2015-03-17 09:50:20.572 28930 DEBUG neutronclient.client [-] RESP:404 {'content-length': '52', 'date': 'Tue, 17 Mar 2015 09:50:20 GMT', 'connection': 'keep-alive', 'content-type': 'text/plain; charset=UTF-8', 'x-opens
tack-request-id': 'req-4e8c1c35-4a42-4aa9-ba76-5ff75ebf59c7'} 404 Not Found

The resource could not be found.

 http_log_resp /home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/common/utils.py:139
2015-03-17 09:50:20.573 28930 DEBUG neutronclient.v2_0.client [-] Error message: 404 Not Found

The resource could not be found.

    _handle_fault_response /home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py:173
2015-03-17 09:50:20.763 28930 INFO sahara.utils.general [-] Cluster status has been changed: id=c3e6ce83-b4f7-4e77-81bd-5395eb1c64fd, New status=Error
2015-03-17 09:50:20.763 28930 ERROR sahara.utils.api [-] Request aborted with status code 500 and message 'Internal Server Error'
2015-03-17 09:50:20.765 28930 ERROR sahara.utils.api [-] Traceback (most recent call last):
  File "/home/ubuntu/sahara/sahara/utils/api.py", line 90, in handler
    return func(**kwargs)
  File "/home/ubuntu/sahara/sahara/api/acl.py", line 43, in handler
    return func(*args, **kwargs)
  File "/home/ubuntu/sahara/sahara/service/validation.py", line 47, in handler
    return func(*args, **kwargs)
  File "/home/ubuntu/sahara/sahara/api/v10.py", line 50, in clusters_create
    return u.render(api.create_cluster(data).to_wrapped_dict())
  File "/home/ubuntu/sahara/sahara/service/api.py", line 112, in create_cluster
    six.text_type(e))
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/home/ubuntu/sahara/sahara/service/api.py", line 107, in create_cluster
    quotas.check_cluster(cluster)
  File "/home/ubuntu/sahara/sahara/service/quotas.py", line 45, in check_cluster
    _check_limits(req_limits)
  File "/home/ubuntu/sahara/sahara/service/quotas.py", line 66, in _check_limits
    avail_limits = _get_avail_limits()
  File "/home/ubuntu/sahara/sahara/service/quotas.py", line 118, in _get_avail_limits
    limits.update(_get_neutron_limits())
  File "/home/ubuntu/sahara/sahara/service/quotas.py", line 153, in _get_neutron_limits
    neutron.list_security_groups(tenant_id=tenant_id)['security_groups'])
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 99, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 665, in list_security_groups
    retrieve_all, **_params)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 304, in list
    for r in self._pagination(collection, path, **params):
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 317, in _pagination
    res = self.get(path, params=params)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 290, in get
    headers=headers, params=params)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 267, in retry_request
    headers=headers, params=params)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 208, in do_request
    self._handle_fault_response(status_code, replybody)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 182, in _handle_fault_response
    exception_handler_v20(status_code, des_error_body)
  File "/home/ubuntu/sahara/.tox/venv/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 80, in exception_handler_v20
    message=message)
NeutronClientException: 404 Not Found

The resource could not be found.

Changed in sahara:
milestone: none → kilo-rc1
Changed in sahara:
assignee: nobody → Nikolay Starodubtsev (starodubcevna)
Changed in sahara:
status: New → Triaged
importance: Undecided → Medium
milestone: kilo-rc1 → liberty-1
Changed in sahara:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/172884
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=bde7898d09fa0be5583e68755949c03d189b3475
Submitter: Jenkins
Branch: master

commit bde7898d09fa0be5583e68755949c03d189b3475
Author: Nikolay Starodubtsev <email address hidden>
Date: Mon Apr 13 14:30:02 2015 +0300

    Add handler for configuration w/o sec groups

    If security groups was disabled in Neutron Sahara failed with 500
    Error Code related to Neutron. Now we have handle this error simply
    returning empty list to Sahara if security groups is disabled.

    Closes-Bug: 1433017

    Change-Id: I9cd25782b73be95ff74a5298eb209d95fd5f6ff6

Changed in sahara:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in sahara:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/196005

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (stable/kilo)

Reviewed: https://review.openstack.org/196005
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=1f3f9cffdfe5ab25b0dbd4be17a93a3780eb802e
Submitter: Jenkins
Branch: stable/kilo

commit 1f3f9cffdfe5ab25b0dbd4be17a93a3780eb802e
Author: Nikolay Starodubtsev <email address hidden>
Date: Mon Apr 13 14:30:02 2015 +0300

    Add handler for configuration w/o sec groups

    If security groups was disabled in Neutron Sahara failed with 500
    Error Code related to Neutron. Now we have handle this error simply
    returning empty list to Sahara if security groups is disabled.

    Closes-Bug: 1433017

    Change-Id: I9cd25782b73be95ff74a5298eb209d95fd5f6ff6
    (cherry picked from commit bde7898d09fa0be5583e68755949c03d189b3475)

Thierry Carrez (ttx)
Changed in sahara:
milestone: liberty-1 → 3.0.0
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.