Bug 1955667 - blockCopy succeeds, but target volume "not assigned to domain" after pivot [rhel-8.4.0.z]
Summary: blockCopy succeeds, but target volume "not assigned to domain" after pivot [r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 8.4
Assignee: Peter Krempa
QA Contact: Meina Li
URL:
Whiteboard:
Depends On: 1951507
Blocks: 1957776
TreeView+ depends on / blocked
 
Reported: 2021-04-30 15:58 UTC by RHEL Program Management Team
Modified: 2021-11-04 19:28 UTC (History)
18 users (show)

Fixed In Version: libvirt-7.0.0-14.1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1951507
Environment:
Last Closed: 2021-06-02 15:12:05 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:2202 0 None None None 2021-06-02 15:12:10 UTC

Comment 1 Peter Krempa 2021-04-30 18:01:05 UTC
Scratch build:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=36435438

I've also already sent the backport earlier before this bug was cloned (Jirka will fix the bug link):

https://mailman-int.corp.redhat.com/archives/rhvirt-patches/2021-April/msg00170.html

Comment 5 Meina Li 2021-05-20 06:35:53 UTC
Test with scratch build:
libvirt-7.0.0-15.el8_rc.51bc9b53a8.x86_64
qemu-kvm-5.2.0-16.module+el8.4.0+10806+b7d97207.x86_64

Test Steps:
# cat test.sh
#!/bin/bash

DOMAIN=lmn
DISK=sda
TDISK="/dev/sdc"
LOG_FILE="/var/log/libvirt/libvirtd.log"
FIND_STR="not assigned to domain"

rm -rf /tmp/$DOMAIN.s*
for i in {1..100}
do
    echo "------$i------"
    virsh destroy $DOMAIN
    virsh create $DOMAIN.xml;
    sleep 3;
    virsh snapshot-create-as $DOMAIN --disk-only --diskspec $DISK,file=/tmp/$DOMAIN.s$i;
    virsh blockcopy $DOMAIN $DISK $TDISK --wait --verbose;
    sleep 2;
    virsh blockjob $DOMAIN $DISK --pivot;
    virsh dumpxml $DOMAIN | grep /disk -B8
    virsh domblkthreshold $DOMAIN $DISK 100 
    virsh domstats $DOMAIN --block --backing
    if [ `grep -c "$FIND_STR" $LOG_FILE` -ne '0' ]; then
        break
    else
        continue
    fi
done

# sh test.sh
......
------100------
Domain 'lmn' destroyed

Domain 'lmn' created from lmn.xml

Domain snapshot 1621492378 created
Block Copy: [100 %]
Now in mirroring phase

    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/dev/sdc' index='3'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Domain: 'lmn'
  block.count=1
  block.0.name=sda
  block.0.path=/dev/sdc
  block.0.backingIndex=3
  block.0.rd.reqs=1
  block.0.rd.bytes=512
  block.0.rd.times=94530
  block.0.wr.reqs=0
  block.0.wr.bytes=0
  block.0.wr.times=0
  block.0.fl.reqs=0
  block.0.fl.times=0
  block.0.allocation=1074135040
  block.0.capacity=1073741824
  block.0.physical=0
  block.0.threshold=100

Comment 9 Meina Li 2021-05-26 01:14:00 UTC
Also do the basic test with the libvirt-7.0.0-14.1.module+el8.4.0+11095+d46acebf.x86_64 and the test script in Comment 5:
# sh test.sh
......
------100------
Domain 'lmn' destroyed

Domain 'lmn' created from lmn.xml

Domain snapshot 1621991597 created
Block Copy: [100 %]
Now in mirroring phase

    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source dev='/dev/sdc' index='3'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Domain: 'lmn'
  block.count=1
  block.0.name=sda
  block.0.path=/dev/sdc
  block.0.backingIndex=3
  block.0.rd.reqs=1
  block.0.rd.bytes=512
  block.0.rd.times=92180
  block.0.wr.reqs=0
  block.0.wr.bytes=0
  block.0.wr.times=0
  block.0.fl.reqs=0
  block.0.fl.times=0
  block.0.allocation=1074135040
  block.0.capacity=1073741824
  block.0.physical=2147483648
  block.0.threshold=100

Both the auto test and the manual test were passed. So move this bug to be verified.

Comment 13 errata-xmlrpc 2021-06-02 15:12:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt:av bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2202


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