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
3 changes: 2 additions & 1 deletion tools/upmap/upmap-remapped.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# Hacked by: Dan van der Ster <daniel.vanderster@cern.ch>


import json, subprocess, sys
import json, subprocess, sys, re

try:
import rados
Expand Down Expand Up @@ -159,6 +159,7 @@ def rm_upmap_pg_items(pgid):
cmd = {"prefix": "osd dump", "format": "json"}
ret, output, errs = cluster.mon_command(json.dumps(cmd), b'', timeout=5)
osd_dump_json = output.decode('utf-8').strip()
osd_dump_json = re.sub(r':\s*inf\b', ': "inf"', osd_dump_json)
upmaps = json.loads(osd_dump_json)['pg_upmap_items']
except ValueError:
eprint('Error loading existing upmaps')
Expand Down