Terminating an instance with --libvirt_type=lxc fails, can't detach loop device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Chuck Short |
Bug Description
Seems like the container is still running when nova tries to detach the container, therefore failing:
root@compute01:~# fuser -m /dev/loop1
/dev/loop1: 15525rce 15535rce 18189rce 18197rce 18203rce 18214rce
The processes:
15525 ? Ss 0:00 /sbin/init
15535 ? S 0:00 /sbin/plymouthd --mode=boot --attach-to-session
18189 ? S 0:00 upstart-udev-bridge --daemon
18197 ? Ss 0:00 /usr/sbin/sshd -D
18203 ? Sl 0:00 rsyslogd -c4
18214 ? S<s 0:00 udevd --daemon
Trace:
2011-09-04 16:18:31,704 INFO nova.virt.
2011-09-04 16:18:31,706 DEBUG nova.utils [-] Running cmd (subprocess): sudo umount /var/lib/
2011-09-04 16:18:31,867 DEBUG nova.utils [-] Running cmd (subprocess): sudo losetup -a from (pid=15094) execute /usr/lib/
2011-09-04 16:18:32,033 DEBUG nova.utils [-] Running cmd (subprocess): sudo losetup --detach /dev/loop1 from (pid=15094) execute /usr/lib/
2011-09-04 16:18:32,184 DEBUG nova.utils [-] Result was 1 from (pid=15094) execute /usr/lib/
2011-09-04 16:18:32,208 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: self._shutdown_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: self.driver.
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: self._cleanup(
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: disk.destroy_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: _unlink_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: utils.execute(
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: cmd=' '.join(cmd))
(nova.exception): TRACE: ProcessExecutio
(nova.exception): TRACE: Command: sudo losetup --detach /dev/loop1
(nova.exception): TRACE: Exit code: 1
(nova.exception): TRACE: Stdout: ''
(nova.exception): TRACE: Stderr: "loop: can't delete device /dev/loop1: Device or resource busy\n"
(nova.exception): TRACE:
2011-09-04 16:18:32,218 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: rval = node_func(
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: raise Error(str(e))
(nova.rpc): TRACE: Error: Unexpected error while running command.
(nova.rpc): TRACE: Command: sudo losetup --detach /dev/loop1
(nova.rpc): TRACE: Exit code: 1
(nova.rpc): TRACE: Stdout: ''
(nova.rpc): TRACE: Stderr: "loop: can't delete device /dev/loop1: Device or resource busy\n"
Using these versions:
ii nova-common 2011.3~
ii nova-compute 2011.3~
ii nova-compute-kvm 2011.3~
My configuration:
--cc_host=
--ec2_url=http://
--ec2_host=
--rabbit_
--network_
--flat_
--fixed_
--network_size=256
--sql_connectio
--glance_
--image_
--network_
--vnc_console_
--vncproxy_url=http://
--vncproxy_
--vnc_enabled=False
--minimum_
--iscsi_
--libvirt_type=lxc
--use_cow_
My DB version:
44
Related branches
- OpenStack release team: Pending requested
-
Diff: 28 lines (+8/-7)1 file modifiednova/virt/disk.py (+8/-7)
- Dan Prince (community): Approve
- Vish Ishaya (community): Approve
-
Diff: 28 lines (+8/-7)1 file modifiednova/virt/disk.py (+8/-7)
tags: | added: lxc |
Changed in nova: | |
assignee: | nobody → Chuck Short (zulcss) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → 2011.3 |
status: | In Progress → Fix Committed |
Changed in nova: | |
status: | Fix Committed → Fix Released |