Fixes: https://tracker.ceph.com/issues/58679
Signed-off-by: Nizamudeen A <nia@redhat.com>
def get_daemon_health(daemon):
health = {
- 'health': MirrorHealth.MIRROR_HEALTH_UNKNOWN
+ 'health': MirrorHealth.MIRROR_HEALTH_DISABLED
}
for _, pool_data in daemon['status'].items():
if (health['health'] != MirrorHealth.MIRROR_HEALTH_ERROR
health = {
'health': MirrorHealth.MIRROR_HEALTH_WARNING
}
- elif health['health'] == MirrorHealth.MIRROR_HEALTH_INFO:
+ elif health['health'] == MirrorHealth.MIRROR_HEALTH_DISABLED:
health = {
'health': MirrorHealth.MIRROR_HEALTH_OK
}
_status = {
1: {
- 'callouts': {},
+ 'callouts': {
+ 'image': {
+ 'level': 'warning',
+ }
+ },
'image_local_count': 5,
'image_remote_count': 6,
'image_error_count': 7,
self.assertStatus(200)
summary = self.json_body()['rbd_mirroring']
+ # 2 warnings: 1 for the daemon, 1 for the pool
self.assertEqual(summary, {'errors': 0, 'warnings': 2})