Skip to content
New issue

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

./placementoptimizer.py showremapped --by-osd throws KeyError if there is recovery #39

Open
patrakov opened this issue Apr 15, 2024 · 0 comments

Comments

@patrakov
Copy link

$ ./placementoptimizer.py showremapped --state broken-cluster-1.xz --by-osd
Traceback (most recent call last):
  File "/tmp/bug-report/./placementoptimizer.py", line 5496, in <module>
    exit(main())
         ^^^^^^
  File "/tmp/bug-report/./placementoptimizer.py", line 5490, in main
    run()
  File "/tmp/bug-report/./placementoptimizer.py", line 5460, in <lambda>
    run = lambda: showremapped(args, state)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/bug-report/./placementoptimizer.py", line 5346, in showremapped
    print(f"{osdname}: {cluster.osds[osdid]['host_name']}  =>{sum_to} {sum_data_to_pp} <={sum_from} {sum_data_from_pp}"
                        ~~~~~~~~~~~~^^^^^^^
KeyError: -1

Without the --by-osd flag, it works:

$ ./placementoptimizer.py showremapped --state broken-cluster-1.xz
pg 28.28c degraded+waiting   55.7G: 0 of 1008986, 0.0%, -1->120
pg 28.272 degraded+waiting   55.6G: 570 of 1003522, 0.1%, -1->120
pg 28.277 degraded+waiting   55.5G: 0 of 1004690, 0.0%, -1->84
...

broken-cluster-1.xz will be sent by email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant