Bug 1514930

Summary: The doc of the matrix about configuration file handling in migration is not correct.
Product: Red Hat Enterprise Linux 7 Reporter: Lili Zhu <lizhu>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Lili Zhu <lizhu>
Severity: low Docs Contact:
Priority: low    
Version: 7.5CC: dyuan, lmiksik, rbalakri, xuzhang, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-3.9.0-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 11:00:58 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:
Embargoed:
Attachments:
Description Flags
The matrix about configuration file handling in migration none

Description Lili Zhu 2017-11-19 14:31:07 UTC
Created attachment 1355176 [details]
The matrix about configuration file handling in migration

Description of problem:

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

Steps to Reproduce:

Now Row 5 and Row 6 of the matrix about configuration file handling in all possible state and flag combinations are as follows(refer to the attached file):

Transient 	N 	Y 	N 	N 	Transient 	N 	N
Transient 	N 	Y 	Y 	N 	Transient 	N 	N


Expected results:
Before migration, if the Dest config is Y, then after migration, the target 
type is persistent, and the Dest config is Y.
It should be:
Transient 	N 	Y 	N 	N 	Persistent 	N 	Y
Transient 	N 	Y 	Y 	N 	Persistent 	N 	Y

Comment 2 Jiri Denemark 2017-12-08 09:43:34 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-December/msg00281.html

Comment 3 Jiri Denemark 2017-12-08 15:19:43 UTC
Fixed upstream by

commit 2c01e4febcd161226ce707892d8e53f4e66f708f
Refs: v3.10.0-39-g2c01e4febc
Author:     Jiri Denemark <jdenemar>
AuthorDate: Fri Dec 8 10:31:38 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Fri Dec 8 15:50:52 2017 +0100

    migration.html: Clarify configuration file handling docs

    Migration never removes any configuration files on the destination host.
    Thus when the domain is already defined on the destination, it will stay
    persistent even after migration without --persist.

    https://bugzilla.redhat.com/show_bug.cgi?id=1514930

    Signed-off-by: Jiri Denemark <jdenemar>

Comment 6 Lili Zhu 2017-12-18 03:19:52 UTC
Verified this bug with libvirt-3.9.0-6.el7.x86_64

Now the issues in the bug description have been modified.

For the new added description, taking Row 5 and Row 7 for example,

Transient  N     Y     N      N     Persistent 	  N 	     Y
                                                     (unchanged dest config) 
Transient  N     Y     N      Y     Persistent 	  N 	     Y
                                                     (replaced with source)
verification procedures are as follows:

For Row 5:
1. on source host, prepare a transient guest 

# virsh list --transient
 Id    Name                           State
----------------------------------------------------
 6     mig15                          running

# virsh dumpxml mig15
...
   <video>
      <model type=**'cirrus'** vram='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
...

2. on dest host, prepare a guest with configuration file

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     mig15                          shut off

# virsh dumpxml mig15
   <video>
      <model type=**'qxl'** ram='65536' vram='16384' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

3. migrate the guest to dest host
# virsh migrate mig15 --live qemu+ssh://10.66.4.117/system

4.check the guest status
# virsh list --persistent
 Id    Name                           State
----------------------------------------------------
 9     mig15                          running

#  virsh dumpxml mig15 --inactive
    <video>
      <model type=**'qxl'** ram='65536' vram='16384' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

As you can see, the config file of guest on target is not been changed after migration. Row 6, 13, 14 are the same with the case of Row 5.


For Row 7:
Step 1-3 are the same with the ones in the verification procedures of Row 5. After migration, check the status on dest host
# virsh dumpxml mig15 --inactive
...
    <video>
      <model type=**'cirrus'** vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
...

Now the config file of guest on target has been replaced with the source config file. Row 8, 15, 16 are the same with the case of Row 7.

As the results match with the expectation, move it to verified.

Comment 10 errata-xmlrpc 2018-04-10 11:00:58 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, 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/RHEA-2018:0704