While working on the tests for the secret initialization vector, I found that the existing iSCSI tests were lacking in how they defined the IQN. Many had IQN's of just 'iqn.1992-01.com.example' for one disk while using 'iqn.1992-01.com.example/1' for the second disk (same for hostdevs - guess how they were copied/generated). Typically (and documented this way), IQN's would include be of the form 'iqn.1992-01.com.example:storage/1' indicating an IQN using "storage" for naming authority specific string and "/1" for the iSCSI LUN. So modify the input XML's to use the more proper format - this of course has a ripple effect on the output XML and the args. Also note that the "%3A" is generated by the virURIFormat/xmlSaveUri to represent the colon. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- .../qemuargv2xml-disk-drive-network-iscsi-auth.args | 6 +++--- .../qemuargv2xml-disk-drive-network-iscsi-auth.xml | 4 ++-- .../qemuxml2argv-disk-drive-network-iscsi-auth.args | 8 +++++--- .../qemuxml2argv-disk-drive-network-iscsi-auth.xml | 7 +++++-- .../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args | 4 ++-- .../qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml | 4 ++-- .../qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args | 4 ++-- .../qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml | 4 ++-- .../qemuxml2xmlout-disk-drive-network-iscsi-auth.xml | 7 +++++-- .../qemuxml2xmlout-hostdev-scsi-lsi-iscsi-auth.xml | 4 ++-- .../qemuxml2xmlout-hostdev-scsi-virtio-iscsi-auth.xml | 4 ++-- 11 files changed, 32 insertions(+), 24 deletions(-) diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args index 5bebcae..44c9506 100644 --- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args +++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args @@ -17,9 +17,9 @@ QEMU_AUDIO_DRV=none \ -boot c \ -usb \ -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ -6000/iqn.1992-01.com.example,format=raw,if=virtio \ --drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,format=raw,\ -if=virtio \ +6000/iqn.1992-01.com.example%3Astorage/1,format=raw,if=virtio \ +-drive file=iscsi://example.org:6000/iqn.1992-01.com.example%3Astorage/2,\ +format=raw,if=virtio \ -net none \ -serial none \ -parallel none diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml index 35b3abc..b5f948b 100644 --- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml +++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml @@ -19,14 +19,14 @@ <auth username='myname'> <secret type='iscsi' usage='qemuargv2xml_usage'/> </auth> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='6000'/> </source> <target dev='vda' bus='virtio'/> </disk> <disk type='network' device='disk'> <driver name='qemu' type='raw'/> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='6000'/> </source> <target dev='vdb' bus='virtio'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args index 735a0ae..66e2497 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args @@ -18,10 +18,12 @@ QEMU_AUDIO_DRV=none \ -boot c \ -usb \ -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ -6000/iqn.1992-01.com.example,format=raw,if=none,id=drive-virtio-disk0 \ +6000/iqn.1992-01.com.example%3Astorage/1,format=raw,if=none,\ +id=drive-virtio-disk0 \ -device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\ id=virtio-disk0 \ --drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,format=raw,\ -if=none,id=drive-virtio-disk1 \ +-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ +6000/iqn.1992-01.com.example%3Astorage/2,format=raw,if=none,\ +id=drive-virtio-disk1 \ -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,\ id=virtio-disk1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml index 5ac4abf..1f80d3b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml @@ -19,14 +19,17 @@ <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> </auth> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='6000'/> </source> <target dev='vda' bus='virtio'/> </disk> <disk type='network' device='disk'> <driver name='qemu' type='raw'/> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='6000'/> </source> <target dev='vdb' bus='virtio'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args index 2bd98e5..ff6655f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args @@ -21,9 +21,9 @@ QEMU_AUDIO_DRV=none \ -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ -3260/iqn.1992-01.com.example,if=none,format=raw,id=drive-hostdev0 \ +3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev0,id=hostdev0 \ -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ -3260/iqn.1992-01.com.example/1,if=none,format=raw,id=drive-hostdev1 \ +3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev1 \ -device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml index ed2bf25..f988165 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml @@ -26,7 +26,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> @@ -35,7 +35,7 @@ <address type='drive' controller='0' bus='0' target='0' unit='4'/> </hostdev> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args index 624be94..42113c8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args @@ -21,11 +21,11 @@ QEMU_AUDIO_DRV=none \ -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ -3260/iqn.1992-01.com.example,if=none,format=raw,id=drive-hostdev0 \ +3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,drive=drive-hostdev0,\ id=hostdev0 \ -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@xxxxxxxxxxx:\ -3260/iqn.1992-01.com.example/1,if=none,format=raw,id=drive-hostdev1 \ +3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev1 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,drive=drive-hostdev1,\ id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml index 33577ab..b70b84e 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml @@ -26,7 +26,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> @@ -35,7 +35,7 @@ <address type='drive' controller='0' bus='0' target='2' unit='4'/> </hostdev> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi-auth.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi-auth.xml index 4f0e87f..fc8aba1 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi-auth.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi-auth.xml @@ -19,7 +19,7 @@ <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> </auth> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='6000'/> </source> <target dev='vda' bus='virtio'/> @@ -27,7 +27,10 @@ </disk> <disk type='network' device='disk'> <driver name='qemu' type='raw'/> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='6000'/> </source> <target dev='vdb' bus='virtio'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-lsi-iscsi-auth.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-lsi-iscsi-auth.xml index 5ed4095..1db5ed9 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-lsi-iscsi-auth.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-lsi-iscsi-auth.xml @@ -32,7 +32,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> @@ -41,7 +41,7 @@ <address type='drive' controller='0' bus='0' target='0' unit='4'/> </hostdev> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-virtio-iscsi-auth.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-virtio-iscsi-auth.xml index a5d3b8e..64c149f 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-virtio-iscsi-auth.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-virtio-iscsi-auth.xml @@ -32,7 +32,7 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> @@ -41,7 +41,7 @@ <address type='drive' controller='0' bus='0' target='2' unit='4'/> </hostdev> <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> <host name='example.org' port='3260'/> <auth username='myname'> <secret type='iscsi' usage='mycluster_myname'/> -- 2.5.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list