diff --git a/client-cli/pvc.py b/client-cli/pvc.py index 042a1a19..6fb32310 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -1144,7 +1144,7 @@ def ceph_status(): zk_conn = pvc_common.startZKConnection(zk_host) retcode, retdata = pvc_ceph.get_status(zk_conn) - if retdata: + if retcode: pvc_ceph.format_status(retdata) retdata = '' cleanup(retcode, retdata, zk_conn) diff --git a/client-common/ceph.py b/client-common/ceph.py index e4315cd4..0373cab2 100644 --- a/client-common/ceph.py +++ b/client-common/ceph.py @@ -112,14 +112,13 @@ def get_status(zk_conn): 'primary_node': primary_node, 'ceph_status': ceph_status } - return status_data + return True, status_data def format_status(status_data): click.echo('{bold}Ceph cluster status (primary node {end}{blue}{primary}{end}{bold}){end}\n'.format(bold=ansiprint.bold(), end=ansiprint.end(), blue=ansiprint.blue(), primary=status_data['primary_node'])) click.echo(status_data['ceph_status']) click.echo('') - # # OSD functions #