qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] fa73e6: python/aqmp: Fix negotiation with pre


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] fa73e6: python/aqmp: Fix negotiation with pre-"oob" QEMU
Date: Thu, 03 Feb 2022 07:47:56 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: fa73e6e4ca1a93c5bbf9d05fb2a25736ab810b35
      
https://github.com/qemu/qemu/commit/fa73e6e4ca1a93c5bbf9d05fb2a25736ab810b35
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M python/qemu/aqmp/qmp_client.py

  Log Message:
  -----------
  python/aqmp: Fix negotiation with pre-"oob" QEMU

QEMU versions prior to the "oob" capability *also* can't accept the
"enable" keyword argument at all. Fix the handshake process with older
QEMU versions.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20220201041134.1237016-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 50465f94d211beabfbfc80e4f85ec4fad0757570
      
https://github.com/qemu/qemu/commit/50465f94d211beabfbfc80e4f85ec4fad0757570
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M python/qemu/machine/machine.py
    M tests/qemu-iotests/tests/mirror-top-perms

  Log Message:
  -----------
  python/machine: raise VMLaunchFailure exception from launch()

This allows us to pack in some extra information about the failure,
which guarantees that if the caller did not *intentionally* cause a
failure (by capturing this Exception), some pretty good clues will be
printed at the bottom of the traceback information.

This will help make failures in the event of a non-negative return code
more obvious when they go unhandled; the current behavior in
_post_shutdown() is to print a warning message only in the event of
signal-based terminations (for negative return codes).

(Note: In Python, catching BaseException instead of Exception catches a
broader array of Exception events, including SystemExit and
KeyboardInterrupt. We do not want to "wrap" such exceptions as a
VMLaunchFailure, because that will 'downgrade' the exception from a
BaseException to a regular Exception. We do, however, want to perform
cleanup in either case, so catch on the broadest scope and
wrap-and-re-raise only in the more targeted scope.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20220201041134.1237016-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 74a1505d279897d2a448c876820a33cbe1f0f22e
      
https://github.com/qemu/qemu/commit/74a1505d279897d2a448c876820a33cbe1f0f22e
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M python/Pipfile.lock
    M python/setup.cfg

  Log Message:
  -----------
  python: upgrade mypy to 0.780

We need a slightly newer version of mypy in order to use some features
of the asyncio server functions in the next commit.

(Note: pipenv is not really suited to upgrading individual packages; I
need to replace this tool with something better for the task. For now,
the miscellaneous updates not related to the mypy upgrade are simply
beyond my control. It's on my list to take care of soon.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20220201041134.1237016-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: b0b662bb2b340d63529672b5bdae596a6243c4d0
      
https://github.com/qemu/qemu/commit/b0b662bb2b340d63529672b5bdae596a6243c4d0
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M python/qemu/aqmp/legacy.py
    M python/qemu/aqmp/protocol.py

  Log Message:
  -----------
  python/aqmp: add socket bind step to legacy.py

The synchronous QMP library would bind to the server address during
__init__(). The new library delays this to the accept() call, because
binding occurs inside of the call to start_[unix_]server(), which is an
async method -- so it cannot happen during __init__ anymore.

Python 3.7+ adds the ability to create the server (and thus the bind()
call) and begin the active listening in separate steps, but we don't
have that functionality in 3.6, our current minimum.

Therefore ... Add a temporary workaround that allows the synchronous
version of the client to bind the socket in advance, guaranteeing that
there will be a UNIX socket in the filesystem ready for the QEMU client
to connect to without a race condition.

(Yes, it's a bit ugly. Fixing it more nicely will have to wait until our
minimum Python version is 3.7+.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20220201041134.1237016-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 31f59af395922b7f40799e75db6e15ff52d8f94a
      
https://github.com/qemu/qemu/commit/31f59af395922b7f40799e75db6e15ff52d8f94a
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-02-03 (Thu, 03 Feb 2022)

  Changed paths:
    M python/Pipfile.lock
    M python/qemu/aqmp/legacy.py
    M python/qemu/aqmp/protocol.py
    M python/qemu/aqmp/qmp_client.py
    M python/qemu/machine/machine.py
    M python/setup.cfg
    M tests/qemu-iotests/tests/mirror-top-perms

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' 
into staging

Python patches

Peter: I expect this to address the iotest 040,041 failures you observed
on NetBSD. If it doesn't, let me know.

# gpg: Signature made Thu 03 Feb 2022 01:59:32 GMT
# gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jsnow-gitlab/tags/python-pull-request:
  python/aqmp: add socket bind step to legacy.py
  python: upgrade mypy to 0.780
  python/machine: raise VMLaunchFailure exception from launch()
  python/aqmp: Fix negotiation with pre-"oob" QEMU

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/8f3e5ce773c6...31f59af39592



reply via email to

[Prev in Thread] Current Thread [Next in Thread]