[Pkg-xen-devel] Bug#717573: XCP: Cannot connect to iSCSI target
Vangelis Tasoulas
cyberang3l at gmail.com
Mon Jul 22 15:10:10 UTC 2013
Package: xcp-storage-managers
Version: 0.1.1-3
Severity: normal
XCP cannot use iscsi block devices. Fails with iscsiadm: No active sessions.
I ran the following commands trying to diagnose the problem:
First introducing a SR and then creating a PBD with the needed configuration for the iscsi block device. These steps work fine but when I tried to plug the PBD I got the error:
root at xcpcompute1:~# SR_UUID=$(uuidgen)
root at xcpcompute1:~# SR_NAME_LABEL="Test-${SR_UUID}"
root at xcpcompute1:~# xe sr-introduce name-label=${SR_NAME_LABEL} type=iscsi uuid=${SR_UUID}
43223068-01e5-4c3e-b9ff-0d33fa89fab8
root at xcpcompute1:~# . /etc/xcp/inventory
root at xcpcompute1:~# PBD_UUID=`xe pbd-create host-uuid=${INSTALLATION_UUID} sr-uuid=${SR_UUID} device-config-target=192.168.200.51 device-config-targetIQN=iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c device-config-port=3260`
root at xcpcompute1:~# xe pbd-plug uuid=${PBD_UUID}
The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
message: Failure("Storage_access failed with: SR_BACKEND_FAILURE_202: [ ; General backend error [opterr=rc: 21, stdout: , stderr: iscsiadm: No active sessions.\n]; ]")
By running the iscsiadm -m session command, it looks like there are no active sessions indeed:
root at xcpcompute1:~# iscsiadm -m session
iscsiadm: No active sessions.
Initiating a session manually and retrying to plug the PBD works:
root at xcpcompute1:~# iscsiadm -m discovery -t st -p 192.168.200.51
192.168.200.51:3260,1 iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c
root at xcpcompute1:~# iscsiadm -m node -p 192.168.200.51 -T iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c -l
Logging in to [iface: default, target: iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c, portal: 192.168.200.51,3260] (multiple)
Login to [iface: default, target: iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c, portal: 192.168.200.51,3260] successful.
root at xcpcompute1:~# iscsiadm -m session
tcp: [1] 192.168.200.51:3260,1 iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c
root at xcpcompute1:~# xe pbd-plug uuid=${PBD_UUID}
But unplugging is not working again and fails with the same error:
root at xcpcompute1:~# xe pbd-unplug uuid=${PBD_UUID}
The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
message: Failure("Storage_access failed with: SR_BACKEND_FAILURE_202: [ ; General backend error [opterr=rc: 21, stdout: , stderr: iscsiadm: No active sessions.\n]; ]")
root at xcpcompute1:~# iscsiadm -m session
iscsiadm: No active sessions.
I tried to login again manually to unplug the device but this only worked for plugging. Not for unplugging. The only way I managed to unplug the PDB after it was plugged, it was to stop the open-iscsi service.
root at xcpcompute1:~# iscsiadm -m node -p 192.168.200.51 -T iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c -l
Logging in to [iface: default, target: iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c, portal: 192.168.200.51,3260] (multiple)
Login to [iface: default, target: iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c, portal: 192.168.200.51,3260] successful.
root at xcpcompute1:~# iscsiadm -m session
tcp: [2] 192.168.200.51:3260,1 iqn.2010-10.org.openstack:volume-0cb7018c-abbb-46be-b746-113f8eaf0e5c
root at xcpcompute1:~# xe pbd-unplug uuid=${PBD_UUID}
The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
message: Failure("Storage_access failed with: SR_BACKEND_FAILURE_202: [ ; General backend error [opterr=rc: 21, stdout: , stderr: iscsiadm: No active sessions.\n]; ]")
root at xcpcompute1:~# service open-iscsi stop
[ ok ] Unmounting iscsi-backed filesystems: Unmounting all devices marked _netdev.
[....] Disconnecting iSCSI targets:iscsiadm: No matching sessions found
.. ok
[ ok ] Stopping iSCSI initiator service:.
root at xcpcompute1:~# xe pbd-unplug uuid=${PBD_UUID}
root at xcpcompute1:~# echo $?
0
It looks like the iscsiadm commands executed by xcp cannot login to the iSCSI target but they can succesfully terminate the sessions.
-- System Information:
Debian Release: 7.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xcp-storage-managers depends on:
ii blktap-utils 2.0.90-1
ii libc6 2.13-38
ii libxenstore3.0 4.1.4-3+deb7u1
ii open-iscsi 2.0.873-3
ii python 2.7.3-4
ii python2.7 2.7.3-6
ii sg3-utils 1.33-1
ii uuid-runtime 2.20.1-5.3
Versions of packages xcp-storage-managers recommends:
ii lvm2 2.02.95-7
ii nfs-common 1:1.2.6-4
xcp-storage-managers suggests no packages.
-- no debconf information
More information about the Pkg-xen-devel
mailing list