- libxl: Add lock process indicator to saved VM state

31e937fb-libxl-save-lock-indicator.patch
  bsc#1191668

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=919
This commit is contained in:
James Fehlig 2022-01-25 16:28:02 +00:00 committed by Git OBS Bridge
parent 906f09abf9
commit 312ad341c9
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,42 @@
commit 31e937fb3b7d0aa040a879394eff700bc1108251
Author: Jim Fehlig <jfehlig@suse.com>
Date: Mon Jan 24 12:03:20 2022 -0700
libxl: Add lock process indicator to saved VM state
Commit fa58f571ee added a lock processes indicator to the
libxlDomainObjPrivate struct to note that a lock process was
successfully started for the VM. However, the commit neglected to
add the indicator to the VM's saved state file. As a result, the
indicator is lost on libvirtd restart, along with the knowledge of
whether a lock process was started for the VM.
This change adds support for the indicator in the domainObjPrivate
data parse and format callbacks, ensuring its value survives libvirtd
restarts.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Index: libvirt-8.0.0/src/libxl/libxl_domain.c
===================================================================
--- libvirt-8.0.0.orig/src/libxl/libxl_domain.c
+++ libvirt-8.0.0/src/libxl/libxl_domain.c
@@ -226,6 +226,7 @@ libxlDomainObjPrivateXMLParse(xmlXPathCo
libxlDomainObjPrivate *priv = vm->privateData;
priv->lockState = virXPathString("string(./lockstate)", ctxt);
+ priv->lockProcessRunning = virXPathBoolean("boolean(./lockProcessRunning)", ctxt);
return 0;
}
@@ -239,6 +240,9 @@ libxlDomainObjPrivateXMLFormat(virBuffer
if (priv->lockState)
virBufferAsprintf(buf, "<lockstate>%s</lockstate>\n", priv->lockState);
+ if (priv->lockProcessRunning)
+ virBufferAddLit(buf, "<lockProcessRunning/>\n");
+
return 0;
}

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 25 16:26:42 UTC 2022 - James Fehlig <jfehlig@suse.com>
- libxl: Add lock process indicator to saved VM state
31e937fb-libxl-save-lock-indicator.patch
bsc#1191668
-------------------------------------------------------------------
Tue Jan 18 17:11:13 UTC 2022 - James Fehlig <jfehlig@suse.com>

View File

@ -304,6 +304,7 @@ Source100: %{name}-rpmlintrc
Patch0: 3be5ba11-libvirt-guests-install.patch
Patch1: 16172741-libvirt-guests-manpage.patch
Patch2: 8eb44616-remove-sysconfig-files.patch
Patch3: 31e937fb-libxl-save-lock-indicator.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch