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

pybind/mgr/balancer: two more fixes #20788

Merged
merged 3 commits into from Mar 9, 2018
Merged

Conversation

xiexingguo
Copy link
Member

No description provided.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@liewegas Yet another balancer-fix against ZeroDivisionError

We don't care about the values here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
To avoid crashes as below:
```
File "/usr/lib/ceph/mgr/balancer/module.py", line 181, in calc_stats
    score += target[k] * (math.erf(((adjusted - avg)/avg) / math.sqrt(2.0)))
ZeroDivisionError: float division by zero
```

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@tchaikov tchaikov merged commit 8426e1b into ceph:master Mar 9, 2018
@xiexingguo
Copy link
Member Author

@tchaikov Thanks!

@xiexingguo xiexingguo deleted the wip-balancer-04 branch March 10, 2018 01:29
@tchaikov
Copy link
Contributor

@xiexingguo i guess your fixes for balancer also apply to luminous. do you think it's worthwhile to backport them?

@xiexingguo
Copy link
Member Author

@xiexingguo i guess your fixes for balancer also apply to luminous. do you think it's worthwhile to backport them?

@tchaikov I did backport them. See #20359 (because these new fixes relies on that PR too) 😂

@tchaikov
Copy link
Contributor

@xiexingguo wow, great! thanks!

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