examples/c/misc/event-test.c | 8 ++++---- include/libvirt/libvirt-domain.h | 4 ++-- src/qemu/qemu_process.c | 4 ++-- tools/virsh-domain-event.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
From: Daniel P. Berrangé <berrange@redhat.com>
New event reasons were added in
commit 1af740c5012bb45dfe96c77bcd6b20c28b6bb45d
Author: Zhenzhong Duan <zhenzhong.duan@intel.com>
Date: Thu Jul 10 03:21:21 2025 -0400
qemu: Send event VIR_DOMAIN_EVENT_[STOPPED|STARTED] during recreation
but the naming did not match existing reason names, so adapt
to match.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
examples/c/misc/event-test.c | 8 ++++----
include/libvirt/libvirt-domain.h | 4 ++--
src/qemu/qemu_process.c | 4 ++--
tools/virsh-domain-event.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/examples/c/misc/event-test.c b/examples/c/misc/event-test.c
index bafa929c47..347ec44682 100644
--- a/examples/c/misc/event-test.c
+++ b/examples/c/misc/event-test.c
@@ -143,8 +143,8 @@ eventDetailToString(int event,
case VIR_DOMAIN_EVENT_STARTED_WAKEUP:
return "Event wakeup";
- case VIR_DOMAIN_EVENT_STARTED_RECREATION:
- return "Recreation";
+ case VIR_DOMAIN_EVENT_STARTED_RECREATED:
+ return "Recreated";
case VIR_DOMAIN_EVENT_STARTED_LAST:
break;
@@ -230,8 +230,8 @@ eventDetailToString(int event,
case VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT:
return "Snapshot";
- case VIR_DOMAIN_EVENT_STOPPED_RECREATION:
- return "Recreation";
+ case VIR_DOMAIN_EVENT_STOPPED_RECREATED:
+ return "Recreated";
case VIR_DOMAIN_EVENT_STOPPED_LAST:
break;
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index fad58cf409..1811c55005 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -5051,7 +5051,7 @@ typedef enum {
VIR_DOMAIN_EVENT_STARTED_RESTORED = 2, /* Restored from a state file (Since: 0.5.0) */
VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT = 3, /* Restored from snapshot (Since: 0.8.0) */
VIR_DOMAIN_EVENT_STARTED_WAKEUP = 4, /* Started due to wakeup event (Since: 0.9.11) */
- VIR_DOMAIN_EVENT_STARTED_RECREATION = 5, /* Secure guest recreation (Since: 10.1.0) */
+ VIR_DOMAIN_EVENT_STARTED_RECREATED = 5, /* Secure guest recreation (Since: 10.1.0) */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_STARTED_LAST /* (Since: 0.9.10) */
@@ -5116,7 +5116,7 @@ typedef enum {
VIR_DOMAIN_EVENT_STOPPED_SAVED = 4, /* Saved to a state file (Since: 0.5.0) */
VIR_DOMAIN_EVENT_STOPPED_FAILED = 5, /* Host emulator/mgmt failed (Since: 0.5.0) */
VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = 6, /* offline snapshot loaded (Since: 0.8.0) */
- VIR_DOMAIN_EVENT_STOPPED_RECREATION = 7, /* Secure guest recreation (Since: 10.1.0) */
+ VIR_DOMAIN_EVENT_STOPPED_RECREATED = 7, /* Secure guest recreation (Since: 10.1.0) */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_STOPPED_LAST /* (Since: 0.9.10) */
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 8f3d357b9f..6b7b971f27 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -476,7 +476,7 @@ qemuProcessFakeRebootViaRecreate(virDomainObj *vm, bool locked)
event = virDomainEventLifecycleNewFromObj(vm,
VIR_DOMAIN_EVENT_STOPPED,
- VIR_DOMAIN_EVENT_STOPPED_RECREATION);
+ VIR_DOMAIN_EVENT_STOPPED_RECREATED);
virObjectEventStateQueue(driver->domainEventState, event);
/* skip remove inactive domain from active list */
@@ -501,7 +501,7 @@ qemuProcessFakeRebootViaRecreate(virDomainObj *vm, bool locked)
virDomainAuditStart(vm, "booted", true);
event = virDomainEventLifecycleNewFromObj(vm,
VIR_DOMAIN_EVENT_STARTED,
- VIR_DOMAIN_EVENT_STARTED_RECREATION);
+ VIR_DOMAIN_EVENT_STARTED_RECREATED);
virObjectEventStateQueue(driver->domainEventState, event);
qemuDomainSaveStatus(vm);
diff --git a/tools/virsh-domain-event.c b/tools/virsh-domain-event.c
index 21dbf6e1d2..a47fdfc7fd 100644
--- a/tools/virsh-domain-event.c
+++ b/tools/virsh-domain-event.c
@@ -72,7 +72,7 @@ VIR_ENUM_IMPL(virshDomainEventStarted,
N_("Restored"),
N_("Snapshot"),
N_("Event wakeup"),
- N_("Recreation"));
+ N_("Recreated"));
VIR_ENUM_DECL(virshDomainEventSuspended);
VIR_ENUM_IMPL(virshDomainEventSuspended,
@@ -106,7 +106,7 @@ VIR_ENUM_IMPL(virshDomainEventStopped,
N_("Saved"),
N_("Failed"),
N_("Snapshot"),
- N_("Recreation"));
+ N_("Recreated"));
VIR_ENUM_DECL(virshDomainEventShutdown);
VIR_ENUM_IMPL(virshDomainEventShutdown,
--
2.50.1
On Mon, Jul 28, 2025 at 11:37:10AM +0100, Daniel P. Berrangé via Devel wrote: >From: Daniel P. Berrangé <berrange@redhat.com> > >New event reasons were added in > > commit 1af740c5012bb45dfe96c77bcd6b20c28b6bb45d > Author: Zhenzhong Duan <zhenzhong.duan@intel.com> > Date: Thu Jul 10 03:21:21 2025 -0400 > > qemu: Send event VIR_DOMAIN_EVENT_[STOPPED|STARTED] during recreation > >but the naming did not match existing reason names, so adapt >to match. > >Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> >--- > examples/c/misc/event-test.c | 8 ++++---- > include/libvirt/libvirt-domain.h | 4 ++-- > src/qemu/qemu_process.c | 4 ++-- > tools/virsh-domain-event.c | 4 ++-- > 4 files changed, 10 insertions(+), 10 deletions(-) > [...] >diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h >index fad58cf409..1811c55005 100644 >--- a/include/libvirt/libvirt-domain.h >+++ b/include/libvirt/libvirt-domain.h >@@ -5051,7 +5051,7 @@ typedef enum { > VIR_DOMAIN_EVENT_STARTED_RESTORED = 2, /* Restored from a state file (Since: 0.5.0) */ > VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT = 3, /* Restored from snapshot (Since: 0.8.0) */ > VIR_DOMAIN_EVENT_STARTED_WAKEUP = 4, /* Started due to wakeup event (Since: 0.9.11) */ >- VIR_DOMAIN_EVENT_STARTED_RECREATION = 5, /* Secure guest recreation (Since: 10.1.0) */ >+ VIR_DOMAIN_EVENT_STARTED_RECREATED = 5, /* Secure guest recreation (Since: 10.1.0) */ > > # ifdef VIR_ENUM_SENTINELS > VIR_DOMAIN_EVENT_STARTED_LAST /* (Since: 0.9.10) */ >@@ -5116,7 +5116,7 @@ typedef enum { > VIR_DOMAIN_EVENT_STOPPED_SAVED = 4, /* Saved to a state file (Since: 0.5.0) */ > VIR_DOMAIN_EVENT_STOPPED_FAILED = 5, /* Host emulator/mgmt failed (Since: 0.5.0) */ > VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = 6, /* offline snapshot loaded (Since: 0.8.0) */ >- VIR_DOMAIN_EVENT_STOPPED_RECREATION = 7, /* Secure guest recreation (Since: 10.1.0) */ >+ VIR_DOMAIN_EVENT_STOPPED_RECREATED = 7, /* Secure guest recreation (Since: 10.1.0) */ > At first I was confused you can you change something that was introduces 5 version ago, but the read that the patch is from July this year. While you're at it, please fix these "Since" versions to 11.6.0 as well. Reviewed-by: Martin Kletzander <mkletzan@redhat.com> and safe for freeze.
© 2016 - 2025 Red Hat, Inc.