Volumes stuck in "error deleted" state when using device mapper
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
John Griffith | ||
OpenStack Compute (nova) |
Fix Released
|
High
|
Rafi Khardalian |
Bug Description
Volumes can get stuck in an "error deleted" state when lvm fails to remove them due to being "open". The -f (force) flag is already being passed to lvremove, which has no effect. The failure whose log I've pasted below occurred on a system which uses device mapper, with lvm layered on top. In order to be able to delete the volume, it needs to be removed from device mapper via dmsetup remove so that lvm stops considering the device open and allows removal.
-- Log --
2012-04-11 04:11:32 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp rval = node_func(
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp {'status': 'error_deleting'})
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp self.gen.next()
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp self.driver.
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp self._delete_
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp run_as_root=True)
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp self._execute(
2012-04-11 04:11:32 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-11 04:11:32 TRACE nova.rpc.amqp cmd=' '.join(cmd))
2012-04-11 04:11:32 TRACE nova.rpc.amqp ProcessExecutio
2012-04-11 04:11:32 TRACE nova.rpc.amqp Command: sudo nova-rootwrap lvremove -f nova-volumes/
2012-04-11 04:11:32 TRACE nova.rpc.amqp Exit code: 5
2012-04-11 04:11:32 TRACE nova.rpc.amqp Stdout: ''
2012-04-11 04:11:32 TRACE nova.rpc.amqp Stderr: ' Can\'t remove open logical volume "volume-
-- Log --
Essex final, Ubuntu 11.10 (64-bit).
Changed in cinder: | |
status: | Fix Committed → In Progress |
Changed in cinder: | |
milestone: | none → folsom-rc1 |
importance: | Medium → Critical |
Changed in nova: | |
assignee: | nobody → John Griffith (john-griffith) |
Changed in cinder: | |
assignee: | Rafi Khardalian (rkhardalian) → John Griffith (john-griffith) |
Changed in cinder: | |
assignee: | Rafi Khardalian (rkhardalian) → John Griffith (john-griffith) |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | folsom-rc1 → 2012.2 |
Changed in nova: | |
milestone: | folsom-rc1 → 2012.2 |
sounds like we need an optional call to dmsetup and corresponding nova-rootwrap additions.