[libvirt] [PATCH v2 0/3] qemu: Restore lost shutdown reason

John Ferlan posted 3 patches 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20181101160446.20774-1-jferlan@redhat.com
Test syntax-check passed
src/qemu/qemu_command.c |  6 +-----
src/qemu/qemu_domain.c  | 17 +++++++++++++++++
src/qemu/qemu_domain.h  |  3 +++
src/qemu/qemu_process.c | 27 ++++++++++++++++++---------
4 files changed, 39 insertions(+), 14 deletions(-)
[libvirt] [PATCH v2 0/3] qemu: Restore lost shutdown reason
Posted by John Ferlan 6 years ago
v1:
https://www.redhat.com/archives/libvir-list/2018-October/msg00945.html

Changes since v1:

Patch 1 (NEW)

  - Set the priv->allowReboot prior to any error processing since we
    could/should be using that.

Patch 2 (ADJUSTED LOGIC)

  - Rather than open code the "reason" to use the -no-shutdown flag,
    let's create a qemu_domain helper for that so that both the command
    line building and the Reconnection failure logic can use it.

Patch 3 (NEW)

  - Let's narrow the window for using VIR_DOMAIN_SHUTOFF_CRASHED to
    just the period where we try to open a monitor channel. If we
    cannot do so, then "assume" the reason was crashed. There are
    a few open failure steps that may not exactly fit the model, but
    those are probably splitting hairs.

John Ferlan (3):
  qemu: Move allow reboot check setting
  qemu: Restore lost shutdown reason
  qemu: Narrow the shutdown reconnection failure reason window

 src/qemu/qemu_command.c |  6 +-----
 src/qemu/qemu_domain.c  | 17 +++++++++++++++++
 src/qemu/qemu_domain.h  |  3 +++
 src/qemu/qemu_process.c | 27 ++++++++++++++++++---------
 4 files changed, 39 insertions(+), 14 deletions(-)

-- 
2.17.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 0/3] qemu: Restore lost shutdown reason
Posted by John Ferlan 6 years ago

On 11/1/18 12:04 PM, John Ferlan wrote:
> v1:
> https://www.redhat.com/archives/libvir-list/2018-October/msg00945.html
> 
> Changes since v1:
> 
> Patch 1 (NEW)
> 
>   - Set the priv->allowReboot prior to any error processing since we
>     could/should be using that.
> 
> Patch 2 (ADJUSTED LOGIC)
> 
>   - Rather than open code the "reason" to use the -no-shutdown flag,
>     let's create a qemu_domain helper for that so that both the command
>     line building and the Reconnection failure logic can use it.
> 
> Patch 3 (NEW)
> 
>   - Let's narrow the window for using VIR_DOMAIN_SHUTOFF_CRASHED to
>     just the period where we try to open a monitor channel. If we
>     cannot do so, then "assume" the reason was crashed. There are
>     a few open failure steps that may not exactly fit the model, but
>     those are probably splitting hairs.
> 
> John Ferlan (3):
>   qemu: Move allow reboot check setting
>   qemu: Restore lost shutdown reason
>   qemu: Narrow the shutdown reconnection failure reason window
> 
>  src/qemu/qemu_command.c |  6 +-----
>  src/qemu/qemu_domain.c  | 17 +++++++++++++++++
>  src/qemu/qemu_domain.h  |  3 +++
>  src/qemu/qemu_process.c | 27 ++++++++++++++++++---------
>  4 files changed, 39 insertions(+), 14 deletions(-)
> 

After sleeping on it, although we cannot come to an agreement on patch1,
I guess in the long run it doesn't matter since patch3 narrows the
window that made patch1 unnecessary. In order for CRASHED to be elicited
the monitor connection must've failed; otherwise, UNKNOWN would be used.

Moving forward also provides the change I found necessary for Nikolay's
domain reason addition patch to proceed forward, e.g.:

https://www.redhat.com/archives/libvir-list/2018-October/msg00493.html

So, I'll drop patch 1 and push patch2/3, then go back to Nikolay's code.

Tks -

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list