try:
j = json.loads(data)
except ValueError:
- self.log.exception('unable to laod extra_ceph_conf')
+ msg = 'Unable to load extra_ceph_conf: Cannot decode JSON'
+ self.log.exception('%s: \'%s\'', msg, data)
return CephadmOrchestrator.ExtraCephConf('', None)
return CephadmOrchestrator.ExtraCephConf(j['conf'], str_to_datetime(j['last_modified']))
self.log.debug(f'image {image_name} -> {r}')
return r
except (ValueError, KeyError) as _:
- msg = 'Failed to pull %s on %s: %s' % (image_name, host, '\n'.join(out))
- self.log.exception(msg)
+ msg = 'Failed to pull %s on %s: Cannot decode JSON' % (image_name, host)
+ self.log.exception('%s: \'%s\'' % (msg, '\n'.join(out)))
raise OrchestratorError(msg)
@trivial_completion
})
try:
j = json.loads(out)
- except Exception as e:
+ except ValueError:
+ msg = 'Failed to parse health status: Cannot decode JSON'
+ logger.exception('%s: \'%s\'' % (msg, out))
raise OrchestratorError('failed to parse health status')
return j['status']