Bug 1019023 - Print a string rather than literally the uuid value in the virsh command line error message
Print a string rather than literally the uuid value in the virsh command line...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-14 22:13 EDT by chhu
Modified: 2014-06-17 20:57 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-1.1.1-9.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:47:58 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 chhu 2013-10-14 22:13:33 EDT
Description of problem:

Print a string rather than literally the uuid value in the virsh command line error message

Version-Release number of selected component (if applicable):
libvirt-1.1.1-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. set iSCSI target for CHAP authentication:
default-driver iscsi
<target iqn.2013-10.com.example:iscsi>
     backing-store /dev/sdb
     incominguser rhat rhatrhat
</target>
# service tgtd restart

2. define the secret
# cat iscsi-secret.xml
      <secret ephemeral='no' private='yes'>
         <description>iSCSI secret</description>
         <auth type='chap' username='rhat'/>
         <usage type='iscsi'>
            <target>libvirtiscsi</target>
         </usage>
      </secret>

# virsh secret-list
UUID                                 Usage
-----------------------------------------------------------
3203010b-ccb1-48a2-b01e-d2187319d7eb iscsi libvirtiscsi

# MYSECRET=`printf %s "mysecret" | base64`
# virsh secret-set-value 3203010b-ccb1-48a2-b01e-d2187319d7eb $MYSECRET
Secret value set

3. start a domain with xml below:
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw'/>
      <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/0'>
        <host name='hostname' port='3260'/>
      </source>
      <auth username='rhat'>
        <secret type='iscsi' uuid='e97e561f-2c9f-4274-b4d7-14626319b000'/>
      </auth>
      <target dev='vda' bus='virtio'/>
    </disk>

# virsh create rh7-qcow2.xml
error: Failed to create domain from rh7-qcow2.xml
        error: Secret not found: iscsi no secret matches uuid '�~V^_,�Bt��bc�'

Actual results:
Step3 Print literally the uuid value

Expected results:
Step3 Print a string of the uuid
Comment 1 Ján Tomko 2013-10-15 04:34:37 EDT
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-October/msg00654.html
Comment 2 Ján Tomko 2013-10-15 06:37:56 EDT
Fixed upstream by:
commit 15fac93b951eb67553ca64443c740c1b975696a9
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2013-10-15 10:29:18 +0200
Commit:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2013-10-15 12:30:21 +0200

    Convert uuid to a string before printing it
    
    Introduced by 1fa7946.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1019023

git describe: v1.1.3-134-g15fac93
Comment 5 chhu 2013-10-16 04:22:13 EDT
Verified with package:
libvirt-1.1.1-9.el7.x86_64


Test steps:
1. set iSCSI target for CHAP authentication:
default-driver iscsi
<target iqn.2013-10.com.example:iscsi>
     backing-store /dev/sdc
     incominguser rhat rhatrhat
</target>
# service tgtd restart

2. define the secret
# cat iscsi-secret.xml
      <secret ephemeral='no' private='yes'>
         <description>iSCSI secret</description>
         <auth type='chap' username='rhat'/>
         <usage type='iscsi'>
            <target>libvirtiscsi</target>
         </usage>
      </secret>

# virsh secret-define iscsi-secret.xml 
Secret ff47c6db-c351-43fd-b1e0-f35d2afc9895 created

# virsh secret-list
UUID                                 Usage
-----------------------------------------------------------
ff47c6db-c351-43fd-b1e0-f35d2afc9895 iscsi libvirtiscsi

3. start a domain with xml below:
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw'/>
      <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/0'>
        <host name='hostname' port='3260'/>
      </source>
      <auth username='rhat'>
        <secret type='iscsi' uuid='e97e561f-2c9f-4274-b4d7-14626319b000'/>
      </auth>
      <target dev='vda' bus='virtio'/>
    </disk>

# virsh create rh7-qcow2.xml 
error: Failed to create domain from rh7-qcow2.xml
error: Secret not found: iscsi no secret matches uuid 'e97e561f-2c9f-4274-b4d7-14626319b000'

Test results:
Print a string of the uuid, change the bug status to verified.
Comment 6 Ludek Smid 2014-06-13 05:47:58 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.