Bug 1122255
| Summary: | 'virsh desc $dom blah' doesn't survive libvirtd restart | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Eric Blake <eblake> |
| Component: | libvirt | Assignee: | Eric Blake <eblake> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | dyuan, eblake, mzhan, rbalakri, rbian, shyu, virt-bugs, vivianzhang, weizhan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.2.7-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1122205 | Environment: | |
| Last Closed: | 2015-03-05 07:41:30 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: | |||
| Bug Depends On: | 1115039, 1122205 | ||
| Bug Blocks: | |||
|
Description
Eric Blake
2014-07-22 19:17:47 UTC
Moving to POST, since rebase will pick this up:
commit 60e49440598b4aeb4a32bf23bfa5ed85672cbd6a
Author: Eric Blake <eblake>
Date: Tue Jul 22 09:41:05 2014 -0600
metadata: track title edits across libvirtd restart
https://bugzilla.redhat.com/show_bug.cgi?id=1122205
Although the edits were changing in-memory XML, it was not flushed
to disk; so unless some other action changes XML, a libvirtd restart
would lose the changed information.
* src/conf/domain_conf.c (virDomainObjSetMetadata): Add parameter,
to save live status across restarts.
(virDomainSaveXML): Allow for test driver.
* src/conf/domain_conf.h (virDomainObjSetMetadata): Adjust
signature.
* src/bhyve/bhyve_driver.c (bhyveDomainSetMetadata): Adjust caller.
* src/lxc/lxc_driver.c (lxcDomainSetMetadata): Likewise.
* src/qemu/qemu_driver.c (qemuDomainSetMetadata): Likewise.
* src/test/test_driver.c (testDomainSetMetadata): Likewise.
Signed-off-by: Eric Blake <eblake>
I could reproduce this issue with libvirt-1.1.1-29.el7.x86_64: 1. Prepare a guest's xml file with description "desc1" [root@rhel7-e Desktop]# grep desc rhel6u5.xml <description>desc1</description> 2. Start a new transient domain [root@rhel7-e Desktop]#virsh create rhel6u5.xml Domain rhel6u5 created from rhel6u5.xml [root@rhel7-e Desktop]# virsh list Id Name State ---------------------------------------------------- 7 rhel6u5 running 3. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc1 4. Modify the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc2 Domain description updated successfully 5. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc2 6. Restart libvirtd service [root@rhel7-e Desktop]#service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service 7. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc1 8. Modify the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc3 Domain description updated successfully 9. Suspend the domain [root@rhel7-e Desktop]#virsh suspend rhel6u5 Domain rhel6 suspended 10. Restart libvirtd service [root@rhel7-e Desktop]#service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service 11. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc3 Verify this issue with libvirt-1.2.7-1.el7: 1. Prepare a guest's xml file with description "desc1" [root@rhel7-e Desktop]# grep desc rhel6u5.xml <description>desc1</description> 2. Start a new transient domain [root@rhel7-e Desktop]#virsh create rhel6u5.xml Domain rhel6u5 created from rhel6u5.xml [root@rhel7-e Desktop]# virsh list Id Name State ---------------------------------------------------- 7 rhel6u5 running 3. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc1 4. Modify the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc2 Domain description updated successfully 5. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc2 6. Restart libvirtd service [root@rhel7-e Desktop]#service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service 7. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc2 8. Modify the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc3 Domain description updated successfully 9. Suspend the domain [root@rhel7-e Desktop]#virsh suspend rhel6u5 Domain rhel6 suspended 10. Restart libvirtd service [root@rhel7-e Desktop]#service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service 11. Check the description [root@rhel7-e Desktop]#virsh desc rhel6u5 desc3 Test for updating the desc for a running persistent domain with --live/--current/--config with build libvirt-1.2.8-1.el7.x86_64, and all of tests could work well. [root@rhel7-b1 ~]# virsh dumpxml rhel7 | grep desc <description>desc1</description> [root@rhel7-b1 ~]# virsh start rhel7 Domain rhel7 started [root@rhel7-b1 ~]# virsh list Id Name State ---------------------------------------------------- 8 rhel7 running [root@rhel7-b1 ~]# virsh desc rhel7 desc1 [root@rhel7-b1 ~]# virsh desc rhel7 --live desc1 [root@rhel7-b1 ~]# virsh desc rhel7 --config desc1 [root@rhel7-b1 ~]# virsh desc rhel7 --current desc1 [root@rhel7-b1 ~]# virsh desc rhel7 --live desc2 Domain description updated successfully [root@rhel7-b1 ~]# virsh desc rhel7 --live desc2 [root@rhel7-b1 ~]# virsh desc rhel7 desc2 [root@rhel7-b1 ~]# service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service [root@rhel7-b1 ~]# virsh desc rhel7 desc2 [root@rhel7-b1 ~]# virsh desc rhel7 --live desc2 [root@rhel7-b1 ~]# virsh desc rhel7 --config desc1 [root@rhel7-b1 ~]# virsh desc rhel7 --config desc3 Domain description updated successfully [root@rhel7-b1 ~]# virsh desc rhel7 --config desc3 [root@rhel7-b1 ~]# service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service [root@rhel7-b1 ~]# virsh desc rhel7 --config desc3 [root@rhel7-b1 ~]# virsh desc rhel7 --current desc2 [root@rhel7-b1 ~]# virsh desc rhel7 --current desc4 Domain description updated successfully [root@rhel7-b1 ~]# virsh desc rhel7 --current desc4 [root@rhel7-b1 ~]# virsh desc rhel7 desc4 [root@rhel7-b1 ~]# service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service [root@rhel7-b1 ~]# virsh desc rhel7 --current desc4 [root@rhel7-b1 ~]# virsh destroy rhel7 Domain rhel7 destroyed [root@rhel7-b1 ~]# virsh desc rhel7 desc3 I can produce this bug on build libvirt-1.1.1-29.el7.x86_64 verify it on build libvirt-1.2.8-9.el7.x86_64 verify steps 1. prepare a transient domain with desc <description>desc</description> # virsh create /tmp/rhel7.xml Domain rhel7 created from /tmp/rhel7.xml # virsh list --all Id Name State ---------------------------------------------------- 106 rhel7 running 2. list and update desc by command # virsh desc rhel7 desc # virsh desc rhel7 desc1 Domain description updated successfully # virsh desc rhel7 desc1 3. restart libvirtd service # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh list --all Id Name State ---------------------------------------------------- 106 rhel7 running [root@server html]# virsh desc rhel7 desc1 4. suspend guest and do step 2, 3 again # virsh suspend rhel7 Domain rhel7 suspended # virsh desc rhel7 desc1 # virsh desc rhel7 desc2 Domain description updated successfully # virsh desc rhel7 desc2 # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh desc rhel7 desc2 [root@server html]# virsh list --all Id Name State ---------------------------------------------------- 106 rhel7 paused 5. prepare a persistent guest # virsh list --all Id Name State ---------------------------------------------------- 103 rhel7 running [root@server html]# virsh desc rhel7 desc3 [root@server html]# virsh desc rhel7 desc4 Domain description updated successfully [root@server html]# virsh desc rhel7 desc4 [root@server html]# service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service [root@server html]# virsh desc rhel7 desc4 6 retest desc for different parameters # virsh desc rhel7 desc1 --live Domain description updated successfully # virsh desc rhel7 --live desc1 [root@server html]# virsh desc rhel7 --config desc # virsh desc rhel7 desc2 --config Domain description updated successfully # virsh desc rhel7 --config desc2 # virsh desc rhel7 desc1 # virsh destroy rhel7 Domain rhel7 destroyed # virsh desc rhel7 desc2 # virsh start rhel7 Domain rhel7 started # virsh desc rhel7 desc3 --current Domain description updated successfully # virsh desc rhel7 desc3 # virsh destroy rhel7 Domain rhel7 destroyed # virsh desc rhel7 desc2 7.test with --title for transient guest # virsh create /tmp/rhel7.xml Domain rhel7 created from /tmp/rhel7.xml # virsh desc rhel7 desc # virsh desc rhel7 --title No description for domain: rhel7 # virsh desc rhel7 --title title Domain description updated successfully # virsh desc rhel7 --title title # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh desc rhel7 --title title # virsh list --all Id Name State ---------------------------------------------------- 105 rhel7 running for persistent guest repeat steps 5,6 all success move to verified 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://rhn.redhat.com/errata/RHSA-2015-0323.html |