File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def eprint(*args, **kwargs):
4444 print (* args , file = sys .stderr , ** kwargs )
4545
4646try :
47- OSDS = json .loads (subprocess .getoutput ('ceph osd ls -f json | jq -r' ))
47+ OSDS = json .loads (subprocess .getoutput ('ceph osd ls -f json | jq -r . ' ))
4848 DF = json .loads (subprocess .getoutput ('ceph osd df -f json | jq -r .nodes' ))
4949except ValueError :
5050 eprint ('Error loading OSD IDs' )
@@ -93,7 +93,7 @@ def rm_upmap_pg_items(pgid):
9393
9494# discover remapped pgs
9595try :
96- remapped_json = subprocess .getoutput ('ceph pg ls remapped -f json | jq -r' )
96+ remapped_json = r'{}' . format ( subprocess .getoutput ('ceph pg ls remapped -f json | jq -r .' ) )
9797 remapped = json .loads (remapped_json )
9898except ValueError :
9999 eprint ('Error loading remapped pgs' )
@@ -108,7 +108,7 @@ def rm_upmap_pg_items(pgid):
108108 sys .exit (0 )
109109
110110# discover existing upmaps
111- osd_dump_json = subprocess .getoutput ('ceph osd dump -f json | jq -r' )
111+ osd_dump_json = subprocess .getoutput ('ceph osd dump -f json | jq -r . ' )
112112osd_dump = json .loads (osd_dump_json )
113113upmaps = osd_dump ['pg_upmap_items' ]
114114
You can’t perform that action at this time.
0 commit comments