Re: [PATCH 1/2] Introduce migration iteration event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 18, 2016 at 15:53:04 +0100, Jiri Denemark wrote:
> The VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION event will be triggered
> whenever VIR_DOMAIN_JOB_MEMORY_ITERATION changes its value, i.e.,
> whenever a new iteration over guest memory pages is started during
> migration.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
...
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 62acecb..6d04b71 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -11924,6 +11924,22 @@ virshEventAgentLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
>      virshEventPrint(opaque, &buf);
>  }
>  
> +static void
> +virshEventMigrationIterationPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
> +                                  virDomainPtr dom,
> +                                  int iteration,
> +                                  void *opaque)
> +{
> +    virBuffer buf = VIR_BUFFER_INITIALIZER;
> +
> +      virBufferAsprintf(&buf, _("event 'migration-iteration' for domain %s: "
> +                                "iteration: '%d'\n"),
> +                        virDomainGetName(dom),
> +                        iteration);
> +
> +    virshEventPrint(opaque, &buf);
> +}
> +
>  static vshEventCallback vshEventCallbacks[] = {
>      { "lifecycle",
>        VIR_DOMAIN_EVENT_CALLBACK(virshEventLifecyclePrint), },

Consider the following patch squashed in:

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 6d04b71..828ba42 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11932,10 +11932,10 @@ virshEventMigrationIterationPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
-      virBufferAsprintf(&buf, _("event 'migration-iteration' for domain %s: "
-                                "iteration: '%d'\n"),
-                        virDomainGetName(dom),
-                        iteration);
+    virBufferAsprintf(&buf, _("event 'migration-iteration' for domain %s: "
+                              "iteration: '%d'\n"),
+                      virDomainGetName(dom),
+                      iteration);
 
     virshEventPrint(opaque, &buf);
 }

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]