Bug 1467271 - <auth> element missing after shallow blockcopy and blockcommit
<auth> element missing after shallow blockcopy and blockcommit
Status: CLOSED DUPLICATE of bug 1171569
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Libvirt Maintainers
Virtualization Bugs
Depends On:
Blocks: 1467287
  Show dependency treegraph
Reported: 2017-07-03 05:50 EDT by Han Han
Modified: 2017-07-03 06:55 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1467287 (view as bug list)
Last Closed: 2017-07-03 06:55:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Han Han 2017-07-03 05:50:52 EDT
Description of problem:
As subject

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Prepare a CHAP iscsi server. Define a libvirt secret object and set the password in the secret.
2. Start VM on iscsi backend with authorization like this:
 <disk type='network' device='disk' snapshot='no'>
      <driver name='qemu' type='raw'/>
      <auth username='redhat'>
        <secret type='iscsi' usage='libvirtiscsi'/>
      <source protocol='iscsi' name='iqn.2016-12.com.virttest:emulated-iscsi-auth.target6/0'>
        <host name='XX.XX.XX.XX'/>
      <target dev='vdi' bus='virtio'/>
      <alias name='virtio-disk8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>

3. Create a external snapshot for the disk. Then do shallow blockcopy and blockcommit:
# virsh snapshot-create-as hh s1 --no-metadata --disk-only --diskspec vdi,file=/var/lib/libvirt/images/hh-vdi.s1
Domain snapshot s1 created

# virsh blockcopy hh vdi /var/lib/libvirt/images/hh-vdi.s1.copy --shallow --pivot --wait --verbose --transient-job
Block Copy: [100 %]

# virsh blockcommit hh vdi --shallow --keep-relative --wait --verbose --pivot
Block commit: [100 %]

# virsh dumpxml hh
<disk type="network" device="disk" snapshot="no">
      <driver name="qemu" type="raw"/>
      <source protocol="iscsi" name="iqn.2016-12.com.virttest:emulated-iscsi-auth.target6/0">
        <host name=""/>
      <target dev="vdi" bus="virtio"/>
      <alias name="virtio-disk8"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x11" function="0x0"/>

<auth> is missing.

Actual results:
As above

Expected results:
<auth> remains after these operations

Additional info:
Without shallow blockcopy, this bug cannot be reproduced with blockcommit only.
Comment 2 Peter Krempa 2017-07-03 06:55:17 EDT
I've repurposed bug 1171569 to track all blockjobs and all protocols, since it does not make sense to file separate bugs for the same issue.

*** This bug has been marked as a duplicate of bug 1171569 ***

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