On 07/16/2016 08:35 AM, John Ferlan wrote:
On 07/14/2016 07:08 AM, Nikolay Shirokovskiy wrote:
> First this fixes the same issue as e2b86f580. Only difference is
> that reboot is done via shutdown function with reboot semantics.
>
> Second 8be502fd tells us that we need to always set fake reboot
> flag if shutdown/reboot will trigger shutdown event. To put
> it simple we need to set it false if agent is used.
>
> References:
>
> e2b86f580 - fixes guest shutdown becames reboot after API reboot thru agent
> 8be502fd - fixes API shutdown thru agent becames reboot after API reboot
> thru acpi (more on
https://www.redhat.com/archives/libvir-list/2015-April/msg00715.html)
s/becames/becomes/
> ---
> src/qemu/qemu_driver.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
This seems reasonable to me; however, I'd be interesting in getting
Zhang Bo(Oscar)'s take on this too since that patch processing was being
questioned in the v1 response:
http://www.redhat.com/archives/libvir-list/2016-July/msg00473.html
In any case, Zhang is CC'd on this just in case he hasn't been following
the discussion...
Now that the 2.1 release is out - I took the liberty of splitting the
patches (one for reboot and one for shutdown) and adjusting the commit
messages and pushed the changes.
John
John
FWIW: I do think this needs to be two patches... One for each API... If
they ever need to be backported to some release version, then it's
easier to do so... Besides there are two distinct changes - one to have
shutdown follow e2b86f580 and the second to alter 8be502fd in order to
also take into consideration the agent path.
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 2089359..8855387 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -1997,9 +1997,9 @@ static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned
int flags)
> useAgent = false;
> }
>
> - qemuDomainSetFakeReboot(driver, vm, isReboot);
>
> if (useAgent) {
> + qemuDomainSetFakeReboot(driver, vm, false);
> qemuDomainObjEnterAgent(vm);
> ret = qemuAgentShutdown(priv->agent, agentFlag);
> qemuDomainObjExitAgent(vm);
> @@ -2018,6 +2018,7 @@ static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned
int flags)
> goto endjob;
> }
>
> + qemuDomainSetFakeReboot(driver, vm, isReboot);
> qemuDomainObjEnterMonitor(driver, vm);
> ret = qemuMonitorSystemPowerdown(priv->mon);
> if (qemuDomainObjExitMonitor(driver, vm) < 0)
> @@ -2091,6 +2092,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
> }
>
> if (useAgent) {
> + qemuDomainSetFakeReboot(driver, vm, false);
> qemuDomainObjEnterAgent(vm);
> ret = qemuAgentShutdown(priv->agent, agentFlag);
> qemuDomainObjExitAgent(vm);
>
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list