If there is no recovery op started, there is no need to create a RecoveryCtx
and later delete all of the things in it.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
lockdep can't handle recursive locks, resulting in false positive
reports for certain set_val_or_die() calls, like via
md_config_t::parse_argv() passed "-m".
Fixes: #12614
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
The boost mt code uses uninitialized memory for extra randomness,
which is a bad idea in general but more importantly makes valgrind
unhappy. Use /dev/urandom instead.
Unfortunately this introduces a link time dependency.. meh!
Fixes: #12736
Signed-off-by: Sage Weil <sage@redhat.com>
make parsing 8601 more flexible by not restricting the length of seconds
to 5, this allows timestamp to be specified both as ms or us. Newer
keystone backends such as fernet token backend default to microseconds
when publishing iso8601 timestamps, so this allows these timestamps to
be allowed when specifying the token expiry time.
Fixes: #12761
Reported-by: Ian Unruh <ianunruh@gmail.com>
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
When increasing the pg_num of a pool, an assert would fail since the
calculated pgid seed would be for the pool's new pg_num value instead
of the previous pg_num value.
Fixes: #10399
Backport: infernalis, hammer, firefly
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
With cache disabled, closing the image will result in a flush
which might result in the image being refreshed. If this happens
while the image is set to an invalid snapshot, an error will be
returned while closing the image.
Fixes: #12765
Backport: infernalis
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
We need to wait for cleanup to flush before we destroy the
sequencer or else we get a use-after-free.
Introduced e7bbafa3bf.
Fixes: #12766
Signed-off-by: Sage Weil <sage@redhat.com>
Benchmarks have shown that the trylock in the lock path has a high
latency cost. Only pay the penalty if instrumentation is actually
enabled.
While we are at it, avoid the duplicate conditional check so that
the fast path is faster.
Signed-off-by: Sage Weil <sage@redhat.com>
* we do not persist current hit set using get_hit_set_current_object()
anymore, instead we always append current hitset into archive even
!hitset.is_full(), see fbd9c15. so it's not necessary to remove the
current hitset object before putting it to disk.
Signed-off-by: Kefu Chai <kchai@redhat.com>
allow "ceph osd pool set $pool use_gmt_hitset <true|1>" as long as
the cluster supports gmt hitset.
Fixes: #9732
Signed-off-by: Kefu Chai <kchai@redhat.com>
* bump the encoding version of pg_hit_set_info_t to 2, so we can
tell if the corresponding hit_set is named using localtime or
GMT
* bump the encoding version of pg_pool_t to 20, so we can know
if a pool is using GMT to name the hit_set archive or not. and
we can tell if current cluster allows OSDs not support GMT
mode or not.
* add an option named `osd_pool_use_gmt_hitset`. if enabled,
the cluster will try to use GMT mode when creating a new pool
if all the the up OSDs support GMT mode. if any of the
pools in the cluster is using GMT mode, then only OSDs
supporting GMT mode are allowed to join the cluster.
Fixes: #9732
Signed-off-by: Kefu Chai <kchai@redhat.com>
If there are a lot of crush rules (say, 100) then the test can
take a long time. 100 values per rule should be enough to catch
most issues.
Signed-off-by: Sage Weil <sage@redhat.com>
Ignore the profile 'directory' field.
This ensures that we can always find plugins even when teh cluster
is installed across a mix of distros.
Rename the option to have no osd_ (or mon_) prefix since anybody
may use the ec factory/plugin code.
We still hard-code .libs in the unit tests... sigh.
Signed-off-by: Sage Weil <sage@redhat.com>