Bug 1000155

Summary: virsh secret-list does not list ceph and iscsi Usage information
Product: Red Hat Enterprise Linux 7 Reporter: John Ferlan <jferlan>
Component: libvirtAssignee: John Ferlan <jferlan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, chhu, cwei, dyuan, hannsj_uhl, jferlan, shiva.rkreddy, shyu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:32:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1156327    

Description John Ferlan 2013-08-22 20:11:16 UTC
Description of problem:

    When using virsh secret-list - if the secret types are cephx or iscsi,
    then allow fetch/print of the usage information. Prior to the change
    the following would print:
    
    UUID                                 Usage
    -----------------------------------------------------------
    1b40a534-8301-45d5-b1aa-11894ebb1735 Unused
    a5ba3efe-6adf-4a6a-b243-f010a043e314 Unused
    
 
Steps to Reproduce:
1. Create a ceph or iscsi secret (see http://libvirt.org/formatsecret.html)

# cat ceph-secret.xml

      <secret ephemeral='no' private='yes'>
         <description>CEPH passphrase example</description>
         <auth type='ceph' username='myname'/>
         <usage type='ceph'>
            <name>ceph_example</name>
         </usage>
      </secret>

# virsh secret-define ceph-secret.xml
Secret 1b40a534-8301-45d5-b1aa-11894ebb1735 created
#

2. virsh secret-list
3.



Expected results:
    UUID                                 Usage
    -----------------------------------------------------------
    1b40a534-8301-45d5-b1aa-11894ebb1735 ceph ceph_example

Comment 4 chhu 2013-10-10 03:11:40 UTC
Reproduced on libvirt-1.1.1-2.el7.x86_64,

Verified with package: 
libvirt-1.1.1-8.el7.x86_64

Test steps:
1. Create ceph and iscsi secrets:
# cat ceph-secret.xml
      <secret ephemeral='no' private='yes'>
         <description>ceph secret</description>
         <auth type='ceph' username='rhat'/>
         <usage type='ceph'>
            <name>ceph_example</name>
         </usage>
      </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 ceph-secret.xml
Secret 8ee3a570-24b2-439b-95e3-3bac0486123c created
# virsh secret-define iscsi-secret.xml
Secret e97e561f-2c9f-4274-b4d7-14626319bd42 created

2. virsh secret-list
# virsh secret-list
UUID                                 Usage
-----------------------------------------------------------
8ee3a570-24b2-439b-95e3-3bac0486123c ceph ceph_example
e97e561f-2c9f-4274-b4d7-14626319bd42 iscsi libvirtiscsi

Test results:
current command work well, so change the status to verified.

Comment 5 Ludek Smid 2014-06-13 10:32:17 UTC
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.

Comment 7 shiva.rkreddy 2014-10-23 03:25:39 UTC
Couple of questions related to this defect:
1. Is the issue limited to only "virsh secret-list" command, where it is not reporting the correct Usage value of the secret-key or there is some functional issue? 
2 Is the fix going to be back-ported to  RHEL 6.5 ?

Comment 8 John Ferlan 2014-10-23 15:49:15 UTC
1. The issue was prior to the fix that the secret usage types cephx and iscsi were not printing and only the volume type was printed.

For a list of secret usage type's see: http://libvirt.org/formatsecret.html

2. RHEL7 only so far.  There's been no request for RHEL6 backport.

Comment 9 Hanns-Joachim Uhl 2014-10-24 08:33:46 UTC
(In reply to John Ferlan from comment #8)
> 1. The issue was prior to the fix that the secret usage types cephx and
> iscsi were not printing and only the volume type was printed.
> 
> For a list of secret usage type's see: http://libvirt.org/formatsecret.html
> 
> 2. RHEL7 only so far.  There's been no request for RHEL6 backport.
.
fyi ... the RHEL6.5 bugzilla is now opened in RHBZ 1156327 - virsh secret-list does not list ceph and iscsi Usage information (libvirt) ...