can't terminate instance with attached volumes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Dean Troyer |
Bug Description
When I try to terminate an instance with attached volumes, I've got following exceptions.
2011-11-08 08:58:51,553 DEBUG nova.utils [-] Running cmd (subprocess): sudo iscsiadm -m node -T iqn.2003-
2011-11-08 08:58:51,576 DEBUG nova.utils [-] Result was 255 from (pid=27971) execute /usr/lib/
2011-11-08 08:58:51,584 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: return f(*args, **kw)
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: self._delete_
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: self._shutdown_
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: self.driver.
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: mountpoint)
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: return method(
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: self._iscsiadm_
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: return self._run_
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: *iscsi_command, run_as_root=True)
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: cmd=' '.join(cmd))
(nova.rpc): TRACE: ProcessExecutio
(nova.rpc): TRACE: Command: sudo iscsiadm -m node -T iqn.2003-
(nova.rpc): TRACE: Exit code: 255
(nova.rpc): TRACE: Stdout: ''
(nova.rpc): TRACE: Stderr: 'iscsiadm: no records found!\n'
----
I've checked codes, and it looks the cause is that nova-compute tries to disconnect volume twice.
first one runs when detaching volumes, second one runs when destroy instance.
So second try makes the excepion because there's no iscsi device, it already removed.
Please check this.
Thanks.
description: | updated |
Changed in nova: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in nova: | |
milestone: | none → essex-2 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-2 → 2012.1 |
The problem is not recognizing the exit code 255 as valid on the second call to disconnect_volume.
Proposed Icffeb0fe82 to not check exit codes on logout/delete.