Unable to force-delete if volume group is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When the cinder-volumes LVM volume group can't be located (e.g., due to a disk array failure), force-delete does not succeed.
Per IRC chat with jgriffith, this appears to be a regression WRT "require init" and that this used to succeed. (Perhaps recheck unit tests as well?)
See http://
Traceback (most recent call last):
File "/usr/lib/
incoming.
File "/usr/lib/
return self._do_
File "/usr/lib/
result = getattr(endpoint, method)(ctxt, **new_args)
File "/usr/lib/
return lvo_inner2(inst, context, volume_id, **kwargs)
File "/usr/lib/
retval = f(*args, **kwargs)
File "/usr/lib/
return f(*_args, **_kwargs)
File "/usr/lib/
{'status': 'error_deleting'})
File "/usr/lib/
six.
File "/usr/lib/
self.
File "/usr/lib/
if self._volume_
File "/usr/lib/
return self.vg.
File "/usr/lib/
ref_list = self.get_volumes()
File "/usr/lib/
self.lv_list = self.get_
File "/usr/lib/
run_
File "/usr/lib/
cmd=
ProcessExecutio
Command: sudo cinder-rootwrap /etc/cinder/
Exit code: 5
Stdout: u''
Stderr: u' Volume group "cinder-volumes" not found\n Skipping volume group cinder-volumes\n'
description: | updated |
I think this is arguably reasonable behavior. All force-delete does is lets you delete things that are in states other than "available", "error", etc.
Allowing force-delete to proceed and delete the volume if it can't find the VG means that you leak LVs when the VG is brought back online. This is different semantics of what force-delete is currently intended to do, and probably falls more under the "unmanage" area rather than "delete".