]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: have agent check for errors before json loading mgr response 57768/head
authorAdam King <adking@redhat.com>
Wed, 17 Apr 2024 15:36:12 +0000 (11:36 -0400)
committerAdam King <adking@redhat.com>
Wed, 29 May 2024 12:38:47 +0000 (08:38 -0400)
commitc24fc326cf27c8065a2ccdffccc6dddcb4b69111
treee46554d098027bfadfa05711060a9a648c9d9eba
parent49fa1622ee1c9d889b2e76c494999e49ddbf2255
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