| Summary: | met error when run virt-sanlock-clean. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Shanzhi Yu <shyu> |
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5 | CC: | ajia, dyuan, icon, jdenemar, lsu, mzhan, rbalakri |
| Target Milestone: | rc | Keywords: | Upstream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.10.2-32.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-10-14 04:16: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: | |
|
Description
Shanzhi Yu
2013-08-26 04:03:12 UTC
There are two bugs involved. The first one is a regression in augeas and the second one is a bug in virt-sanlock-clean. I'll clone this bug for augeas. (In reply to Jiri Denemark from comment #2) > There are two bugs involved. The first one is a regression in augeas and the > second one is a bug in virt-sanlock-clean. I'll clone this bug for augeas. BTW, I have ever committed a patch for augeas, but no reply from augeas-devel listing. The libvirt bug is fixed upstream by commit v1.0.4-98-gc3e33e6:
commit c3e33e68d9785028d96be42162001d306c9b6915
Author: Alex Jia <ajia>
Date: Mon Apr 8 17:41:50 2013 +0800
sanlock: add missing test command in virt-sanlock-cleanup.in
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=949483
Signed-off-by: Alex Jia <ajia>
Hmm actually there is no regression in augeas. It most likely worked with older augeas because disk_lease_dir was not set in /etc/libvirt/qemu-sanlock.conf. If it is set, the result of augtool print /files/etc/libvirt/qemu-sanlock.conf/disk_lease_dir' is the same with both versions of augeas. Unfortunately, the output is not compatible with the way virt-sanlock-clean script is using it. Thus the first bug is also in libvirt. The other libvirt bug is now fixed upstream by v1.1.1-248-g74c5156:
commit 74c5156f9db3be51eb7431a84f32731e7f687f2c
Author: Jiri Denemark <jdenemar>
Date: Wed Aug 28 13:50:10 2013 +0200
virt-sanlock-cleanup; Fix augtool usage
Surprisingly, augtool get (or print) returns "path = value" while we are
only interested in the value. We need to remove the "path = " part from
the augtool's output. The following is an example of the augtool command
as used in virt-sanlock-cleanup script:
$ augtool get /files/etc/libvirt/qemu-sanlock.conf/disk_lease_dir
/files/etc/libvirt/qemu-sanlock.conf/disk_lease_dir = /var/lib/libvirt/sanlock
Backported patches sent for internal review ([RHEL-6.5 libvirt PATCH 0/2] Fix virt-sanlock-cleanup). Test basing on below , and VERFIED libvirt-0.10.2-33.el6.x86_64 sanlock-2.8-1.el6.x86_64 augeas-1.0.0-5.el6_5.1.x86_64 1.Prepare steps same as #comment 0 2. #virsh list Id Name State ---------------------------------------------------- 2 test running #ll /var/lib/libvirt/sanlock/ total 2048 -rw-------. 1 sanlock sanlock 1048576 Apr 21 10:46 f30a79d7d4b9c375cf1b1a5feb8e8e1f -rw-r-----. 1 sanlock sanlock 1048576 Apr 21 10:46 __LIBVIRT__DISKS__ #sanlock client status daemon 4b8373e6-1d2a-4f87-bb0d-97dfdea74e6e.localhost. p -1 helper p -1 listener p 13927 test p -1 status s __LIBVIRT__DISKS__:1:/var/lib/libvirt/sanlock/__LIBVIRT__DISKS__:0 r __LIBVIRT__DISKS__:f30a79d7d4b9c375cf1b1a5feb8e8e1f:/var/lib/libvirt/sanlock/f30a79d7d4b9c375cf1 3. #virt-sanlock-cleanup Cleanup: __LIBVIRT__DISKS__:f30a79d7d4b9c375cf1b1a5feb8e8e1f:/var/lib/libvirt/sanlock/f30a79d7d4b9c375cf1b1a5feb8e8e1f:0 register register done 3 acquire fd 3 acquire done 0 PASS #sanlock client status daemon 4b8373e6-1d2a-4f87-bb0d-97dfdea74e6e.localhost. p -1 helper p -1 listener p -1 status s __LIBVIRT__DISKS__:1:/var/lib/libvirt/sanlock/__LIBVIRT__DISKS__:0 # ll /var/lib/libvirt/sanlock/ total 1024 -rw-r-----. 1 sanlock sanlock 1048576 Apr 21 10:46 __LIBVIRT__DISKS__ # echo $? 0 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. http://rhn.redhat.com/errata/RHBA-2014-1374.html |