← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1266960] [NEW] InstanceIsLocked Exception didn't raise

 

Public bug reported:

When VM is locked by nova, VM API should not execute. 
There are so many api  that cannot be executed when vm is locked.
But When API is tried, nova raise inappropriate InstanceInvalidSate exception instead of InstanceIsLocked exception. 
example)
$ nova reboot 9b4a0687-d1f5-4dac-a49e-f5c6d1f3e316
ERROR: Instance is in an invalid state for 'reboot' (HTTP 409) (Request-ID: req-8407d42d-9f0e-4c91-995b-35025251f209)
$ nova delete 9b4a0687-d1f5-4dac-a49e-f5c6d1f3e316
Instance is in an invalid state for 'delete' (HTTP 409) (Request-ID: req-f1b144b6-958e-4b19-84c7-fa641344d4d5)

This case is occured from so many compute api.
delete
reboot
rebuild
resize
shelve
pause
unpause
suspend
resume
rescue
unrescue
attach_volume
detach_volume
update_instance_metadata

InstanceInvalidState is used at many api to check state is appropriate, 
but InstanceIsLocked inherited InstanceInvalidState, when vm is locked, api request return InstanceInvalidState instead of InstanceIsLocked.

So I suggest modify InstanceIsLocked inherit Invalid instead of InstanceInvalidState.
InstanceIsLocked(InstanceInvalidState) -> InstanceIsLocked(Invalid)

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1266960

Title:
  InstanceIsLocked Exception didn't raise

Status in OpenStack Compute (Nova):
  New

Bug description:
  When VM is locked by nova, VM API should not execute. 
  There are so many api  that cannot be executed when vm is locked.
  But When API is tried, nova raise inappropriate InstanceInvalidSate exception instead of InstanceIsLocked exception. 
  example)
  $ nova reboot 9b4a0687-d1f5-4dac-a49e-f5c6d1f3e316
  ERROR: Instance is in an invalid state for 'reboot' (HTTP 409) (Request-ID: req-8407d42d-9f0e-4c91-995b-35025251f209)
  $ nova delete 9b4a0687-d1f5-4dac-a49e-f5c6d1f3e316
  Instance is in an invalid state for 'delete' (HTTP 409) (Request-ID: req-f1b144b6-958e-4b19-84c7-fa641344d4d5)

  This case is occured from so many compute api.
  delete
  reboot
  rebuild
  resize
  shelve
  pause
  unpause
  suspend
  resume
  rescue
  unrescue
  attach_volume
  detach_volume
  update_instance_metadata

  InstanceInvalidState is used at many api to check state is appropriate, 
  but InstanceIsLocked inherited InstanceInvalidState, when vm is locked, api request return InstanceInvalidState instead of InstanceIsLocked.

  So I suggest modify InstanceIsLocked inherit Invalid instead of InstanceInvalidState.
  InstanceIsLocked(InstanceInvalidState) -> InstanceIsLocked(Invalid)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1266960/+subscriptions


Follow ups

References