[Nova-volume][tgtd] Failed to detach volume / delete instance when target is already disconnected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Chuck Short |
Bug Description
[root@camel-nova nova]# nova volume-attach toattach 17 /dev/vdd
[root@camel-vdsa ~]# iscsiadm -m session
tcp: [21] 10.35.97.20:3260,1 iqn.2010-
[root@camel-vdsa ~]# iscsiadm -m session -u
Logging out of session [sid: 21, target: iqn.2010-
Logout of [sid: 21, target: iqn.2010-
[root@camel-nova nova]# nova volume-detach toattach 17
Compute.log:
2012-06-10 16:52:09 ERROR nova.rpc.amqp [req-691b5982-
2012-06-10 16:52:09 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp rval = node_func(
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp return f(*args, **kw)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp function(self, context, instance_uuid, *args, **kwargs)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp sys.exc_info())
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib64/
2012-06-10 16:52:09 TRACE nova.rpc.amqp self.gen.next()
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp return function(self, context, instance_uuid, *args, **kwargs)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp self._detach_
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp mp)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp return f(*args, **kw)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp mount_device)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp return method(
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp retval = f(*args, **kwargs)
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp check_exit_code=[0, 255])
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp check_exit_
2012-06-10 16:52:09 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-10 16:52:09 TRACE nova.rpc.amqp cmd=' '.join(cmd))
2012-06-10 16:52:09 TRACE nova.rpc.amqp ProcessExecutio
2012-06-10 16:52:09 TRACE nova.rpc.amqp Command: sudo nova-rootwrap iscsiadm -m node -T iqn.2010-
2012-06-10 16:52:09 TRACE nova.rpc.amqp Exit code: 21
2012-06-10 16:52:09 TRACE nova.rpc.amqp Stdout: ''
2012-06-10 16:52:09 TRACE nova.rpc.amqp Stderr: 'iscsiadm: No matching sessions found\n'
2012-06-10 16:52:09 TRACE nova.rpc.amqp
[root@camel-nova nova]# nova volume-list
+----+-
| ID | Status | Display Name | Size | Volume Type | Attached to |
| 17 | in-use | a | 1 | None | 704340ab-
[root@camel-nova nova]# nova delete toattach
[same error in compute log]
2012-06-10 16:54:52 TRACE nova.rpc.amqp Command: sudo nova-rootwrap iscsiadm -m node -T iqn.2010-
2012-06-10 16:54:52 TRACE nova.rpc.amqp Exit code: 21
2012-06-10 16:54:52 TRACE nova.rpc.amqp Stdout: ''
2012-06-10 16:54:52 TRACE nova.rpc.amqp Stderr: 'iscsiadm: No matching sessions found\n'
[root@camel-nova nova]# nova list
+------
| ID | Name | Status | Networks |
+------
| 704340ab-
+------
Changed in nova: | |
assignee: | nobody → Chuck Short (zulcss) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → folsom-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-rc1 → 2012.2 |
Reviewed: https:/ /review. openstack. org/11930 github. com/openstack/ nova/commit/ 9135f836151df4b c32e3c3fea208e3 cee6f7d6dc
Committed: http://
Submitter: Jenkins
Branch: master
commit 9135f836151df4b c32e3c3fea208e3 cee6f7d6dc
Author: Chuck Short <email address hidden>
Date: Fri Aug 24 10:48:09 2012 -0500
Trap iscsiadm error
If the iscsitarget was previously deleted and the user tries
to delete the iscsi target again, then you get a nasty traceback
in the logfiles.
According to the iscsiadm man page, iscsiadm returns an error 21, ERR_NO_ OBJS_FOUND if there is no records/ targets/ sessions/ portals
ISCSI_
found to execute the operation on.
LP: #1011166
Change-Id: I3087c1a114fe91 bd7361d92688d4f 926bc3f8951
Signed-off-by: Chuck Short <email address hidden>