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

mon/PGMonitor: max avail is 0 if some OSD's weight is 0 #6660

Merged
merged 1 commit into from Nov 26, 2015

Conversation

chengyli
Copy link
Contributor

In get_rule_avail(), even p->second is 0, it's possible to be used
as divisor and quotient is infinity, then is converted to an integer
which is negative value.

So we should check p->second value before calculation.

Signed-off-by: Chengyuan Li chengyli@ebay.com

@xiaoxichen
Copy link
Contributor

could you pls change the title to mon/PGMonitor: max avail is 0 if some OSD's weight is 0
and also the commit message title.And put the fix bug 13840 in the commit message body.

Rest looks good

@chengyli chengyli changed the title BUG #13840: MAX AVAIL is 0 if some OSDs' weight is 0 mon/PGMonitor: max avail is 0 if some OSD's weight is 0 Nov 20, 2015
@chengyli
Copy link
Contributor Author

Thanks Xiaoxi.
I've done the changes.

@xiaoxichen
Copy link
Contributor

LTGM

@tchaikov , is that OK for a QA run? as Cinder is using "ceph df" to get available space of Ceph, this bug will take down cinder.

@chengyli
Copy link
Contributor Author

Anyone knows the reason of this Jenkin build failure? Looks that this is not related with the code change.

First time build. Skipping changelog.
Triggering ceph ? centos-7&&x86_64
Touchstone configurations resulted in FAILURE, so aborting...
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Triggering a new build of ceph-report
Finished: FAILURE

@xiaoxichen
Copy link
Contributor

ping @dachary

@ghost
Copy link

ghost commented Nov 20, 2015

@chengyli it timedout after one hour (usually takes max 30 minutes). There unfortunately is not much information in this case and you should try run-make-check.sh locally to reproduce the problem. Feel free to rebase and repush to trigger the bot one more time, to verify this is not a false negative.

In get_rule_avail(), even p->second is 0, it's possible to be used
as divisor and quotient is infinity, then is converted to an integer
which is negative value.
So we should check p->second value before calculation.

It fixes BUG ceph#13840.

Signed-off-by: Chengyuan Li <chengyli@ebay.com>
@chengyli
Copy link
Contributor Author

@dachary thanks for the instructions.
The local run-make-check.sh is successful, and I also triggered a repush 2 hours ago. Can you see the Jenkins status of this round ?

if test -d "ceph-9.2.0"; then find "ceph-9.2.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "ceph-9.2.0" || { sleep 5 && rm -rf "ceph-9.2.0"; }; else :; fi
make check: successful run on 18713e6

@tchaikov
Copy link
Contributor

lgtm with a rados qa run

liewegas added a commit that referenced this pull request Nov 26, 2015
mon: fix ceph df pool available calculation for 0-weighted OSDs

Reviewed-by: Kefu Chai <kchai@redhat.com>
@liewegas liewegas merged commit 55487ee into ceph:master Nov 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants