]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephadm: have agent check for errors before json loading mgr response
authorAdam King <adking@redhat.com>
Wed, 17 Apr 2024 15:36:12 +0000 (11:36 -0400)
committerAdam King <adking@redhat.com>
Tue, 27 Aug 2024 14:04:57 +0000 (10:04 -0400)
commite0da4195d0bcc8385010638fb8044b9b96785b8b
treecff73d51e9a099f8e6bf1f91ae37a0a129604323
parentfe43f1c9f9e2945dda7244d8acbd33fb921449af
cephadm: have agent check for errors before json loading mgr response

Currently, since it tries to json.loads the response
payload before checking the return code, if there was
an error it fails with

Failed to send metadata to mgr: the JSON object must be str, bytes or bytearray, not ConnectionRefusedError

which is masking the actual failure.

Also adds more context to the RuntimeError raised

Fixes: https://tracker.ceph.com/issues/65553
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 287bd34eec09815602700747c62e0a709e6e5ff0)
src/cephadm/cephadm.py