Re: [PATCH 2/2] qemu: Add pre-migration hook

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

 



On Tue, Feb 28, 2012 at 17:04:29 -0700, Eric Blake wrote:
> On 02/28/2012 02:49 PM, Jiri Denemark wrote:
> > This hook is called during the Prepare phase on destination host and may
> > be used for changing domain XML.
> > ---
> >  docs/hooks.html.in        |   35 +++++++++++++++++++++++------------
> >  src/qemu/qemu_migration.c |   40 ++++++++++++++++++++++++++++++++++++++++
> >  src/util/hooks.c          |    3 ++-
> >  src/util/hooks.h          |    1 +
> >  4 files changed, 66 insertions(+), 13 deletions(-)
...
> > @@ -1150,6 +1152,43 @@ qemuMigrationPrepareAny(struct qemud_driver *driver,
> >              goto cleanup;
> >      }
> >  
> > +    /* Let migration hook filter domain XML */
> > +    if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
> > +        char *xml = virDomainDefFormat(def, VIR_DOMAIN_XML_SECURE);
> > +        int hookret;
> > +
> > +        hookret = virHookCall(VIR_HOOK_DRIVER_QEMU, def->name,
> > +                              VIR_HOOK_QEMU_OP_MIGRATE, VIR_HOOK_SUBOP_BEGIN,
> > +                              NULL, xml, &xmlout);
> 
> Needs to check for xml being NULL on OOM before virHookCall.

Oops, I just copy&pasted the code from other places, where domain XML is
probably not so important so we don't care if the hook gets it or not.

> ACK with those issues fixed.

I fixed the issues and pushed this small series. Thanks.

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]