Sage Weil [Sat, 3 Apr 2021 13:14:00 +0000 (09:14 -0400)]
cephadm: normalize unqualified repo digests to docker.io
A RepoDigests returned by docker|podman image inspect can either include
the docker.io/ prefix or not. For reasons that aren't entirely clear,
this may vary between hosts in a cluster. However, ceph/ceph@sha256:abc...
is the same thing as docker.io/ceph/ceph@sha256:abc..., and should be
treated as such. Otherwise, upgrade can get into a loop where it pulls
the image on a new host, finds the other variant of the repodigests,
sees no overlap, updates target_digests, and restarts. (It will then
find the first variant again on the first host and loop.)
Avoid this by normalizing any docker.io digests by always including the
docker.io/ prefix.
Note that it is technically possible that this assumption is wrong: it
may be that the image that already exists on the local host is from a
different registry in registries.conf's unqualified-search-registries.
However, we don't know which, since this is a search list. In practice,
it should be exceeding rare that an image that *we* are installing using
a fully-qualified image name will end up having an unqualified repodigest
in the local registry. Hopefully!
Fixes: https://tracker.ceph.com/issues/50114 Signed-off-by: Sage Weil <sage@newdream.net>
If we get an unqualified target image, assume it's docker.io. This
ensures that we're passing a fully-qualified target to docker|podman on
the various hosts and don't end up with something different based on the
per-host search path for unqualified image names.
Nathan Cutler [Fri, 26 Mar 2021 10:03:34 +0000 (11:03 +0100)]
rpm: drop extraneous explicit sqlite-libs runtime dependency
Commit 75980798f19b8c11efd75ba4aae3e491d4c99f98 introduced a new package,
libcephsqlite, with a hard RPM dependency on a package "sqlite-libs" which
does not exist in openSUSE.
Since the runtime library dependencies of libcephsqlite are handled by RPM
transparently, this line is not needed.
Patrick Donnelly [Fri, 26 Mar 2021 22:13:07 +0000 (15:13 -0700)]
Merge PR #38732 into master
* refs/pull/38732/head:
client: fire the finish_cap_snap() after buffer being flushed
client: simplify the iterating code
client: remove unused _flushed_cap_snap
client: clean up the code
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Thu, 25 Mar 2021 20:05:02 +0000 (15:05 -0500)]
mgr/cephadm: make upgrade progress bar mention target version, not repo digest
The repo digest is super long and meaningless for a human user. Instead,
use the target version (as soon as we know what it is--until then, use
the target image name).
Ilya Dryomov [Tue, 23 Mar 2021 09:40:18 +0000 (10:40 +0100)]
crimson/monc: discard active/pending connections when reopening
Otherwise pending_conns vector just keeps growing with redundant
connections all trying to reach the same set of monitors. When one
of the attempts finally succeeds, _finish_auth() will pick the first
connection with a matching entity_addr_t, designate it as active and
close all others. The match is very likely to be wrong and hence the
actual authenticated connection gets closed, leaving the OSD with
a bogus active_con and no monitor session.
Sage Weil [Fri, 26 Mar 2021 12:19:06 +0000 (08:19 -0400)]
Merge PR #40321 into master
* refs/pull/40321/head:
cephadm: fix parsing of keepalived version (drop leading 'v')
cephadm: keepalived needs --cap-add=NET_RAW
cephadm: fix --cap-add=NET_ADMIN
cephadm: fix quoting for keepalived env var
mgr/cephadm: ha-rgw: use correct port
GC behavior still needs a ton of work, but this adjustment should
reduce gc activity for now until we have time to refine the params
and introduce the ability to write cold extents to a segment other
than the current journal segment.
Ilya Dryomov [Wed, 24 Mar 2021 15:23:44 +0000 (16:23 +0100)]
auth: require CEPHX_V2 by default
It's been almost three years and support is present in all relevant
clients.
From the security perspective, roughly the same could be achieved
with "ceph osd set-require-min-compat-client nautilus", but this is
more user friendly as the client gets ENOTSUP instead of spinning on
"feature set mismatch" faults.
Kefu Chai [Thu, 25 Mar 2021 09:08:48 +0000 (17:08 +0800)]
run-make-check.sh: let ctest generate XML output
to enable XUnit plugin of jenkins to consume the ctest output and
publish it in the dashboard, we need to
* let ctest generate XML output instead of plain text output
* do not fail the test if any test case fails. this allows the publisher
to do its job by checking the XML output.
* prevent ctest from compressing the output. see
https://issues.jenkins.io/browse/JENKINS-21737
Aashish Sharma [Thu, 25 Mar 2021 05:55:37 +0000 (11:25 +0530)]
mgr/dashboard:Simplify some complex calculations in test_alerts.yml
run-promtool-unittests is failing with difference in floating point values in some complex calculations. This PR intends to simplify those calculations and fix this issue.
Kefu Chai [Thu, 25 Mar 2021 04:04:37 +0000 (12:04 +0800)]
osd/PeeringState: init last_require_osd_release in ctor
so we can use the latest osdmap to tell what is the required osd release in
*current* cluster before consuming a new osdmap which is fed to
PeeringState only if we advance to a new map.
a osd shares its pg_info using MOSDPGInfo2 or MOSDPGInfo according to
PeeringState::last_require_osd_release, this happens before a new osdmap
is fully consumed.
Adam C. Emerson [Wed, 24 Mar 2021 19:47:42 +0000 (15:47 -0400)]
rgw: Remove spurious `num_rados_handles` option
While any code that used the option is gone, it appears the option
itself was accidentally resurrected in various options.cc refactors
and transitions.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Sage Weil [Tue, 23 Mar 2021 16:56:59 +0000 (11:56 -0500)]
os/bluestore: separate omap per-pool vs per-pg alerts
Currently the health alert raised does not match the docs, and the docs
do not describe what the health alert indicates.
Octopus added per-pool omap storage. This improves space accounting
and reporting.
Pacific added per-pg omap storage (object hash in key). This speeds up
PG removal.
Separate everthing out into two distinct alerts raised from bluestore
and surfaced as health alerts, with corresponding config options to
disable, and update the docs accordingly.
Also update the fsck options for warn vs error, and raise separate
errors for the per-pg and per-pool cases.
Kefu Chai [Sun, 21 Mar 2021 14:59:03 +0000 (22:59 +0800)]
debian/rules: exclude ceph_crypto from dh_shlibdep
as libceph_crypto* are plugins, and they are not self-contained. they
reference symbols offered by the executable loading them. dh_shlibdep
should not complain when checking them, so add them to the exclude list.
Otherwise, we might end up looping trying to gc based on the reclaimable
metric but be unable to actually find a reclaimable segment. Mainly a
problem in unit tests that artificially force replay prior rolling the
first journal segment.