qemu: migration: Don't transfer 'allowReboot' flag

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>
This commit is contained in:
Peter Krempa 2021-08-20 16:11:05 +02:00
parent 6ab6d3f074
commit 6997cf6f5d
8 changed files with 0 additions and 36 deletions

View 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])))

View 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;

View 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;

View 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>

View File

@ -211,7 +211,6 @@
<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'/>

View 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>

View 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>

View 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'/>