Public bug reported:

can not delete an instance if the instance's rescue lvm can not be
found.

how to reproduce:

1.  configure images_type lvm for libvirt dirver.
[libvirt]
images_type = lvm <---- 
images_volume_group = stack-volumes-lvmdriver-1 <-- lvm used

2. rescue the instance, will generate uuid.rescue lvm
3. unrescue the instance, the rescue lvm can not be deleted due to bug   
https://bugs.launchpad.net/nova/+bug/1385480
4. delete the uuid.rescue lvm manually.
5. delete the instance(failed and set to error state)

below is the call trace of nova-compute driver.

2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
self._cleanup_lvm(instance)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/driver.py", line 944, in _cleanup_lvm
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
lvm.remove_volumes(disks)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 272, in remove_volumes
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
clear_volume(path)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 250, in clear_volume
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     volume_size = 
get_volume_size(path)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 66, in decorated_function
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     return 
function(path)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 197, in get_volume_size
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
run_as_root=True)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/utils.py", line 53, in execute
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     return 
utils.execute(*args, **kwargs)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/utils.py", line 164, in execute
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     return 
processutils.execute(*cmd, **kwargs)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 224, 
in execute
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
cmd=sanitized_cmd)
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher 
ProcessExecutionError: Unexpected error while running command.
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Command: sudo 
nova-rootwrap /etc/nova/rootwrap.conf blockdev --getsize64 
/dev/stack-volumes-lvmdriver-1/b09687ee-f525-4edc-aaf4-1272562d46fd_disk.rescue
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Exit code: 1
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Stdout: u''
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Stderr: u'blockdev: 
cannot open 
/dev/stack-volumes-lvmdriver-1/b09687ee-f525-4edc-aaf4-1272562d46fd_disk.rescue:
 No such file or directory\n'
2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher

** Affects: nova
     Importance: Undecided
     Assignee: Eli Qiao (taget-9)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Eli Qiao (taget-9)

-- 
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/1404791

Title:
  can not delete an instance if the instance's rescue volume is not
  found

Status in OpenStack Compute (Nova):
  New

Bug description:
  can not delete an instance if the instance's rescue lvm can not be
  found.

  how to reproduce:

  1.  configure images_type lvm for libvirt dirver.
  [libvirt]
  images_type = lvm <---- 
  images_volume_group = stack-volumes-lvmdriver-1 <-- lvm used

  2. rescue the instance, will generate uuid.rescue lvm
  3. unrescue the instance, the rescue lvm can not be deleted due to bug   
https://bugs.launchpad.net/nova/+bug/1385480
  4. delete the uuid.rescue lvm manually.
  5. delete the instance(failed and set to error state)

  below is the call trace of nova-compute driver.

  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
self._cleanup_lvm(instance)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/driver.py", line 944, in _cleanup_lvm
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
lvm.remove_volumes(disks)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 272, in remove_volumes
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
clear_volume(path)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 250, in clear_volume
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     volume_size = 
get_volume_size(path)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 66, in decorated_function
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     return 
function(path)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/lvm.py", line 197, in get_volume_size
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
run_as_root=True)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/virt/libvirt/utils.py", line 53, in execute
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     return 
utils.execute(*args, **kwargs)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/nova/nova/utils.py", line 164, in execute
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     return 
processutils.execute(*cmd, **kwargs)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 224, 
in execute
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher     
cmd=sanitized_cmd)
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher 
ProcessExecutionError: Unexpected error while running command.
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Command: sudo 
nova-rootwrap /etc/nova/rootwrap.conf blockdev --getsize64 
/dev/stack-volumes-lvmdriver-1/b09687ee-f525-4edc-aaf4-1272562d46fd_disk.rescue
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Exit code: 1
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Stdout: u''
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher Stderr: 
u'blockdev: cannot open 
/dev/stack-volumes-lvmdriver-1/b09687ee-f525-4edc-aaf4-1272562d46fd_disk.rescue:
 No such file or directory\n'
  2014-12-22 13:18:29.691 TRACE oslo.messaging.rpc.dispatcher

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to