It's possible our current map is older, we were destroyed then, but in
newer maps our osd was recreated. This happens when the oldest map after
a recreated osd happens to land on an epoch where the osd was marked
destroyed.
Fix by only exiting if one of the newest maps says we are (still)
destroyed.
Fixes: http://tracker.ceph.com/issues/22673
Signed-off-by: Sage Weil <sage@redhat.com>
When initializing the global context, global_init parses command line
arguments and removes ceph global args from the list. As a result they
are not visible for rbd command line parser and global options were
ignored when passing them to subprocesses like nbd or ggate.
Fix this by keeping a list of ceph global init command line
arguments. To build the list we compare the list of initial command
line args and those that remain after global_init parsing.
After this fix it is possible to pass any ceph global option to a
subprocess.
Signed-off-by: Mykola Golub <mgolub@suse.com>
* refs/pull/19803/head:
mds: get rid of unnecessary if condition
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
* refs/pull/19860/head:
cephfs-journal-tool: add usage help info for header set <field>
mds: add error log info
cephfs-journal-tool: add "set pool_id" option
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
If we receive a write within the scrub range, abort the scrub chunk and
shrink the chunk size. If we do this too many times do not preempt and
allow the scrub to complete (to avoid scrub starvation due to client io).
Signed-off-by: Sage Weil <sage@redhat.com>
This is needed to determine (quickly) whether PGs have split. Calling
get_pg_num() on the latest map does not work when the pool has been
deleted from that map.
Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: re-write of _update_calc_stats and improve pg degraded state
Fixes: http://tracker.ceph.com/issues/20059
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
a25221e551 introduced a new, 64bit
pg state field, retaining encoding and decoding of least significant
32 bits for compatibility reasons.
This commit also adds encoding of entire 64bit state field, meaning
that the least significant bits are encoded and decoded twice.
Fix this by encoding each half of 64bit field separately.
Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
Fields state, purged_snaps and snaptrimq_len are new to Mimic.
Reorder them in a way that newest field (snaptrimq_len) is before
two others and uses other encoding version, so the pull request
https://github.com/ceph/ceph/pull/19520 can be backported to Luminous
without breaking Luminous -> Mimic upgrade.
This also changes encoding/decoding version back to 24 as both state
and purged snaps were added post-Luminous and pre-Mimic, so we can
push it into a single struct version and keep snaptrimq_len into other
version.
Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
mon/OSDMonitor.cc : set erasure-code-profile to "" when create replicated pools.
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
"rcceph" is a SysVinit-style command-line interface for stopping, starting,
enabling, etc. all ceph-osd and ceph-mon systemd units on a machine, in one go.
Since the same functionality is provided by ceph-{osd,mon}.target, the script
is obsolete. It is also unmaintained. Judging from the absence of recent
mentions of the script online, I guess it is no longer used.
Leaving dead code in the tree can cause confusion, especially when the code is
packaged and shipped to customers. Therefore I propose to rip it out.
Signed-off-by: Nathan Cutler <ncutler@suse.com>