]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Add Taint for nbdkit restart failure
authorJonathon Jongsma <jjongsma@redhat.com>
Mon, 21 Aug 2023 21:04:35 +0000 (16:04 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Tue, 19 Sep 2023 19:28:50 +0000 (14:28 -0500)
Since the restart handler will trigger at an arbitrary time (when the
nbdkit process crashes, for instance), it's difficult to provide
feedback to the user if the restart is unsuccessful. Rather than just
relying on a warning in the log, taint the domain so that there will be
a slightly more user-visible notification.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h

index 0efac66f6164aa1b55b5a2b0556829353bd18a86..4e3cd5c8cfe335228d6ac2eb0f7400c0a61a0b4c 100644 (file)
@@ -87,6 +87,7 @@ VIR_ENUM_IMPL(virDomainTaint,
               "custom-hypervisor-feature",
               "deprecated-config",
               "custom-device",
+              "nbdkit-restart",
 );
 
 VIR_ENUM_IMPL(virDomainTaintMessage,
@@ -105,6 +106,7 @@ VIR_ENUM_IMPL(virDomainTaintMessage,
               N_("hypervisor feature autodetection override"),
               N_("use of deprecated configuration settings"),
               N_("custom device configuration"),
+              N_("nbdkit restart failed"),
 );
 
 VIR_ENUM_IMPL(virDomainVirt,
index 77e5b26957eca8a2c5523c49ecec1fa263b96c37..16289789c2358f17f8a5f7ab3d14fce5cf0fd2b3 100644 (file)
@@ -3194,6 +3194,7 @@ typedef enum {
     VIR_DOMAIN_TAINT_CUSTOM_HYPERVISOR_FEATURE, /* custom hypervisor feature control */
     VIR_DOMAIN_TAINT_DEPRECATED_CONFIG,  /* Configuration that is marked deprecated */
     VIR_DOMAIN_TAINT_CUSTOM_DEVICE, /* hypervisor device config customized */
+    VIR_DOMAIN_TAINT_NBDKIT_RESTART,    /* nbdkit could not be restarted */
 
     VIR_DOMAIN_TAINT_LAST
 } virDomainTaintFlags;