[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection
From: |
John Snow |
Subject: |
Re: [PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection |
Date: |
Tue, 26 Jul 2022 14:04:39 -0400 |
On Tue, Jul 26, 2022 at 12:12 PM Steve Sistare
<steven.sistare@oracle.com> wrote:
>
> Provide reopen_qmp_connection() to reopen a closed monitor connection.
> This is needed by cpr, because qemu exec closes the monitor socket.
>
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> ---
> python/qemu/machine/machine.py | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
> index d05950e..60b934d 100644
> --- a/python/qemu/machine/machine.py
> +++ b/python/qemu/machine/machine.py
> @@ -491,6 +491,15 @@ def _close_qmp_connection(self) -> None:
> finally:
> self._qmp_connection = None
>
> + def reopen_qmp_connection(self):
def reopen_qmp_connection(self) -> None:
"""Close and re-open the QMP connection."""
...
> + self._close_qmp_connection()
> + self._qmp_connection = QEMUMonitorProtocol(
> + self._monitor_address,
> + server=True,
> + nickname=self._name
> + )
> + self._qmp.accept(self._qmp_timer)
> +
> def _early_cleanup(self) -> None:
> """
> Perform any cleanup that needs to happen before the VM exits.
> --
> 1.8.3.1
>
With applied fixup:
Reviewed-by: John Snow <jsnow@redhat.com>
- [PATCH V9 37/46] chardev: cpr for simple devices, (continued)
- [PATCH V9 37/46] chardev: cpr for simple devices, Steve Sistare, 2022/07/26
- [PATCH V9 38/46] chardev: cpr for pty, Steve Sistare, 2022/07/26
- [PATCH V9 32/46] vfio-pci: cpr part 2 (msi), Steve Sistare, 2022/07/26
- [PATCH V9 34/46] vfio-pci: recover from unmap-all-vaddr failure, Steve Sistare, 2022/07/26
- [PATCH V9 40/46] python/machine: QEMUMachine full_args, Steve Sistare, 2022/07/26
- [PATCH V9 17/46] migration: check mode in notifiers, Steve Sistare, 2022/07/26
- [PATCH V9 45/46] migration: notifier error reporting, Steve Sistare, 2022/07/26
- [PATCH V9 36/46] chardev: cpr framework, Steve Sistare, 2022/07/26
- [PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection, Steve Sistare, 2022/07/26
- Re: [PATCH V9 41/46] python/machine: QEMUMachine reopen_qmp_connection,
John Snow <=
- [PATCH V9 43/46] vl: start on wakeup request, Steve Sistare, 2022/07/26
- [PATCH V9 44/46] migration: fix suspended runstate, Steve Sistare, 2022/07/26
- [PATCH V9 42/46] tests/avocado: add cpr regression test, Steve Sistare, 2022/07/26
- [PATCH V9 46/46] vfio: allow cpr-reboot migration if suspended, Steve Sistare, 2022/07/26
- [PATCH V9 23/46] cpr: add exec-mode blockers, Steve Sistare, 2022/07/26
- [PATCH V9 09/46] cpr: reboot mode, Steve Sistare, 2022/07/26
- [PATCH V9 31/46] vfio-pci: cpr part 1 (fd and dma), Steve Sistare, 2022/07/26
- [PATCH V9 39/46] chardev: cpr for sockets, Steve Sistare, 2022/07/26
- [PATCH V9 15/46] migration: cpr-exec-args parameter, Steve Sistare, 2022/07/26