return code for "iscsiadm: No records found" is 21

Bug #932356 reported by Derek Higgins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Derek Higgins

Bug Description

While running smoketests on Fedora 16, some of the volume tests fail with the following
error in the logs

ERROR nova.compute.manager [req-d0087fc6-d31c-41a2-b422-f94f1f75411e admin nova] instance 36c8f65e-50e3-487b-a823-f4c11de4a617: attach failed /dev/vdb, removing
TRACE: Traceback (most recent call last):
TRACE: File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1616, in attach_volume
TRACE: mountpoint)
TRACE: File "/usr/lib/python2.7/site-packages/nova/exception.py", line 126, in wrapped
TRACE: return f(*args, **kw)
TRACE: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/connection.py", line 455, in attach_volume
TRACE: mount_device)
TRACE: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/connection.py", line 447, in volume_driver_method
TRACE: return method(connection_info, *args, **kwargs)
TRACE: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/volume.py", line 115, in connect_volume
TRACE: self._run_iscsiadm(iscsi_properties, ())
TRACE: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/volume.py", line 96, in _run_iscsiadm
TRACE: check_exit_code=check_exit_code)
TRACE: File "/usr/lib/python2.7/site-packages/nova/utils.py", line 230, in execute
TRACE: cmd=' '.join(cmd))
TRACE: ProcessExecutionError: Unexpected error while running command.
TRACE: Command: sudo nova-rootwrap iscsiadm -m node -T iqn.2010-10.org.openstack:volume-00000001 -p 172.19.0.3:3260
TRACE: Exit code: 21
TRACE: Stdout: ''
TRACE: Stderr: 'iscsiadm: No records found\n'
TRACE:

root@nova1 log]# iscsiadm --version
iscsiadm version 2.0-872.15.f16

According to return values in the the man page
21 ISCSI_ERR_NO_OBJS_FOUND - no records/targets/sessions/portals found to execute operation on.

looks like the return values were added in iscsiadm, in this commit

commit 2c839a208413b88878ac56f138b5423bba893785
Author: Mike Christie <email address hidden>
Date: Sun Jan 30 22:49:56 2011 -0600

Version 872 was created on Mar 24 02:49:10 2010

Ubuntu 10.04 has
derekh@vm9475:~$ iscsiadm --version
iscsiadm version 2.0-871

Derek Higgins (derekh)
Changed in nova:
assignee: nobody → Derek Higgins (derekh)
status: New → In Progress
Revision history for this message
Derek Higgins (derekh) wrote :

I have Fix ready, waiting on another commit to be merged that contains Author details

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/4188

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/4188
Committed: http://github.com/openstack/nova/commit/99b9691e3c9fecc7b2f86cfe77c3bab98776deb8
Submitter: Jenkins
Branch: master

commit 99b9691e3c9fecc7b2f86cfe77c3bab98776deb8
Author: Derek Higgins <email address hidden>
Date: Tue Feb 14 21:48:59 2012 +0000

    Different exit code in new versions of iscsiadm

    Fixes bug #932356
    For "iscsiadm: No records found"
    if version <= 2.0-871 iscsiadm returns 255
    newer versions return 21

    Change-Id: Ib4319ed11b20a339b439c70574d0d45acc8814fa

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.