-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
Hello,
First of all, thank you for this script !
I had a few issues running the script with python 3 on Centos 7.
$ python3 -V
Python 3.6.8- Error loading remapped pgs
$ python3 scripts/upmap-remapped.py
Error loading remapped pgs
The output of subprocess.check_output is of type byte, so it needs to be decoded before being able to use split:
for line in subprocess.check_output(['ceph', 'osd', 'pool', 'ls', 'detail']).split('\n'):OSDSis not a list
For the same reason, OSDS isbyteand notlist:
OSDS = subprocess.check_output(['ceph', 'osd', 'ls', '-f', 'json'])- Harmful cast in
valid_osds
Castingosdstostris useless and breaks the lookup in :
def valid_osds(osds):
valid = []
for osd in osds:
if str (osd) in OSDS:
valid.append(osd)
return validI'll submit a PR with the various fixes.
Metadata
Metadata
Assignees
Labels
No labels