Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/upmap/upmap-remapped.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)

try:
OSDS = json.loads(subprocess.getoutput('ceph osd ls -f json | jq -r'))
OSDS = json.loads(subprocess.getoutput('ceph osd ls -f json | jq -r .'))
DF = json.loads(subprocess.getoutput('ceph osd df -f json | jq -r .nodes'))
except ValueError:
eprint('Error loading OSD IDs')
Expand Down Expand Up @@ -93,7 +93,7 @@ def rm_upmap_pg_items(pgid):

# discover remapped pgs
try:
remapped_json = subprocess.getoutput('ceph pg ls remapped -f json | jq -r')
remapped_json = r'{}'.format(subprocess.getoutput('ceph pg ls remapped -f json | jq -r .'))
remapped = json.loads(remapped_json)
except ValueError:
eprint('Error loading remapped pgs')
Expand All @@ -108,7 +108,7 @@ def rm_upmap_pg_items(pgid):
sys.exit(0)

# discover existing upmaps
osd_dump_json = subprocess.getoutput('ceph osd dump -f json | jq -r')
osd_dump_json = subprocess.getoutput('ceph osd dump -f json | jq -r .')
osd_dump = json.loads(osd_dump_json)
upmaps = osd_dump['pg_upmap_items']

Expand Down