Could not delete lease when associated resource is missing

Bug #1305149 reported by Christian Martinez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Blazar
Won't Fix
Medium
Christian Martinez

Bug Description

Steps:
* create a virtual instance with a lease that starts now (VM status = active)
* terminate instance
* try to delete the lease.

Expected:
* lease should be deleted or suspended

Actual:
* INTERNAL SERVER ERROR received:
** lease cannot be deleted due to missing resource:
  File "/opt/stack/climate/climate/api/v1/utils.py", line 76, in handler
    return func(**kwargs)
  File "/opt/stack/climate/climate/api/v1/validation.py", line 55, in handler
    return func(*args, **kwargs)
  File "/opt/stack/climate/climate/api/v1/v1_0.py", line 60, in leases_delete
    _api.delete_lease(lease_id)
  File "/opt/stack/climate/climate/utils/__init__.py", line 32, in __run_method
    return getattr(self.instance, __name)(*args, **kwargs)
  File "/opt/stack/climate/climate/policy.py", line 108, in wrapped
    return func(self, *args, **kwargs)
  File "/opt/stack/climate/climate/api/v1/service.py", line 99, in delete_lease
    self.manager_rpcapi.delete_lease(lease_id)
  File "/opt/stack/climate/climate/manager/rpcapi.py", line 47, in delete_lease
    return self.call('delete_lease', lease_id=lease_id)
  File "/opt/stack/climate/climate/utils/service.py", line 45, in call
    return self._client.call(ctx.to_dict(), name, **kwargs)
  File "/opt/stack/oslo.messaging/oslo/messaging/rpc/client.py", line 361, in call
    return self.prepare().call(ctxt, method, **kwargs)
  File "/opt/stack/oslo.messaging/oslo/messaging/rpc/client.py", line 150, in call
    wait_for_reply=True, timeout=timeout)
  File "/opt/stack/oslo.messaging/oslo/messaging/transport.py", line 90, in _send
    timeout=timeout)
  File "/opt/stack/oslo.messaging/oslo/messaging/_drivers/amqpdriver.py", line 412, in send
    return self._send(target, ctxt, message, wait_for_reply, timeout)
  File "/opt/stack/oslo.messaging/oslo/messaging/_drivers/amqpdriver.py", line 405, in _send
    raise result
RemoteError: Remote error: Unauthorized Could not find project, 9b1a4856b7be440f94919f08f221a1b8. (HTTP 401)

Revision history for this message
Dina Belova (dbelova) wrote :

As for the solution for this moment, it'll be easy to be implemented after https://blueprints.launchpad.net/climate/+spec/lease-state will be implemented - it'll be clear if lease is inactive because of resource removed, for instance.

Changed in climate:
importance: Undecided → Medium
status: New → Confirmed
Dina Belova (dbelova)
Changed in climate:
assignee: nobody → Christian Martinez (christian-martinez)
Revision history for this message
Christian Martinez (christian-martinez) wrote :
Revision history for this message
Masahito Muroi (muroi-masahito) wrote :

The previous instance reservation feature was dropped in Ocata release. The new instance reservation feature[1] has been implemented. This bug is about the previous one and the scenario doesn't happen in the new one.

https://blueprints.launchpad.net/blazar/+spec/new-instance-reservation

Changed in blazar:
status: Confirmed → Won't Fix
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.