]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: migration: Don't transfer 'allowReboot' flag
authorPeter Krempa <pkrempa@redhat.com>
Fri, 20 Aug 2021 14:11:05 +0000 (16:11 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Aug 2021 13:32:44 +0000 (15:32 +0200)
The original idea was to ensure that the destination has the same
original state of the '-no-reboot' flag to ensure identical behaviour of
the 'vidDomainModifyLifecycleAction' API.

With newer qemu's we'll be able to modify the behaviour using the
monitor so old daemons won't be able to keep up anyways.

Remove this feature as it's not very useful and will be replaced by a
proper solution.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_migration.c
src/qemu/qemu_migration_cookie.c
src/qemu/qemu_migration_cookie.h
tests/qemumigrationcookiexmldata/basic-xml2xml-out.xml
tests/qemumigrationcookiexmldata/full-xml2xml-out.xml
tests/qemumigrationcookiexmldata/modern-dom-out-dest.xml
tests/qemumigrationcookiexmldata/modern-dom-out-source.xml
tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-out.xml

index b441d0226c8fa6e203da7d92716cb827e7f44c6f..dd226ea4bcb595ea1d02b767089980e6afa6551e 100644 (file)
@@ -2415,8 +2415,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver,
     if (priv->origCPU)
         cookieFlags |= QEMU_MIGRATION_COOKIE_CPU;
 
-    cookieFlags |= QEMU_MIGRATION_COOKIE_ALLOW_REBOOT;
-
     if (!(flags & VIR_MIGRATE_OFFLINE))
         cookieFlags |= QEMU_MIGRATION_COOKIE_CAPS;
 
@@ -2876,7 +2874,6 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver,
                                          QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG |
                                          QEMU_MIGRATION_COOKIE_CPU_HOTPLUG |
                                          QEMU_MIGRATION_COOKIE_CPU |
-                                         QEMU_MIGRATION_COOKIE_ALLOW_REBOOT |
                                          QEMU_MIGRATION_COOKIE_CAPS |
                                          QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS)))
         goto cleanup;
@@ -2933,8 +2930,6 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver,
         goto stopjob;
     stopProcess = true;
 
-    priv->allowReboot = mig->allowReboot;
-
     if (!(incoming = qemuMigrationDstPrepare(vm, tunnel, protocol,
                                              listenAddress, port,
                                              dataFD[0])))
index b67728f9c0fb4dd4e2341841ca3dcded30974d9a..c7b010f0a0d56ffc7b15c20e4ce343a20bee38c6 100644 (file)
@@ -558,18 +558,6 @@ qemuMigrationCookieAddCPU(qemuMigrationCookie *mig,
 }
 
 
-static void
-qemuMigrationCookieAddAllowReboot(qemuMigrationCookie *mig,
-                                  virDomainObj *vm)
-{
-    qemuDomainObjPrivate *priv = vm->privateData;
-
-    mig->allowReboot = priv->allowReboot;
-
-    mig->flags |= QEMU_MIGRATION_COOKIE_ALLOW_REBOOT;
-}
-
-
 static int
 qemuMigrationCookieAddCaps(qemuMigrationCookie *mig,
                            virDomainObj *vm,
@@ -901,9 +889,6 @@ qemuMigrationCookieXMLFormat(virQEMUDriver *driver,
     if (mig->flags & QEMU_MIGRATION_COOKIE_CPU && mig->cpu)
         virCPUDefFormatBufFull(buf, mig->cpu, NULL);
 
-    if (mig->flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT)
-        qemuDomainObjPrivateXMLFormatAllowReboot(buf, mig->allowReboot);
-
     if (mig->flags & QEMU_MIGRATION_COOKIE_CAPS)
         qemuMigrationCookieCapsXMLFormat(buf, mig->caps);
 
@@ -1407,10 +1392,6 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig,
                           false) < 0)
         return -1;
 
-    if (flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT &&
-        qemuDomainObjPrivateXMLParseAllowReboot(ctxt, &mig->allowReboot) < 0)
-        return -1;
-
     if (flags & QEMU_MIGRATION_COOKIE_CAPS &&
         !(mig->caps = qemuMigrationCookieCapsXMLParse(ctxt)))
         return -1;
@@ -1491,9 +1472,6 @@ qemuMigrationCookieFormat(qemuMigrationCookie *mig,
         qemuMigrationCookieAddCPU(mig, dom) < 0)
         return -1;
 
