qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f26bd6: python/aqmp: Fix disconnect during ca


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] f26bd6: python/aqmp: Fix disconnect during capabilities ne...
Date: Tue, 16 Nov 2021 22:46:57 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f26bd6ff21df2f1d155ca17eef360423b706ab7f
      
https://github.com/qemu/qemu/commit/f26bd6ff21df2f1d155ca17eef360423b706ab7f
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

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

  Log Message:
  -----------
  python/aqmp: Fix disconnect during capabilities negotiation

If we receive ConnectionResetError (ECONNRESET) while attempting to
perform capabilities negotiation -- prior to the establishment of the
async reader/writer tasks -- the disconnect function is not aware that
we are in an error pathway.

As a result, when attempting to close the StreamWriter, we'll see the
same ConnectionResetError that caused us to initiate a disconnect in the
first place, which will cause the disconnect task itself to fail, which
emits a CRITICAL logging event.

I still don't know if there's a smarter way to check to see if an
exception received at this point is "the same" exception as the one that
caused the initial disconnect, but for now the problem can be avoided by
improving the error pathway detection in the exit path.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 25de7f50121f251c45d111582d786db7ce0768d3
      
https://github.com/qemu/qemu/commit/25de7f50121f251c45d111582d786db7ce0768d3
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

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

  Log Message:
  -----------
  python/aqmp: fix ConnectError string method

When ConnectError is used to wrap an Exception that was initialized
without an error message, we are treated to a traceback with a rubbish
line like this:

... ConnectError: Failed to establish session:

Correct this to use the name of an exception as a fallback message:

... ConnectError: Failed to establish session: EOFError

Better!

Signed-off-by: John Snow <jsnow@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 47b43acd57e6e0b2910683f00a758adbc418dde6
      
https://github.com/qemu/qemu/commit/47b43acd57e6e0b2910683f00a758adbc418dde6
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M scripts/device-crash-test

  Log Message:
  -----------
  scripts/device-crash-test: simplify Exception handling

We don't need to handle KeyboardInterruptError specifically; we can
instead tighten the scope of the broad Exception handlers to only catch
"Exception", which has the effect of allowing all BaseException classes
that do not inherit from Exception to be raised through.

KeyboardInterruptError and a few other important ones are
BaseExceptions, so this does the same thing with less code.

Signed-off-by: John Snow <jsnow@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 76f86e78b255d17aad2ebd1177069c86f08039ef
      
https://github.com/qemu/qemu/commit/76f86e78b255d17aad2ebd1177069c86f08039ef
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M scripts/device-crash-test

  Log Message:
  -----------
  scripts/device-crash-test: don't emit AQMP connection errors to stdout

These errors are expected, so they shouldn't clog up terminal output. In
the event that they're *not* expected, we'll be seeing an awful lot more
output concerning the nature of the failure.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c398a241ec4138e0b995a0215dea84ca93b0384f
      
https://github.com/qemu/qemu/commit/c398a241ec4138e0b995a0215dea84ca93b0384f
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M scripts/device-crash-test

  Log Message:
  -----------
  scripts/device-crash-test: hide tracebacks for QMP connect errors

Generally, the traceback for a connection failure is uninteresting and
all we need to know is that the connection attempt failed.

Reduce the verbosity in these cases, except when debugging.

Signed-off-by: John Snow <jsnow@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 67f9968ce3f0847ffddb6ee2837a3641acd92abf
      
https://github.com/qemu/qemu/commit/67f9968ce3f0847ffddb6ee2837a3641acd92abf
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update version for v6.2.0-rc1 release

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 8d5fcb1990bc64b62c0bc12121fe510940be5664
      
https://github.com/qemu/qemu/commit/8d5fcb1990bc64b62c0bc12121fe510940be5664
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-11-17 (Wed, 17 Nov 2021)

  Changed paths:
    M python/qemu/aqmp/protocol.py
    M scripts/device-crash-test

  Log Message:
  -----------
  Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging

Pull request

# gpg: Signature made Wed 17 Nov 2021 01:33:06 AM CET
# gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]

* tag 'python-pull-request' of https://gitlab.com/jsnow/qemu:
  scripts/device-crash-test: hide tracebacks for QMP connect errors
  scripts/device-crash-test: don't emit AQMP connection errors to stdout
  scripts/device-crash-test: simplify Exception handling
  python/aqmp: fix ConnectError string method
  python/aqmp: Fix disconnect during capabilities negotiation

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/56f4f41e0206...8d5fcb1990bc



reply via email to

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