From 612f5ab52cfb235664c2ec25fc37ab934d2a0453 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 18 Jun 2019 20:34:25 -0400 Subject: [PATCH] Strip pv_block from stdout --- node-daemon/pvcd/CephInstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-daemon/pvcd/CephInstance.py b/node-daemon/pvcd/CephInstance.py index 9b60d5db..86f239f8 100644 --- a/node-daemon/pvcd/CephInstance.py +++ b/node-daemon/pvcd/CephInstance.py @@ -243,7 +243,7 @@ def remove_osd(zk_conn, logger, osd_id, osd_obj): retcode, stdout, stderr = common.run_os_command('readlink /var/lib/ceph/osd/ceph-{}/block'.format(osd_id)) vg_name = stdout.split('/')[-2] # e.g. /dev/ceph-/osd-block- retcode, stdout, stderr = common.run_os_command('vgs --separator , --noheadings -o pv_name {}'.format(vg_name)) - pv_block = stdout + pv_block = stdout.strip() # 6. Zap the volumes logger.out('Zapping OSD disk with ID {} on {}'.format(osd_id, pv_block), state='i')