-    if (flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT)
-        qemuMigrationCookieAddAllowReboot(mig, dom);
-
     if (flags & QEMU_MIGRATION_COOKIE_CAPS &&
         qemuMigrationCookieAddCaps(mig, dom, party) < 0)
         return -1;
index 6ac7b2084cba2a90adce8169aff6f66ed9381bac..1726e5f2daa033fa6c67e0afe9ea960af8e3f5fb 100644 (file)
@@ -52,7 +52,6 @@ typedef enum {
     QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG = (1 << QEMU_MIGRATION_COOKIE_FLAG_MEMORY_HOTPLUG),
     QEMU_MIGRATION_COOKIE_CPU_HOTPLUG = (1 << QEMU_MIGRATION_COOKIE_FLAG_CPU_HOTPLUG),
     QEMU_MIGRATION_COOKIE_CPU = (1 << QEMU_MIGRATION_COOKIE_FLAG_CPU),
-    QEMU_MIGRATION_COOKIE_ALLOW_REBOOT = (1 << QEMU_MIGRATION_COOKIE_FLAG_ALLOW_REBOOT),
     QEMU_MIGRATION_COOKIE_CAPS = (1 << QEMU_MIGRATION_COOKIE_FLAG_CAPS),
     QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS = (1 << QEMU_MIGRATION_COOKIE_FLAG_BLOCK_DIRTY_BITMAPS),
 } qemuMigrationCookieFeatures;
@@ -168,9 +167,6 @@ struct _qemuMigrationCookie {
     /* If flags & QEMU_MIGRATION_COOKIE_CPU */
     virCPUDef *cpu;
 
-    /* If flags & QEMU_MIGRATION_COOKIE_ALLOW_REBOOT */
-    virTristateBool allowReboot;
-
     /* If flags & QEMU_MIGRATION_COOKIE_CAPS */
     qemuMigrationCookieCaps *caps;
 
index 42b351047eb2ab7947bdcfb04e8e356b15198a52..e05f3c3a83d9801785655c3f2b89870a89ea1a3d 100644 (file)
@@ -3,7 +3,6 @@
   <uuid>dcf47dbd-46d1-4d5b-b442-262a806a333a</uuid>
   <hostname>hostname</hostname>
   <hostuuid>4a802f00-4cba-5df6-9679-a08c4c5b577f</hostuuid>
-  <allowReboot value='default'/>
   <capabilities>
   </capabilities>
 </qemu-migration>
index a07dd1f147dae9d057f6304914732b8bb0032224..61fcaff13f9fdb2be4f820edd4da10b67459ebc4 100644 (file)
     <auto_converge_throttle>14</auto_converge_throttle>
   </statistics>
   <cpu mode='host-passthrough' check='partial' migratable='on'/>
-  <allowReboot value='yes'/>
   <capabilities>
     <cap name='xbzrle' auto='yes'/>
     <cap name='postcopy-ram' auto='no'/>
index ba84c65a3db939876882ee8e330b59a4b08c314f..246efc06aa1d5808b498aa6abb673aa1de845ecd 100644 (file)
@@ -6,7 +6,6 @@
   <feature name='memory-hotplug'/>
   <feature name='cpu-hotplug'/>
   <graphics type='spice' port='5900' listen='127.0.0.1' tlsPort='-1'/>
-  <allowReboot value='yes'/>
   <capabilities>
   </capabilities>
 </qemu-migration>
index ba84c65a3db939876882ee8e330b59a4b08c314f..246efc06aa1d5808b498aa6abb673aa1de845ecd 100644 (file)
@@ -6,7 +6,6 @@
   <feature name='memory-hotplug'/>
   <feature name='cpu-hotplug'/>
   <graphics type='spice' port='5900' listen='127.0.0.1' tlsPort='-1'/>
-  <allowReboot value='yes'/>
   <capabilities>
   </capabilities>
 </qemu-migration>
index 09b6fa291c6b2f6b1533a064c2a04cf1361d72dc..2bd6de42be4de408757792b78b31674f5a6b1e8b 100644 (file)
@@ -29,7 +29,6 @@
     <feature policy='disable' name='npt'/>
     <feature policy='disable' name='nrip-save'/>
   </cpu>
-  <allowReboot value='yes'/>
   <capabilities>
     <cap name='xbzrle' auto='no'/>
     <cap name='auto-converge' auto='no'/>