Bug 1343858
| Summary: | Guest image owner changes to root:root if kill source libvirtd in migration confirm phase. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Fangge Jin <fjin> | ||||
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | ||||
| Status: | CLOSED ERRATA | QA Contact: | yafu <yafu> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.3 | CC: | dyuan, mzhan, rbalakri, xuzhang, yafu, zpeng | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libvirt-2.5.0-1.el7 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-08-01 17:09:12 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
Fangge Jin
2016-06-08 07:47:58 UTC
This is now fixed upstream by
commit 0355de2e77fa8a11419fde5b0eb68458a7fb62ca
Refs: v2.5.0-rc1-2-g0355de2e7
Author: Jiri Denemark <jdenemar>
AuthorDate: Wed Nov 23 14:07:53 2016 +0100
Commit: Jiri Denemark <jdenemar>
CommitDate: Tue Nov 29 12:37:04 2016 +0100
qemuProcessReconnect: Avoid relabeling images after migration
Restarting libvirtd on the source host at the end of migration when a
domain is already running on the destination would cause image labels to
be reset effectively killing the domain. Commit e8d0166e1d fixed similar
issue on the destination host, but kept the source always resetting the
labels, which was mostly correct except for the specific case handled by
this patch.
https://bugzilla.redhat.com/show_bug.cgi?id=1343858
Signed-off-by: Jiri Denemark <jdenemar>
Reproduce the bug with libvirt-2.0.0-10.el7.x86_64:
steps:
1.gdb -p `pidof libvirtd`
(gdb) br qemuMigrationConfirmPhase
Breakpoint 1 at 0x7f60739a0f30: file qemu/qemu_migration.c, line 4173.
(gdb) c
Continuing.
[Switching to Thread 0x7f60b7be9700 (LWP 7881)]
Breakpoint 1, qemuMigrationConfirmPhase (driver=driver@entry=0x7f605417a150, conn=conn@entry=0x7f60a8001330, vm=0x7f60542ad210,
cookiein=cookiein@entry=0x7f60a80040b0 "<qemu-migration>\n <name>rhel7.3-min</name>\n <uuid>1b3268d6-b59c-406b-a14c-33b000b15b6c</uuid>\n <hostname>dhcp-66-71-81.eng.nay.redhat.com</hostname>\n <hostuuid>8b6f1788-6105-11e4-b60b-2248c3061500"..., cookieinlen=cookieinlen@entry=1128, flags=flags@entry=769, retcode=retcode@entry=0)
at qemu/qemu_migration.c:4173
4173 {
(gdb) c
2.virsh migrate rhel7.3-min qemu+ssh://10.66.5.14/system --live --verbose
3.After step2 reached confirm phase, check the output in the step1 and kill libvirtd process on source host;
...
Breakpoint 1, qemuMigrationConfirmPhase (driver=driver@entry=0x7f09d8119440,
conn=conn@entry=0x7f0a30027700, vm=0x7f09d81e7b00,
cookiein=cookiein@entry=0x7f0a20005a50 "<qemu-migration>\n <name>rhel7.3-min</name>\n <uuid>1b3268d6-b59c-406b-a14c-33b000b15b6c</uuid>\n <hostname>dhcp-66-71-81.eng.nay.redhat.com</hostname>\n <hostuuid>8b6f1788-6105-11e4-b60b-2248c3061500"..., cookieinlen=cookieinlen@entry=1130,
flags=flags@entry=769, retcode=retcode@entry=0) at qemu/qemu_migration.c:4202
4202 {
(gdb)
...
#pkill -9 libvirtd
4.Check the guest on source host:
# virsh list
Id Name State
----------------------------------------------------
5. Check the guest on target host
# virsh list
Id Name State
----------------------------------------------------
8 rhel7.2-min running
6.Check the image owner on target host
# ll /nfs-images/yafu/rhel7.2.qcow2
-rwxrwxrwx. 1 root root 12887130112 Mar 1 2017 /nfs-images/yafu/rhel7.2.qcow2
Verify the bug with libvirt-3.0.0-2.el7.x86_64.
steps:
1.Excute the step1-5 in the reproduce steps;
2.Check the image owner on target host:
# ll /nfs-images/yafu/rhel7*
-rwxrwxrwx. 1 qemu qemu 12887130112 Mar 2 2017 /nfs-images/yafu/rhel7.2.qcow2
As the result of step2 shows, the guest image owner did not change to root:root if kill source libvirtd in migration confirm phase.
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-2017:1846 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-2017:1846 |