ServerGroup object delete fails because it does not pass it's id to ServerGroupsManager object

Bug #1400494 reported by Sean Toner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
High
melanie witt

Bug Description

If you create a ServerGroup object, and then try to call its delete() method, it will fail with the following:

Error
Traceback (most recent call last):
  File "/home/stoner/Projects/fog/fog/tests/numa.py", line 316, in tearDown
    self.cleanup()
  File "/home/stoner/Projects/fog/fog/tests/numa.py", line 303, in cleanup
    group.delete()
  File "/usr/lib/python2.7/site-packages/novaclient/v1_1/server_groups.py", line 33, in delete
    self.manager.delete(self)
  File "/usr/lib/python2.7/site-packages/novaclient/v1_1/server_groups.py", line 63, in delete
    self._delete('/os-server-groups/%s' % id)
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 109, in _delete
    _resp, _body = self.api.client.delete(url)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 496, in delete
    return self._cs_request(url, 'DELETE', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 465, in _cs_request
    resp, body = self._time_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 439, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 433, in request
    raise exceptions.from_response(resp, body, url, method)
NotFound: Instance group <ServerGroup: ce418f29-ab80-4708-940f-997a3ce52eea> could not be found. (HTTP 404) (Request-ID: req-f47f61ee-6e39-45b0-b48e-ef24bf35218e)

This is because it is not passing it's id to the ServerGroupsManager object which requires the id to look up the instance.

This is occurring on python-novaclient version python-novaclient-2.20.0-1.fc22.noarch running on Fedora 20 openstack juno.

melanie witt (melwitt)
Changed in python-novaclient:
assignee: nobody → melanie witt (melwitt)
importance: Undecided → High
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/140834
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=85e15fe8856c1c689f77c488f0b9ff80263c6f5e
Submitter: Jenkins
Branch: master

commit 85e15fe8856c1c689f77c488f0b9ff80263c6f5e
Author: melanie witt <email address hidden>
Date: Wed Dec 10 20:41:16 2014 +0000

    pass id to ServerGroupsManager in ServerGroup.delete()

    ServerGroup object delete currently fails because the manager object
    requires the server group id and is instead passed the server group
    object itself (copy-paste error). This patch changes it to pass the
    id.

    Change-Id: Ic6a4a38157f52343fbb3e75a02d1f7c6bef28d99
    Closes-Bug: #1400494

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.21.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
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.