Bug 826704
| Summary: | virsh detach-disk cleans up all sanlock resources for the domain pid instead of specified disk device only | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Frido Roose <fr.roose> | ||||
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | unspecified | CC: | bart, dyasny, eblake, fr.roose | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-08-13 16:36:17 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
Frido Roose
2012-05-30 19:49:24 UTC
Some more debug output while virsh detach-disk: log_filters="1:locking" log_outputs="1:file:/var/log/libvirt/libvirtd-debug.log" 2012-05-31 10:03:39.029+0000: 1728: debug : virDomainLockManagerNew:123 : plugin=0x7f55f8014500 dom=0x7f55f80102b0 withResources=0 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerNew:291 : plugin=0x7f55f8014500 type=0 nparams=4 params=0x7f56056bd8b0 flags=0 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerLogParams:98 : key=uuid type=uuid value=c0ee1dfa-4056-f3f9-9f8c-f10e974b59f0 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerLogParams:94 : key=name type=string value=vmor01 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerLogParams:82 : key=id type=uint value=3 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerLogParams:82 : key=pid type=uint value=24861 2012-05-31 10:03:39.029+0000: 1728: debug : virDomainLockManagerAddDisk:86 : Add disk /dev/disk/by-id/wwn-0x600a0b80002695880000cc4c4f865710 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerAddResource:320 : lock=0x7f55f00d8fb0 type=0 name=/dev/disk/by-id/wwn-0x600a0b80002695880000cc4c4f865710 nparams=0 params=(nil) flags=0 2012-05-31 10:03:39.029+0000: 1728: debug : virLockManagerRelease:352 : lock=0x7f55f00d8fb0 state=(nil) flags=0 2012-05-31 10:03:39.059+0000: 1728: debug : virLockManagerFree:374 : lock=0x7f55f00d8fb0 In virLockManagerSanlockRelease: sanlock_release(-1, priv->vm_pid, SANLK_REL_ALL, 0, NULL) Only the specified resource should be released. Created attachment 597726 [details]
Only release specific sanlock resource when hot-dettaching a disk
Call sanlock_release() with the specific resource instead of always passing the SANLK_REL_ALL flag.
Comment on attachment 597726 [details]
Only release specific sanlock resource when hot-dettaching a disk
Call sanlock_release() with the specific resource instead of always passing the
SANLK_REL_ALL flag.
Will be in the 0.10.0 release.
commit a58cb1ac40b1af53af881c3d1901240cc07853bc
Author: Frido Roose <frido.roose>
Date: Mon Aug 13 12:54:38 2012 +0200
Release only specific sanlock resource
This is a patch for bug 826704
All sanlock resources get released when hot-dettaching a disk from the domain because virLockManagerSanlockRelease uses the wrong function parameters/flags. With the patch only the resources that should be released are cleaned up.
Signed-off-by: Frido Roose <frido.roose>
Is this something that can be backported to RHEL 6.3? Since this effectively makes the cluster able to mount blockdevices multiple times, data corruption can become a factor.. |