Bug 1006468 - libiscsi initiator name should use vm UUID
libiscsi initiator name should use vm UUID
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On: 923843
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 12:34 EDT by Paolo Bonzini
Modified: 2014-06-17 23:36 EDT (History)
7 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-13.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 07:21:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paolo Bonzini 2013-09-10 12:34:03 EDT
The virtual machine UUID has the right characteristics for an initiator name.  However, QEMU is not using it.

The initiator name can be found with "tgtadm --lld iscsi --mode target --op show", for example:

    I_T nexus information:
        I_T nexus: 9
            Initiator: iqn.2008-11.org.linux-kvm:vmname alias: 
            Connection: 0
                IP Address: 127.0.0.1

Sample QEMU invocations:

qemu-kvm \
  iscsi://127.0.0.1/iqn.2003-01.org.linux-iscsi.san01.x8664:sn.05135a0e4a11/1 \
  -vnc :1 -m 512 -S -name vmname

     => initiator name should end with "vmname"

qemu-kvm \
  iscsi://127.0.0.1/iqn.2003-01.org.linux-iscsi.san01.x8664:sn.05135a0e4a11/1 \
  -vnc :1 -m 512 -S -uuid `uuidgen` -name vmname

     => initiator name should end with the UUID

qemu-kvm \
  iscsi://127.0.0.1/iqn.2003-01.org.linux-iscsi.san01.x8664:sn.05135a0e4a11/1 \
  -vnc :1 -m 512 -S -uuid `uuidgen`

     => initiator name should end with the UUID

qemu-kvm \
  iscsi://127.0.0.1/iqn.2003-01.org.linux-iscsi.san01.x8664:sn.05135a0e4a11/1 \
  -vnc :1 -m 512 -S -uuid 00000000-0000-0000-0000-000000000000 -name vmname

     => initiator name should end with "vmname"
Comment 2 Paolo Bonzini 2013-09-12 13:49:43 EDT
Upstream commit 5accc8408f2dac1e00d888e4fe75e6174ba2a940.
Comment 3 Miroslav Rezanina 2013-11-05 03:39:34 EST
Fix included in qemu-kvm-1.5.3-13.el7
Comment 5 Xu Han 2013-11-26 04:38:02 EST
Reproduce this bug with component:
qemu-kvm-rhev-1.5.3-12.el7.x86_64

Steps:
1. boot guest using libiscsi backend.

-> Scenario 1, set '-name'.
# /usr/libexec/qemu-kvm -M pc -m 4G -vnc :1 -monitor stdio -drive file=iscsi://$iscsi_server_ip/iqn.2013-11.com.example:storage.disk1.juli.xyz/1,if=none,id=iscsi -device ide-hd,drive=iscsi,id=disk -S -name iscsi-initiator-test

-> Scenario 2, set '-uuid' and '-name'.
# /usr/libexec/qemu-kvm -M pc -m 4G -vnc :1 -monitor stdio -drive file=iscsi://$iscsi_server_ip/iqn.2013-11.com.example:storage.disk1.juli.xyz/1,if=none,id=iscsi -device ide-hd,drive=iscsi,id=disk -S -uuid `uuidgen` -name iscsi-initiator-test

-> Scenario 3, set '-uuid'.
# /usr/libexec/qemu-kvm -M pc -m 4G -vnc :1 -monitor stdio -drive file=iscsi://$iscsi_server_ip/iqn.2013-11.com.example:storage.disk1.juli.xyz/1,if=none,id=iscsi -device ide-hd,drive=iscsi,id=disk -S -uuid `uuidgen`

-> Scenario 4, set '-uuid 00000000-0000-0000-0000-000000000000' and '-name'.
# /usr/libexec/qemu-kvm -M pc -m 4G -vnc :1 -monitor stdio -drive file=iscsi://$iscsi_server_ip/iqn.2013-11.com.example:storage.disk1.juli.xyz/1,if=none,id=iscsi -device ide-hd,drive=iscsi,id=disk -S -uuid 00000000-0000-0000-0000-000000000000 -name iscsi-initiator-test

2. check initiator name on iscsi server.
# tgtadm --lld iscsi --mode target --op show

Results:
Scenario 1,
        I_T nexus: 304
            Initiator: iqn.2008-11.org.linux-kvm:iscsi-initiator-test
            Connection: 0

Scenario 2,
        I_T nexus: 305
            Initiator: iqn.2008-11.org.linux-kvm:iscsi-initiator-test
            Connection: 0

Scenario 3,
        I_T nexus: 306
            Initiator: iqn.2008-11.org.linux-kvm
            Connection: 0

Scenario 4,
        I_T nexus: 307
            Initiator: iqn.2008-11.org.linux-kvm:iscsi-initiator-test
            Connection: 0

Verify this bug with component:
qemu-kvm-rhev-1.5.3-19.el7.x86_64

Same steps as above.

Results:
Scenario 1,
        I_T nexus: 309
            Initiator: iqn.2008-11.org.linux-kvm:iscsi-initiator-test
            Connection: 0

Scenario 2,
        I_T nexus: 310
            Initiator: iqn.2008-11.org.linux-kvm:34f31ce4-9347-40ca-a0bb-62109f8cb8ae
            Connection: 0
(qemu) info uuid 
34f31ce4-9347-40ca-a0bb-62109f8cb8ae

Scenario 3,
        I_T nexus: 311
            Initiator: iqn.2008-11.org.linux-kvm:a03340b5-d19a-4186-a2c1-f5431a9401fa
            Connection: 0
(qemu) info uuid 
a03340b5-d19a-4186-a2c1-f5431a9401fa

Scenario 4,
        I_T nexus: 312
            Initiator: iqn.2008-11.org.linux-kvm:iscsi-initiator-test
            Connection: 0


Base on these test results above, this bug has been fixed.
Comment 7 Ludek Smid 2014-06-13 07:21:31 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.