RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 829316 - [NFR] Sanlock should support graceful release of resources
Summary: [NFR] Sanlock should support graceful release of resources
Keywords:
Status: CLOSED DUPLICATE of bug 832156
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 826022
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-06 12:59 UTC by Federico Simoncelli
Modified: 2012-06-15 09:11 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 826022
Environment:
Last Closed: 2012-06-15 09:11:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Federico Simoncelli 2012-06-06 12:59:14 UTC
Libvirt should expose a way to define a script/executable to gracefully release the locks. Eg:

<?xml version="1.0"?>
<domain type="kvm">
  <devices>
    <leaseFence timeout="X">/path/to/my/fence/script</leaseFence>
    <lease>[...]</lease>
    [...]
  </devices>
</domain>

This has to be done in libvirt because the script must be defined before acquiring the leases for the qemu process.

+++ This bug was initially created as a clone of Bug #826022 +++

Description of problem:
At the moment the only supported way of fencing a process that lost its resources (lockspace unreachable) is killing the pid with SIGTERM/SIGKILL. Looking forward we want support a graceful interaction between sanlock and the monitored process.

Use case:

In oVirt sanlock is used to acquire the volumes (disks) resources for a qemu-kvm process. If the storage domain is unreacheable (lockspace) sanlock is terminating the qemu-kvm process. The graceful way of handling the situation is to interact with the qemu-kvm process (probably a script that connects to libvirt) and pauses the guest.

When the storage is reachable again it's the manager's responsibility (vdsm) to reacquire the lockspace, reacquire the volume resources for the qemu process (checking the lver value to make sure that they haven't changed), and unpause the guest.

The benefit is that during the storage domain down time the VM isn't killed but simply paused.

Possible implementation:
Define a new API to configure a script (per monitored process) to be used for the graceful release of resources.
If the script fails we should escalate to SIGTERM/SIGKILL and ultimately to the dogwatch host fencing.

Comment 2 Daniel Berrangé 2012-06-15 09:11:07 UTC

*** This bug has been marked as a duplicate of bug 832156 ***


Note You need to log in before you can comment on or make changes to this bug.