We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
$ 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:
subprocess.check_output
byte
split
for line in subprocess.check_output(['ceph', 'osd', 'pool', 'ls', 'detail']).split('\n'):
OSDS
list
OSDS = subprocess.check_output(['ceph', 'osd', 'ls', '-f', 'json'])
valid_osds
osds
str
def valid_osds(osds): valid = [] for osd in osds: if str (osd) in OSDS: valid.append(osd) return valid
I'll submit a PR with the various fixes.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Hello,
First of all, thank you for this script !
I had a few issues running the script with python 3 on Centos 7.
The output of
subprocess.check_output
is of typebyte
, so it needs to be decoded before being able to usesplit
:OSDS
is not a listFor the same reason, OSDS is
byte
and notlist
:valid_osds
Casting
osds
tostr
is useless and breaks the lookup in :I'll submit a PR with the various fixes.
The text was updated successfully, but these errors were encountered: