The function is used for opening sessions for importing caps. It didn't
set client metadata for new sessions.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Having lots of deletes will mean deletes on objects that don't exist,
which will in turn mean error log entries and more coverage of the
append_log_entries_update_missing code. Hopefully this will trigger
http://tracker.ceph.com/issues/24597
Signed-off-by: Sage Weil <sage@redhat.com>
The log trimming case wasn't quite right. Before HEAD^ we were
rolling forward too aggressively and miscalculating the can_rollforward_to,
which affected the trim_to calculation.
Signed-off-by: Sage Weil <sage@redhat.com>
If we are told we can roll forward by the primary, we should only roll
forward as far as the primary says we can.
This probably came out of the similar case in append_log(), but notably
that roll_forward() only happens if !transaction_applied (i.e., backfill
target), and that condition is not checked here.
Fixes: http://tracker.ceph.com/issues/24597
Signed-off-by: Sage Weil <sage@redhat.com>
Although is preferred and should be enabled by default users might
want to disable SSL as the dashboard might be running behind a proxy
which terminates the SSL.
Fixes: https://tracker.ceph.com/issues/24674
Signed-off-by: Wido den Hollander <wido@42on.com>
* refs/pull/22784/head:
doc: fix Ceph FS
doc: new label and glossary url
doc: drop linking to itself
Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/22455/head:
qa/ceph-volume: add a test for put_object_versioned()
ceph-volume-client: allow atomic updates for RADOS objects
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Before the commit following race can happen:
```
A : OpTracker::visit_ops_in_flight(..., callable leaking TrackedOpRef outside)
A : Mutex::Locker::Locker(sdata->ops_in_flight_lock_sharded)
A with lock : (nref > 0) == true
B : TrackedOp::put(), nref := 0 // updating the counter is done without the lock
B : OpTracker::unregister_inflight_op()
B : Mutex::Locker::Locker(sdata->ops_in_flight_lock_sharded)
A with lock : visit() -> TrackedOp::get(), nref := 1
A with lock : Mutex::Locker::~Locker()
B with lock : boost::intrusive::list::iterator_to(op)
B with lock : boost::intrusive::list::erase(iter)
B with lock : Mutex::Locker::~Locker()
A : TrackedOp::put(), nref := 0
A : OpTracker::unregister_inflight_op()
A : Mutex::Locker::Locker(sdata->ops_in_flight_lock_sharded)
A with lock : boost::intrusive::list::iterator_to(op) // oops as op doesn't belong to the list anymore
```
Fixes: https://tracker.ceph.com/issues/24664
Related-To: https://tracker.ceph.com/issues/24037
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
by moving ConfigValues out of md_config_t, we are able to point
md_config_t to a new ConfigValues instance at runtime, without
destroying the old one.
also remove ConfigReader, because all md_config_obs_t will be updated
with ConfigProxy now. as md_config_t is not able to offer the *data*
anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
this change introduce three classes: ConfigValues, ConfigProxy and
ConfigReader. in seastar port of OSD, each CPU shard will hold its own
reference of configuration, and upon changes of settings, each
shard will be updated with the new setting in async. so this forces us
to be able to keep two set of configuration at the same time. so we
need to extract the changeable part of md_config_t out. so we can
replace the old one with new one on demand, and let different shards
share the same unchanged part, amon the other things, the Options map
and the lookup tables. that's why we need ConfigValues. we will add
a policy template for this class, so we can specialize for Seastar
implementation to allow different ConfigProxy instances to point
md_config_impl<> to different ConfigValues.
because the observer interface is still using md_config_t, to minimise
the impact of this change, handle_conf_change() and
handle_subsys_change() are not changed. but as it accepts a `const
md_config_t`, which cannot be used to create/reference the ConfigProxy
holding it, we need to introduce ConfigReader for reading the updated
setting from md_config_t in a simpler way, without exposing the
internal "values" member variable.
Signed-off-by: Kefu Chai <kchai@redhat.com>
I'm sure people will still find them, but let's at least
force people to click through one more time to get to the
commands that can damage your cluster.
Also, the ".. danger" directive at the top of the page
wasn't actually getting special formatting, so I changed
it to a ".. warning" which is red.
Signed-off-by: John Spray <john.spray@redhat.com>
Selecting force peering on a single PG. In reality this probably induces
*2* interval changes.
Note that in the case of a single OSD cluster we can't actually force a
repeer on a single PG because the pg_temp code is pretty robust about
filtering out redundant or meaningless changes, so we can't pg_temp our
way into a new interval if there are no other OSDs to switch to and the
code also prevents an empty pg_temp.
Signed-off-by: Sage Weil <sage@redhat.com>
The global_init_postfork/prefork helpers close stdout/stdin/stderr on
fork and reopen /dev/null in their place. This ensures that if later
code writes to those descriptors (e.g., a stray cout or cerr usage) the
output/input will go nowhere instead of interfering with some other open
fd.
However, with the use of preforker, there are other threads running when
these helpers are run, which means we can race with, say, filestore
opening an object file and end up sending log output there.
Fix by atomically replacing the fds with the dup2(2) syscall, which
will implicitly close and reopen the target fd in an atomic fashion. This
behavior is present on both Linux and FreeBSD.
Fixes: http://tracker.ceph.com/issues/23492
Signed-off-by: Sage Weil <sage@redhat.com>
for instance, GCC-8 on riscv64 does not offer atomic ops like
__atomic_fetch_or_1, so we need to link against libatomic to get access
to these symbols.
Signed-off-by: Kefu Chai <kchai@redhat.com>