Re: [libvirt] [PATCH 4/9] Add QEMU driver support for job info on migration ops
Daniel P. Berrange <berrange <at> redhat.com>
2010-03-01 13:02:32 GMT
On Fri, Feb 26, 2010 at 06:51:05PM +0100, Daniel Veillard wrote:
> On Thu, Feb 18, 2010 at 03:56:10PM +0000, Daniel P. Berrange wrote:
> > Introduce support for virDomainGetJobInfo in the QEMU driver. This
> > allows for monitoring of any API that uses the 'info migrate' monitor
> > command. ie virDomainMigrate, virDomainSave and virDomainCoreDump
> >
> > Unfortunately QEMU does not provide a way to monitor incoming migration
> > so we can't wire up virDomainRestore yet.
> >
> > The virsh tool gets a new command 'domjobinfo' to query status
> >
> > * src/qemu/qemu_driver.c: Record virDomainJobInfo and start time
> > in qemuDomainObjPrivatePtr objects. Add generic shared handler
> > for calling 'info migrate' with all migration based APIs.
> > * src/qemu/qemu_monitor_text.c: Fix parsing of 'info migration' reply
> > * tools/virsh.c: add new 'domjobinfo' command to query progress
> > ---
> > src/qemu/qemu_driver.c | 208 +++++++++++++++++++++++++++++++++++-------
> > src/qemu/qemu_monitor_text.c | 7 +-
> > tools/virsh.c | 129 ++++++++++++++++++++++----
> > 3 files changed, 288 insertions(+), 56 deletions(-)
> >
> > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> > index a6dc4f9..b245eb2 100644
> > --- a/src/qemu/qemu_driver.c
> > +++ b/src/qemu/qemu_driver.c
> > <at> <at> -87,6 +87,8 <at> <at> struct _qemuDomainObjPrivate {
> > int jobActive; /* Non-zero if a job is active. Only 1 job is allowed at any time
> > * A job includes *all* monitor commands, even those just querying
> > * information, not merely actions */
(Continue reading)