osd: make stat_bytes and stat_bytes_used counters PRIO_USEFUL
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
placement_rule is no longer needed in cls_user_bucket_entry, because the
only time that it's needed, we can read it from the bucket instance in
RGWRados::update_containers_stats()
Signed-off-by: Casey Bodley <cbodley@redhat.com>
with the fallback in RGWRados::update_containers_stats(), we no longer
need to pass placement_rule into the cls_user_bucket_entry
this removes the dependency between bucket entrypoint metadata and its
bucket instance metadata during multisite sync
Fixes: http://tracker.ceph.com/issues/21990
Signed-off-by: Casey Bodley <cbodley@redhat.com>
in case the cls_user_bucket_entry doesn't contain a placement_rule, take
it from the bucket instance info
Signed-off-by: Casey Bodley <cbodley@redhat.com>
The verbose output is helpful for debugging and understanding what is
being measured, but most of the time all that you care about is the score.
Signed-off-by: Sage Weil <sage@redhat.com>
To avoid getting stuck in a local minima, take a few additional
steps if our score drops and see if it gets better.
Signed-off-by: Sage Weil <sage@redhat.com>
Phase out the osd_weight values as we optimize the crush compat
weight set. Allow a small regression in overall score if it means
we are taking a step to remove the osd_weight value.
Fix the 'osd reweightn' invocation.
Signed-off-by: Sage Weil <sage@redhat.com>
..and fix the 'worse' threshold (we're just working around floating
point imprecision; 1.01 was too coarse).
Signed-off-by: Sage Weil <sage@redhat.com>
- it does multiple iterations, like the upmap optimizer.
- it decreases the step size if it isn't improving, in the hope
that it is overshooting the minimum
- debug output is cleaned up a bit (the info level should be
genuinely useful)
Signed-off-by: Sage Weil <sage@redhat.com>
Otherwise, when someone wants to see what's possible
to do with `mgr module enable` they have to trawl
through the whole mgr map dump.
Signed-off-by: John Spray <john.spray@redhat.com>
Some extra coverage of the dashboard, including its standby
redirect mode and the publishing of URIs.
Also invoking the command_spam mode of the selftest module.
Signed-off-by: John Spray <john.spray@redhat.com>
These didn't need to keep the GIL to go and do their
pure C++ parts, and by keeping it they could deadlock
while trying to take ActiveMgrModules::lock.
Signed-off-by: John Spray <john.spray@redhat.com>
A bunch of the previous commits were done
before this class existed, so updating in
one go instead of trying to edit history
in fine detail.
Signed-off-by: John Spray <john.spray@redhat.com>
Was passing a reference to a local stringstream into
Thread::create, not realising that it was taking a char*
reference instead of a copy. Result was garbage (or usually,
all threads having the name of the last one created)
Signed-off-by: John Spray <john.spray@redhat.com>