Bug 905280
| Summary: | Lockfailure action Ignore will lead to sanlock rem_lockspace stuck | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Luwen Su <lsu> | |
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 6.4 | CC: | ajia, cwei, dyuan, fsimonce, jdenemar, mzhan, rbalakri, shyu, teigland | |
| 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: | ||||
| : | 967493 (view as bug list) | Environment: | ||
| Last Closed: | 2014-10-14 04:15:04 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: | ||||
| Bug Blocks: | 967493 | |||
|
Description
Luwen Su
2013-01-29 03:31:50 UTC
This is fixed upstream by v1.2.2-340-ge3dd35e:
commit e3dd35e881614e6f08a35e1e714336268764d5ba
Author: Jiri Denemark <jdenemar>
Date: Mon Mar 24 14:22:36 2014 +0100
sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_IGNORE
https://bugzilla.redhat.com/show_bug.cgi?id=905280
https://bugzilla.redhat.com/show_bug.cgi?id=967493
Sanlock expects that the configured kill script either kills the PID on
lock failure or removes all locks the PID owns. If none of the two
options happen, sanlock will reboot the host. Although IGNORE action is
supposed to ignore the request to kill the PID or remove all leases,
it's certainly not designed to cause the host to be rebooted. That said,
IGNORE action is incompatible with sanlock and should be forbidden by
libvirt.
Signed-off-by: Jiri Denemark <jdenemar>
Version: libvirt-0.10.2-33.el6.x86_64 sanlock-2.8-1.el6.x86_64 Change the test way with following DT's advice. 0.Prepare a lvm , #pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created # vgcreate vg /dev/sdb Volume group "vg" successfully created # lvcreate --size 100MB vg Logical volume "lvol0" created #mkfs.ext4 /dev/mapper/vg-lvol0 /var/lib/libvirt/sanlock #mount /dev/mapper/vg-lvol0 # df -TH Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext4 43G 3.4G 37G 9% / tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm /dev/mapper/test--vg-test--lv ext4 1.1G 37M 967M 4% /var/lib/libvirt/sanlock 1.Libvirt configuration # service libvirtd stop # getsebool -a | grep sanlock sanlock_use_fusefs --> off sanlock_use_nfs --> on sanlock_use_samba --> off virt_use_sanlock --> on # tail -5 /etc/libvirt/qemu-sanlock.conf user = "sanlock" group = "sanlock" host_id = 1 auto_disk_leases = 0 disk_lease_dir = "/var/lib/libvirt/sanlock" #tail -1 /etc/libvirt/qemu.conf lock_manager = "sanlock" 2.Sanlock configureation #service wdmd start #service sanlock start /*create lockspace file*/ #truncate -s 1M /var/lib/libvirt/sanlock/TEST_LS #sanlock direct init -s TEST_LS:0:/var/lib/libvirt/sanlock/TEST_LS:0 /*change to permission to sanlock , since its default is root*/ #chown sanlock:sanlock /var/lib/libvirt/sanlock/TEST_LS /*add lockspace to sanlock */ #sanlock client add_lockspace -s TEST_LS:1:/var/lib/libvirt/sanlock/TEST_LS:0 /*you can use this command to check the status*/ #sanlock client host_status -s TEST_LS 1 timestamp 2199 /*create lease file*/ #truncate -s 1M /var/lib/libvirt/sanlock/test-disk-resource-lock #sanlock direct init -r TEST_LS:test-disk-resource-lock:/var/lib/libvirt/sanlock/test-disk-resource-lock:0 /*change permission to sanlock*/ #chown sanlock:sanlock /var/lib/libvirt/sanlock/test-disk-resource-lock 3.Guest XML setting A normal shutdown guest , add .... <on_lockfailure>ignore</on_lockfailure> .... <lease> <lockspace>TEST_LS</lockspace> <key>test-disk-resource-lock</key> <target path='/var/lib/libvirt/sanlock/test-disk-resource-lock'/> </lease> ... 4. # virsh start test error: Failed to start domain test error: internal error unsupported configuration: Failure action ignore is not supported by sanlock That's the patch expected , so VERFIED 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 |