-
Notifications
You must be signed in to change notification settings - Fork 28
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
ZeroDivisionError: division by zero (osd_objs_acting) #36
Comments
An attempt to log the variables yields this:
So, as a hack, I applied this change: --- placementoptimizer.py.orig 2024-03-15 16:38:09.351499650 +0000
+++ placementoptimizer.py 2024-03-15 16:41:37.158122020 +0000
@@ -2058,7 +2058,9 @@
# calculated by weighting osd metadata sizes by pg object counts
pg_objects = self.pgs[pgid]['stat_sum']['num_objects']
- metadata_estimate = int(meta_amount * pg_objects / osd_objs_acting)
+ if osd_objs_acting == 0:
+ logging.info(f"meta_amount: {meta_amount}, pg_objects: {pg_objects}, osd_objs_acting: {osd_objs_acting}")
+ metadata_estimate = int(meta_amount * pg_objects / osd_objs_acting) if osd_objs_acting else 0
estimates = self.pgs[pgid]["metadata_estimates"]
estimates[osdid] = metadata_estimate The first few upmaps that it generates make sense to me, but I don't think I actually need 100 pg moves. The added logging line has triggered only once. |
I think I already fixed this in 38e5d5f :) |
Fixed indeed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another attempt of balancing the same half-broken cluster as in #35 after some CRUSH map cleanup yields this:
The debug archive will be sent via email, but note that this is a large cluster, so it exceeds your message size limit, so I will have to split the archive.
The text was updated successfully, but these errors were encountered: