On Thu, Jul 16, 2026 at 17:17:45 -0600, Jim Fehlig wrote:
> On 7/16/26 8:13 AM, Peter Krempa wrote:
> > On Mon, Jun 22, 2026 at 14:38:00 -0600, Jim Fehlig via Devel wrote:
> > > From: Jim Fehlig <[email protected]>
> > >
> > > In a clustered environment it may be desirable to provision disk leases
> > > for use by a specific domain. This patch adds a 'check_disk_lease_owner'
> > > option to the sanlock driver to check that leases are owned by the domain
> > > attempting to acquire them. sanlock's Lock Value Block (LVB) is used to
> > > store the owning domain UUID within the lease. When a domain is started
> > > and attempts to acquire its leases, the sanlock driver will ensure its
> > > UUID matches the UUID recorded in the leases. Any mismatches will cause
> > > lease acquisition and domain startup to fail.
> > >
> > > The 'check_disk_lease_owner' option is disabled by default. When enabled,
> > > it can be used with auto_disk_leases or leases managed by an external
> > > application.
> > >
> > > Signed-off-by: Jim Fehlig <[email protected]>
> > > ---
> > >
> > > Inspired by Claudio, implemented by Jim :-)
> > >
> > > src/locking/libvirt_sanlock.aug | 1 +
> > > src/locking/lock_driver_sanlock.c | 78 ++++++++++++++++++++++++-
> > > src/locking/sanlock.conf | 23 ++++++++
> > > src/locking/test_libvirt_sanlock.aug.in | 1 +
> > > 4 files changed, 102 insertions(+), 1 deletion(-)
[...]
> @@ -902,8 +901,8 @@ static int
> virLockManagerSanlockCheckOwner(virLockManagerSanlockDriver *driver,
> * be acquired by this one.
> */
> virReportError(VIR_ERR_RESOURCE_BUSY,
> - _("Disk lease %1$s is already assigned to domain
> %2$s, not %3$s"),
> - priv->res_args[i]->disks[0].path, lvb,
> vm_uuidstr);
> + _("Disk lease %1$s is not owned by domain with
> UUID %2$s"),
This should still have delimiters around substitutions.
> + priv->res_args[i]->disks[0].path, vm_uuidstr);
> return -1;
> }