]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoqa/suites/upgrade/octopus-x: disable insecure global_id reclaim health warnings
Sage Weil [Thu, 25 Mar 2021 17:36:56 +0000 (13:36 -0400)]
qa/suites/upgrade/octopus-x: disable insecure global_id reclaim health warnings

These will trigger on upgrade; suppress them so that our health gates
will still work.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 3e80f61efeafc186ea8130984d64c05b2707d6ba)

Conflicts:
qa/suites/upgrade/octopus-x/rgw-multisite/overrides.yaml [
  commit b6773dd3f197 ("qa/rgw: add octopus-x upgrade suite for
  multisite") not in pacific ]

4 years agoqa/tasks/ceph[adm].conf[.template]: disable insecure global_id reclaim health alerts
Sage Weil [Fri, 26 Mar 2021 22:08:46 +0000 (18:08 -0400)]
qa/tasks/ceph[adm].conf[.template]: disable insecure global_id reclaim health alerts

Turn these off everywhere for our tests so they don't interfere with our health checks.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9f6fd4fe563c9cd4cf65316921d511b677c972e4)

4 years agocephadm: set auth_allow_insecure_global_id_reclaim for mon on bootstrap
Sage Weil [Fri, 26 Mar 2021 16:02:50 +0000 (12:02 -0400)]
cephadm: set auth_allow_insecure_global_id_reclaim for mon on bootstrap

If this is a fresh pacific cluster, let's assume that there won't be
legacy clients connecting.  (And if there are, let's put the burden on
the user to enable them to do so insecurely.)

This is in contrast to upgrades, where our focus is on not breaking
anything.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 7ca74183226b1125b29f4ea8f324ae9e38b46795)

4 years agomon/HealthMonitor: raise AUTH_INSECURE_GLOBAL_ID_RENEWAL[_ALLOWED]
Sage Weil [Thu, 25 Mar 2021 22:07:53 +0000 (18:07 -0400)]
mon/HealthMonitor: raise AUTH_INSECURE_GLOBAL_ID_RENEWAL[_ALLOWED]

Two new alerts:

- AUTH_INSECURE_GLOBAL_ID_RENEWAL_ALLOWED if we are allowing clients to reclaim
global_ids in an insecure manner (for backwards compatibility until
clients are upgraded)

- AUTH_INSECURE_GLBOAL_ID_RENEWAL if there are currently clients connected that
do not know how to securely renew their global_id, as exposed by
auth_expose_insecure_global_id_reclaim=true.  The client auth names and IPs
are listed the alert details (up to a limit, at least).

The docs recommend operators mute these alerts instead of silencing, but
we still include option that allow the alerts to be disabled entirely.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 18b343b06e5dd904af425dc99e2c848e12f3b552)

4 years agoauth/cephx: ignore CEPH_ENTITY_TYPE_AUTH in requested keys
Ilya Dryomov [Tue, 2 Mar 2021 14:09:26 +0000 (15:09 +0100)]
auth/cephx: ignore CEPH_ENTITY_TYPE_AUTH in requested keys

When handling CEPHX_GET_AUTH_SESSION_KEY requests from nautilus+
clients, ignore CEPH_ENTITY_TYPE_AUTH in CephXAuthenticate::other_keys.
Similarly, when handling CEPHX_GET_PRINCIPAL_SESSION_KEY requests,
ignore CEPH_ENTITY_TYPE_AUTH in CephXServiceTicketRequest::keys.
These fields are intended for requesting service tickets, the auth
ticket (which is really a ticket granting ticket) must not be shared
this way.

Otherwise we end up sharing an auth ticket that a) isn't encrypted
with the old session key even if needed (should_enc_ticket == true)
and b) has the wrong validity, namely auth_service_ticket_ttl instead
of auth_mon_ticket_ttl.  In the CEPHX_GET_AUTH_SESSION_KEY case, this
undue ticket immediately supersedes the actual auth ticket already
encoded in the same reply (the reply frame ends up containing two auth
tickets).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 05772ab6127bdd9ed2f63fceef840f197ecd9ea8)

4 years agoauth/cephx: rotate auth tickets less often
Ilya Dryomov [Mon, 22 Mar 2021 18:16:32 +0000 (19:16 +0100)]
auth/cephx: rotate auth tickets less often

If unauthorized global_id (re)use is disallowed, a client that has
been disconnected from the network long enough for keys to rotate
and its auth ticket to expire (i.e. become invalid/unverifiable)
would not be able to reconnect.

The default TTL is 12 hours, resulting in a 12-24 hour reconnect
window (the previous key is kept around, so the actual window can be
up to double the TTL).  The setting has stayed the same since 2009,
but it also hasn't been enforced.  Bump it to get a 72 hour reconnect
window to cover for something breaking on Friday and not getting fixed
until Monday.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 522a52e6c258932274f0753feb623ce008519216)

4 years agomon: fail fast when unauthorized global_id (re)use is disallowed
Ilya Dryomov [Thu, 25 Mar 2021 19:59:13 +0000 (20:59 +0100)]
mon: fail fast when unauthorized global_id (re)use is disallowed

When unauthorized global_id (re)use is disallowed, we don't want to
let unpatched clients in because they wouldn't be able to reestablish
their monitor session later, resulting in subtle hangs and disrupted
user workloads.

Denying the initial connect for all legacy (CephXAuthenticate < v3)
clients is not feasible because a large subset of them never stopped
presenting their ticket on reconnects and are therefore compatible with
enforcing mode: most notably all kernel clients but also pre-luminous
userspace clients.  They don't need to be patched and excluding them
would significantly hamper the adoption of enforcing mode.

Instead, force clients that we are not sure about to reconnect shortly
after they go through authentication and obtain global_id.  This is
done in Monitor::dispatch_op() to capture both msgr1 and msgr2, most
likely instead of dispatching mon_subscribe.

We need to let mon_getmap through for "ceph ping" and "ceph tell" to
work.  This does mean that we share the monmap, which lets the client
return from MonClient::authenticate() considering authentication to be
finished and causing the potential reconnect error to not propagate to
the user -- the client would hang waiting for remaining cluster maps.
For msgr1, this is unavoidable because the monmap is sent immediately
after the final MAuthReply.  But for msgr2 this is rare: most of the
time we get to their mon_subscribe and cut the connection before they
process the monmap!

Regardless, the user doesn't get a chance to start a workload since
there is no proper higher-level session at that point.

To help with identifying clients that need patching, add global_id and
global_id_status to "sessions" output.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 08766a17edebb7450cd9b17cc2dc01efc068bb94)

4 years agoauth/cephx: option to disallow unauthorized global_id (re)use
Ilya Dryomov [Sat, 13 Mar 2021 13:53:52 +0000 (14:53 +0100)]
auth/cephx: option to disallow unauthorized global_id (re)use

global_id is a cluster-wide unique id that must remain stable for the
lifetime of the client instance.  The cephx protocol has a facility to
allow clients to preserve their global_id across reconnects:

(1) the client should provide its global_id in the initial handshake
    message/frame and later include its auth ticket proving previous
    possession of that global_id in CEPHX_GET_AUTH_SESSION_KEY request

(2) the monitor should verify that the included auth ticket is valid
    and has the same global_id and, if so, allow the reclaim

(3) if the reclaim is allowed, the new auth ticket should be
    encrypted with the session key of the included auth ticket to
    ensure authenticity of the client performing reclaim.  (The
    included auth ticket could have been snooped when the monitor
    originally shared it with the client or any time the client
    provided it back to the monitor as part of requesting service
    tickets, but only the genuine client would have its session key
    and be able to decrypt.)

Unfortunately, all (1), (2) and (3) have been broken for a while:

- (1) was broken in 2016 by commit a2eb6ae3fb57 ("mon/monclient:
  hunt for multiple monitor in parallel") and is addressed in patch
  "mon/MonClient: preserve auth state on reconnects"

- it turns out that (2) has never been enforced.  When cephx was
  being designed and implemented in 2009, two changes to the protocol
  raced with each other pulling it in different directions: commits
  0669ca21f4f7 ("auth: reuse global_id when requesting tickets")
  and fec31964a12b ("auth: when renewing session, encrypt ticket")
  added the reclaim mechanism based strictly on auth tickets, while
  commit 5eeb711b6b2b ("auth: change server side negotiation a bit")
  allowed the client to provide global_id in the initial handshake.
  These changes didn't get reconciled and as a result a malicious
  client can assign itself any global_id of its choosing by simply
  passing something other than 0 in MAuth message or AUTH_REQUEST
  frame and not even bother supplying any ticket.  This includes
  getting a global_id that is being used by another client.

- (3) was broken in 2019 with addition of support for msgr2, where
  the new auth ticket ends up being shared unencrypted.  However the
  root cause is deeper and a malicious client can coerce msgr1 into
  the same.  This also goes back to 2009 and is addressed in patch
  "auth/cephx: ignore CEPH_ENTITY_TYPE_AUTH in requested keys".

Because (2) has never been enforced, no one noticed when (1) got
broken and we began to rely on this flaw for normal operation in
the face of reconnects due to network hiccups or otherwise.  As of
today, only pre-luminous userspace clients and kernel clients are
not exercising it on a daily basis.

Bump CephXAuthenticate version and use a dummy v3 to distinguish
between legacy clients that don't (may not) include their auth ticket
and new clients.  For new clients, unconditionally disallow claiming
global_id without a corresponding auth ticket.  For legacy clients,
introduce a choice between permissive (current behavior, default for
the foreseeable future) and enforcing mode.

If the reclaim is disallowed, return EACCES.  While MonClient does
have some provision for global_id changes and we could conceivably
implement enforcement by handing out a fresh global_id instead of
the provided one, those code paths have never been tested and there
are too many ways a sudden global_id change could go wrong.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit abebd643cc60fa8a7cb82dc29a9d5041fb3c3d36)

4 years agoauth/cephx: make cephx_decode_ticket() take a const ticket_blob
Ilya Dryomov [Tue, 30 Mar 2021 09:10:17 +0000 (11:10 +0200)]
auth/cephx: make cephx_decode_ticket() take a const ticket_blob

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6b860684c6e59b11c727206819805f89f0518575)

4 years agoauth/AuthServiceHandler: keep track of global_id and whether it is new
Ilya Dryomov [Tue, 9 Mar 2021 15:33:55 +0000 (16:33 +0100)]
auth/AuthServiceHandler: keep track of global_id and whether it is new

AuthServiceHandler already has global_id field, but it is unused.
Revive it and let the handler know whether global_id is newly assigned
by the monitor or provided by the client.

Lift the setting of entity_name into AuthServiceHandler.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit b50b6abd60e730176a7ef602bdd25d789a3c467d)

4 years agoauth/AuthServiceHandler: build_cephx_response_header() is cephx-specific
Ilya Dryomov [Tue, 9 Mar 2021 13:36:39 +0000 (14:36 +0100)]
auth/AuthServiceHandler: build_cephx_response_header() is cephx-specific

Make the one in CephxServiceHandler private and drop the stub in
AuthNoneServiceHandler.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 49cba02a750d4c1ab68399401f0c04f9c9be5b9e)

4 years agoauth/AuthServiceHandler: drop unused start_session() args
Ilya Dryomov [Tue, 9 Mar 2021 13:25:39 +0000 (14:25 +0100)]
auth/AuthServiceHandler: drop unused start_session() args

session_key, connection_secret and connection_secret_required_length
aren't material for start_session() across all three implementations.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit c151c9659bdb71f30b520bbd62f91cc009ec51cd)

4 years agomon/MonClient: drop global_id arg from _add_conn() and _add_conns()
Ilya Dryomov [Tue, 30 Mar 2021 13:19:41 +0000 (15:19 +0200)]
mon/MonClient: drop global_id arg from _add_conn() and _add_conns()

Passing anything but MonClient instance's global_id doesn't make
sense.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit a71f6e90d43cca5a79db92ca6a640598796ae7ee)

4 years agomon/MonClient: reset auth state in shutdown()
Ilya Dryomov [Thu, 1 Apr 2021 08:55:36 +0000 (10:55 +0200)]
mon/MonClient: reset auth state in shutdown()

Destroying AuthClientHandler and not resetting global_id is another
way to get MonClient to send CEPHX_GET_AUTH_SESSION_KEY requests with
CephXAuthenticate::old_ticket not populated.  This is particularly
pertinent to get_monmap_and_config() which shuts down the bootstrap
MonClient between retry attempts.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit c9b022e07392979e7f9ea6c11484a7dd872cc235)

4 years agomon/MonClient: preserve auth state on reconnects
Ilya Dryomov [Mon, 8 Mar 2021 14:37:02 +0000 (15:37 +0100)]
mon/MonClient: preserve auth state on reconnects

Commit a2eb6ae3fb57 ("mon/monclient: hunt for multiple monitor in
parallel") introduced a regression where auth state (global_id and
AuthClientHandler) was no longer preserved on reconnects.  The ensuing
breakage was quickly noticed and prompted a follow-on fix 8bb6193c8f53
("mon/MonClient: persist global_id across re-connecting").

However, as evident from the subject, the follow-on fix only took
care of the global_id part.  AuthClientHandler is still destroyed
and all cephx tickets are discarded.  A new from-scratch instance
is created for each MonConnection and CEPHX_GET_AUTH_SESSION_KEY
requests end up with CephXAuthenticate::old_ticket not populated.
The bug is in MonClient, so both msgr1 and msgr2 are affected.

This should have resulted in a similar sort of breakage but didn't
because of a much larger bug.  The monitor should have denied the
attempt to reclaim global_id with no valid ticket proving previous
possession of that global_id presented.  Alas, it appears that this
aspect of the cephx protocol has never been enforced.  This is dealt
with in the next patch.

To fix the issue at hand, clone AuthClientHandler into each
MonConnection so that each respective CEPHX_GET_AUTH_SESSION_KEY
request gets a copy of the current auth ticket.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 236b536b28482ec9d8b872de03da7d702ce4787b)

4 years agomon/MonClient: claim active_con's auth explicitly
Ilya Dryomov [Sat, 6 Mar 2021 10:15:40 +0000 (11:15 +0100)]
mon/MonClient: claim active_con's auth explicitly

Eliminate confusion by moving auth from active_con into MonClient
instead of swapping them.

The existing MonClient::auth can be destroyed right away -- I don't
see why active_con would need it or a reason to delay its destruction
(which is what stashing in active_con effectively does).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit eec24e4d119c57c7eb5119dc0083616a61b33b89)

4 years agomon/MonClient: resurrect "waiting for monmap|config" timeouts
Ilya Dryomov [Thu, 1 Apr 2021 08:07:00 +0000 (10:07 +0200)]
mon/MonClient: resurrect "waiting for monmap|config" timeouts

This fixes a regression introduced in commit 85157d5aae3d ("mon:
s/Mutex/ceph::mutex/").  Waiting for monmap and config indefinitely
is not just bad UX, it actually masks other more serious bugs.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6faa18e0a8e8efba6bd2978942eb9909b6568d5c)

4 years agoqa/tasks/ceph.conf: shorten cephx TTL for testing
Sage Weil [Mon, 5 Apr 2021 18:08:30 +0000 (13:08 -0500)]
qa/tasks/ceph.conf: shorten cephx TTL for testing

Rotate tickets frequently to exercise those code paths during testing.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 94df76244798cdc0bafd74c9e5197adb5aa990c0)

4 years ago16.2.0 v16.2.0
Jenkins Build Slave User [Tue, 30 Mar 2021 21:13:28 +0000 (21:13 +0000)]
16.2.0

4 years agoMerge pull request #40452 from smithfarm/wip-50029-pacific
Josh Durgin [Tue, 30 Mar 2021 21:00:12 +0000 (14:00 -0700)]
Merge pull request #40452 from smithfarm/wip-50029-pacific

pacific: rpm: drop extraneous explicit sqlite-libs runtime dependency

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
4 years agoMerge pull request #40455 from liewegas/pacific-final-status
Josh Durgin [Tue, 30 Mar 2021 20:12:01 +0000 (13:12 -0700)]
Merge pull request #40455 from liewegas/pacific-final-status

pacific: ceph_release: rc -> stable

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40217 from liewegas/cephadm-default-image-pacific
Josh Durgin [Tue, 30 Mar 2021 20:11:36 +0000 (13:11 -0700)]
Merge pull request #40217 from liewegas/cephadm-default-image-pacific

pacific: cephadm: update default image (DNM until right before final release)

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge PR #40473 into pacific
Sage Weil [Tue, 30 Mar 2021 00:25:54 +0000 (19:25 -0500)]
Merge PR #40473 into pacific

* refs/pull/40473/head:
mgr/cephadm/upgrade: ignore deployed_by until mgr is upgraded

Reviewed-by: Adam King <adking@redhat.com>
4 years agomgr/cephadm/upgrade: ignore deployed_by until mgr is upgraded 40473/head
Sage Weil [Mon, 29 Mar 2021 13:42:03 +0000 (08:42 -0500)]
mgr/cephadm/upgrade: ignore deployed_by until mgr is upgraded

Until we upgrade the mgr itself, we will never be able to make our
deployed daemons have a deployed_by == target_digests.  Ignore those
daemons until the mgr is the right version.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit bb00de5c40bf70e2b9cd14c3890d0be05d7d984b)

4 years agoceph_release: rc -> stable 40455/head
Sage Weil [Sun, 28 Mar 2021 21:37:26 +0000 (16:37 -0500)]
ceph_release: rc -> stable

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge PR #40437 into pacific
Sage Weil [Sun, 28 Mar 2021 18:07:27 +0000 (13:07 -0500)]
Merge PR #40437 into pacific

* refs/pull/40437/head:
mgr/cephadm: make upgrade progress bar mention target version, not repo digest
doc/cephadm: fix rgw realm and zone flags
mgr/volumes: do not overwrite existant mds specs
mgr/cephadm: no-overwite flag for apply command
mgr/orchestrator: remove image name field from 'orch ps' and 'orch ls'
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
cephadm: validate fsid during cephadm shell command

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
4 years agoMerge PR #40436 into pacific
Sage Weil [Sun, 28 Mar 2021 14:28:19 +0000 (09:28 -0500)]
Merge PR #40436 into pacific

* refs/pull/40436/head:
auth: require CEPHX_V2 by default

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
4 years agoMerge PR #40425 into pacific
Sage Weil [Sun, 28 Mar 2021 14:27:45 +0000 (09:27 -0500)]
Merge PR #40425 into pacific

* refs/pull/40425/head:
test_ipaddr: check that we correctly skip loopback
common/ipaddr: also skip just `lo`

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agomgr/cephadm: make upgrade progress bar mention target version, not repo digest 40437/head
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).

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 521cb8ab225561e0d29e215ffc63f293555ca00d)

4 years agodoc/cephadm: fix rgw realm and zone flags
Daniel Pivonka [Fri, 26 Mar 2021 19:13:18 +0000 (15:13 -0400)]
doc/cephadm: fix rgw realm and zone flags

Signed-off-by: Daniel Pivonka <dpivonka@redhat.com>
(cherry picked from commit 41a1df1b96903bf283cf4ffc40e3d18eb54c447e)

4 years agomgr/volumes: do not overwrite existant mds specs
Adam King [Thu, 25 Mar 2021 20:29:03 +0000 (16:29 -0400)]
mgr/volumes: do not overwrite existant mds specs

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit f6f7ae4c4c88324969f554d99b42b27d50209cfb)

4 years agomgr/cephadm: no-overwite flag for apply command
Adam King [Wed, 24 Mar 2021 18:29:28 +0000 (14:29 -0400)]
mgr/cephadm: no-overwite flag for apply command

no-overwrite flag makes it so cephadm will only apply the spec
if the spec does not already exist.

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 248173efcdebf67d4dae3bf8b4d26122d6eca911)

4 years agorpm: drop extraneous explicit sqlite-libs runtime dependency 40452/head
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.

Fixes: https://tracker.ceph.com/issues/50007
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 4025858570f270f8997478f95ffeec4eda8beafc)

4 years agoMerge pull request #40432 from smithfarm/wip-opensuse-usrmerged-pacific
Yuri Weinstein [Fri, 26 Mar 2021 19:18:37 +0000 (12:18 -0700)]
Merge pull request #40432 from smithfarm/wip-opensuse-usrmerged-pacific

pacific: ceph.spec: prepare openSUSE usrmerge (boo#1029961)

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #40372 from batrick/49935
Yuri Weinstein [Fri, 26 Mar 2021 17:47:55 +0000 (10:47 -0700)]
Merge pull request #40372 from batrick/49935

pacific: libcephfs: test termination "what(): Too many open files"

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge PR #40422 into pacific
Patrick Donnelly [Fri, 26 Mar 2021 17:31:05 +0000 (10:31 -0700)]
Merge PR #40422 into pacific

* refs/pull/40422/head:
src/tools/cephfs-top: fix flake8 line too long error
cephfs-top: include additional metrics reported by `fs perf stats`.

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40417 from racpatel/wip-cepfstop-fixinterval
Venky Shankar [Fri, 26 Mar 2021 17:19:50 +0000 (22:49 +0530)]
Merge pull request #40417 from racpatel/wip-cepfstop-fixinterval

pacific: cephfs-top: allow configurable stats refresh interval

Reviewed-by: Venky Shankar <vshankar@redhat.com>
4 years agoMerge pull request #40402 from joscollin/wip-49973-pacific
Venky Shankar [Fri, 26 Mar 2021 17:19:31 +0000 (22:49 +0530)]
Merge pull request #40402 from joscollin/wip-49973-pacific

pacific: cephfs-top: be resilient to missing client metadata keys

Reviewed-by: Venky Shankar <vshankar@redhat.com>
4 years agoMerge pull request #40358 from tchaikov/pacific-pr-39937
Yuri Weinstein [Fri, 26 Mar 2021 16:09:50 +0000 (09:09 -0700)]
Merge pull request #40358 from tchaikov/pacific-pr-39937

pacific: mgr: add mon metada using type of "mon"

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoMerge pull request #40371 from batrick/i49932
Yuri Weinstein [Fri, 26 Mar 2021 15:34:03 +0000 (08:34 -0700)]
Merge pull request #40371 from batrick/i49932

pacific: MDS should return -ENODATA when asked to remove xattr that doesn't exist

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40308 from varshar16/wip-49685-pacific
Yuri Weinstein [Fri, 26 Mar 2021 15:33:25 +0000 (08:33 -0700)]
Merge pull request #40308 from varshar16/wip-49685-pacific

pacific: tools/cephfs-shell: fix listing of symbolic links

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #40307 from varshar16/wip-49713-pacific
Yuri Weinstein [Fri, 26 Mar 2021 15:32:50 +0000 (08:32 -0700)]
Merge pull request #40307 from varshar16/wip-49713-pacific

pacific: mgr/volumes/nfs: Add command to update cephfs exports

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40252 from singuliere/wip-49852-pacific
Yuri Weinstein [Fri, 26 Mar 2021 15:32:25 +0000 (08:32 -0700)]
Merge pull request #40252 from singuliere/wip-49852-pacific

pacific: mds: fix race of fetching large dirfrag

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40251 from singuliere/wip-49854-pacific
Yuri Weinstein [Fri, 26 Mar 2021 15:31:55 +0000 (08:31 -0700)]
Merge pull request #40251 from singuliere/wip-49854-pacific

pacific: client: avoid cct being released while instances are still using it

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40109 from lxbsz/wip-49520-pacific
Yuri Weinstein [Fri, 26 Mar 2021 15:31:08 +0000 (08:31 -0700)]
Merge pull request #40109 from lxbsz/wip-49520-pacific

pacific: client: wake up the front pos waiter

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge pull request #40108 from lxbsz/wip-49609-pacific
Yuri Weinstein [Fri, 26 Mar 2021 15:30:19 +0000 (08:30 -0700)]
Merge pull request #40108 from lxbsz/wip-49609-pacific

pacific: qa: remove passed_validation check for test_damage

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40419 from badone/wip-pacific-revert-pr-39983
Josh Durgin [Fri, 26 Mar 2021 15:25:01 +0000 (08:25 -0700)]
Merge pull request #40419 from badone/wip-pacific-revert-pr-39983

Revert "mgr/dashboard:test prometheus rules through promtool"

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
4 years agoMerge pull request #40416 from neha-ojha/wip-onode-resiliant-to-split-cache-pacific
Josh Durgin [Fri, 26 Mar 2021 15:18:47 +0000 (08:18 -0700)]
Merge pull request #40416 from neha-ojha/wip-onode-resiliant-to-split-cache-pacific

pacific: os/bluestore: Make Onode::put/get resiliant to split_cache

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40391 from neha-ojha/wip-49965-pacific
Neha Ojha [Fri, 26 Mar 2021 15:12:34 +0000 (08:12 -0700)]
Merge pull request #40391 from neha-ojha/wip-49965-pacific

pacific: common/options: bluefs_buffered_io=true by default

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agomgr/orchestrator: remove image name field from 'orch ps' and 'orch ls'
Adam King [Thu, 18 Mar 2021 17:20:46 +0000 (13:20 -0400)]
mgr/orchestrator: remove image name field from 'orch ps' and 'orch ls'

Now that we're typically using the image digests the name isn't as helpful. We also
end up in scenarios where some images use tags for their name and others use the
digest so the image name comes out as "mix" in orch ls despite it being the same image.

Fixes: https://tracker.ceph.com/issues/47333
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 30c9210d9763ff01f4780194342fcfad6c6b6344)

4 years agocephadm: fix parsing of keepalived version (drop leading 'v')
Sage Weil [Wed, 24 Mar 2021 16:25:08 +0000 (12:25 -0400)]
cephadm: fix parsing of keepalived version (drop leading 'v')

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f33bf0647bab441993777827903bf046c1c3d80a)

4 years agocephadm: keepalived needs --cap-add=NET_RAW
Sage Weil [Wed, 24 Mar 2021 16:06:48 +0000 (12:06 -0400)]
cephadm: keepalived needs --cap-add=NET_RAW

This makes

Mar 24 12:00:32 dael conmon[3969650]: Wed Mar 24 16:00:32 2021: cant open raw socket. errno=1

go away and allows it to enter the MASTER state.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 3368844d02f52dddc25db982e586d2c2b303abf4)

4 years agocephadm: fix --cap-add=NET_ADMIN
Sage Weil [Wed, 24 Mar 2021 15:58:34 +0000 (11:58 -0400)]
cephadm: fix --cap-add=NET_ADMIN

Podman wants the = sign.  This aligns us with the other --cap-add user
(SYS_PTRACE), which uses =.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 6a176b02b13c7551705ecffcff4285d52b58e526)

4 years agocephadm: fix quoting for keepalived env var
Sage Weil [Wed, 24 Mar 2021 15:57:45 +0000 (11:57 -0400)]
cephadm: fix quoting for keepalived env var

This was broken by 3ea514c5525cd21722ef3fe9b90363c21e483596

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 40e29b97863950a474adc20fccadf145e75dd8f6)

4 years agomgr/cephadm: ha-rgw: use correct port
Sage Weil [Mon, 22 Mar 2021 19:30:42 +0000 (14:30 -0500)]
mgr/cephadm: ha-rgw: use correct port

The DaemonDescription includes the port that RGW is bound to; use that
in the haproxy configuration.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 401e7255062ef45e2c15d7f30dcddc3822cb67ed)

4 years agocephadm: validate fsid during cephadm shell command
Daniel Pivonka [Wed, 10 Mar 2021 23:01:35 +0000 (18:01 -0500)]
cephadm: validate fsid during cephadm shell command

Signed-off-by: Daniel Pivonka <dpivonka@redhat.com>
(cherry picked from commit 9118b08365b24c3fe26f3dcdc4bf88d8ccbcbce0)

4 years agoauth: require CEPHX_V2 by default 40436/head
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.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit e5744672dbde2a897f5f4959339472b7b10c5688)

4 years agoMerge PR #40355 into pacific
Sage Weil [Fri, 26 Mar 2021 12:17:42 +0000 (07:17 -0500)]
Merge PR #40355 into pacific

* refs/pull/40355/head:
mgr/cephadm: Fix dashboard gateway configuration when using IPV6
qa/workunits/cephadm/test_cephadm: specify image separately
mgr/cephadm: retry after JSONDecodeError in wait_for_mgr_restart()
cephadm: prevent podman from breaking socket.getfqdn()
qa/tasks/cephadm: use 'orch apply mon' to deploy mons
qa/suites/rados/cephadm/upgrade: add centos upgrade on latest octopus
mgr/cephadm/upgrade: do not crash if error races with user cancellation
doc/cephfs/nfs: Add note about cephadm NFS-Ganesha daemon port
cephadm: only bootstrap using image that matches cephadm version
mgr/cephadm: redeploy daemons deployed using old image during upgrade
mgr/cephadm: add container digests of mgr that deployed daemon to unit.meta

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
4 years agoMerge PR #40410 into pacific
Sage Weil [Fri, 26 Mar 2021 12:17:14 +0000 (07:17 -0500)]
Merge PR #40410 into pacific

* refs/pull/40410/head:
os/bluestore: separate omap per-pool vs per-pg alerts

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agosrc/tools/cephfs-top: fix flake8 line too long error 40422/head
Varsha Rao [Fri, 26 Mar 2021 09:38:33 +0000 (15:08 +0530)]
src/tools/cephfs-top: fix flake8 line too long error

Fixes: https://tracker.ceph.com/issues/50005
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 51cf6c3d14883797faa2c2ea4a94f65f26bdf2ef)

4 years agoceph.spec: prepare openSUSE usrmerge (boo#1029961) 40432/head
Ludwig Nussel [Thu, 25 Mar 2021 09:32:21 +0000 (10:32 +0100)]
ceph.spec: prepare openSUSE usrmerge (boo#1029961)

The compat symlink in /sbin is no longer required and actually in
the way in the usrmerge case.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
(cherry picked from commit e4c4a4ce97fff8a5b4efa747d9cffeabcceedd25)

4 years agotest_ipaddr: check that we correctly skip loopback 40425/head
Dan van der Ster [Tue, 23 Mar 2021 10:28:37 +0000 (11:28 +0100)]
test_ipaddr: check that we correctly skip loopback

We should skip devices named 'lo' or of the form 'lo:0' regardless
of their IP address.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Related-to: https://tracker.ceph.com/issues/49938
(cherry picked from commit 780125d1ed93cd7b17172752b3e76186a524103b)

4 years agocommon/ipaddr: also skip just `lo`
Dan van der Ster [Tue, 23 Mar 2021 08:00:11 +0000 (09:00 +0100)]
common/ipaddr: also skip just `lo`

Skip iface's with name like 'lo' or of the form 'lo:0', 'lo:1'. This
brings back the original behavior from b6d0fc9e0e515e50894c08217d688a8c94db7570

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Fixes: https://tracker.ceph.com/issues/49938
(cherry picked from commit 6147c0917157efd2d35610e759685656a4989abb)

4 years agocephfs-top: include additional metrics reported by `fs perf stats`.
Venky Shankar [Thu, 25 Mar 2021 09:40:28 +0000 (05:40 -0400)]
cephfs-top: include additional metrics reported by `fs perf stats`.

Without this, `cephfs-top` hits an exception since the additional
metrics keys were not configured.

Also, include a validation suring selftest that checks if `ceph
fs perf stats` metrics match what cephfs-top is configured to
report.

Fixes: http://tracker.ceph.com/issues/49974
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 5a119dcc13354549071dddae96e9fb6f7df747e5)

4 years agoMerge pull request #40405 from tchaikov/pacific-pr-40400
Kefu Chai [Fri, 26 Mar 2021 01:27:23 +0000 (09:27 +0800)]
Merge pull request #40405 from tchaikov/pacific-pr-40400

pacific: run-make-check.sh: let ctest generate XML output

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoRevert "mgr/dashboard:test prometheus rules through promtool" 40419/head
Brad Hubbard [Thu, 25 Mar 2021 23:57:14 +0000 (09:57 +1000)]
Revert "mgr/dashboard:test prometheus rules through promtool"

Reverts: https://github.com/ceph/ceph/pull/39983

This is currently blocking testing on ubuntu on the eve of a pacific
release. The problems associated with this PR have been resolved
upstream but have not been backported yet and are non-trivial.

This reverts commit be7f9e704c8d9ab70713a78c9a83481b5e26ee79.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
4 years agoMerge pull request #40361 from sseshasa/wip-pacific-release-note
Neha Ojha [Thu, 25 Mar 2021 17:42:01 +0000 (10:42 -0700)]
Merge pull request #40361 from sseshasa/wip-pacific-release-note

pacific: PendingReleaseNotes: Document mclock scheduler refinements and profiles

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agocephfs-top: signal main thread to exit on SIGINT/SIGTERM 40417/head
Rachana Patel [Tue, 23 Mar 2021 08:47:34 +0000 (08:47 +0000)]
cephfs-top: signal main thread to exit on SIGINT/SIGTERM

Fixes: http://tracker.ceph.com/issues/49953
Signed-off-by: Rachana Patel <racpatel@redhat.com>
(cherry picked from commit 6ea5cb5ff3380ccf6c2e0ca3f838f803173d0582)

4 years agocephfs-top: allow configurable stats refresh interval
Rachana Patel [Tue, 23 Mar 2021 04:40:56 +0000 (04:40 +0000)]
cephfs-top: allow configurable stats refresh interval

Signed-off-by: Rachana Patel <racpatel@redhat.com>
(cherry picked from commit abd4ae9f9b1bdf1f4d7ee7b10baa9c8ec03303fc)

4 years agoos/bluestore: acquire proper lock in split_cache() 40416/head
Igor Fedotov [Fri, 19 Mar 2021 09:53:20 +0000 (12:53 +0300)]
os/bluestore: acquire proper lock in split_cache()

Fixes: https://tracker.ceph.com/issues/49900
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 35a3f7be8f2f204ad3b5e720d0534ca3e2a8587c)

4 years agoos/bluestore: Make Onode::put/get resiliant to split_cache
Adam Kupczyk [Mon, 22 Mar 2021 10:20:11 +0000 (11:20 +0100)]
os/bluestore: Make Onode::put/get resiliant to split_cache

In
  OnodeCacheShard* ocs = c->get_onode_cache();
  std::lock_guard l(ocs->lock);
while waiting for lock, split_cache might have changed OnodeCacheShard.
This will result in adding Onode to improper OnodeCacheShard.
Such action is obviously bad, as we will operate in future (at least once) on
different OnodeCacheShard then we got lock for. Particulary sensitive to this
are _trim and split_cache functions, as they iterate over elements.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 343b049a1328d39a69a8c4c9e9cb93ac6ac77280)

4 years agoMerge pull request #40325 from batrick/49930
Yuri Weinstein [Thu, 25 Mar 2021 17:35:30 +0000 (10:35 -0700)]
Merge pull request #40325 from batrick/49930

pacific: mon/MDSMonitor: standby-replay daemons should be removed when the flag is turned off

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40267 from kotreshhr/wip-49905-pacific
Yuri Weinstein [Thu, 25 Mar 2021 17:34:09 +0000 (10:34 -0700)]
Merge pull request #40267 from kotreshhr/wip-49905-pacific

pacific: mgr/volumes: Retain suid guid bits in clone

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40091 from batrick/i49610
Yuri Weinstein [Thu, 25 Mar 2021 17:33:27 +0000 (10:33 -0700)]
Merge pull request #40091 from batrick/i49610

pacific: qa: mds removed because trimming for too long with valgrind

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40069 from petrutlucian94/wip-49634-pacific
Yuri Weinstein [Thu, 25 Mar 2021 17:32:42 +0000 (10:32 -0700)]
Merge pull request #40069 from petrutlucian94/wip-49634-pacific

pacific: cephfs: Add ceph-dokan, providing Windows support

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #39974 from singuliere/wip-49346-pacific
Yuri Weinstein [Thu, 25 Mar 2021 17:32:07 +0000 (10:32 -0700)]
Merge pull request #39974 from singuliere/wip-49346-pacific

pacific: vstart: fix ganesha cluster id and rados url errors

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
4 years agoMerge pull request #39972 from singuliere/wip-49687-pacific
Yuri Weinstein [Thu, 25 Mar 2021 17:30:35 +0000 (10:30 -0700)]
Merge pull request #39972 from singuliere/wip-49687-pacific

pacific: mds: add opened files/inodes and pinned i_caps metric payload support

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40206 from vshankar/wip-cephfs-mirror-pacific-backport-2
Venky Shankar [Thu, 25 Mar 2021 17:05:09 +0000 (22:35 +0530)]
Merge pull request #40206 from vshankar/wip-cephfs-mirror-pacific-backport-2

pacific: cephfs-mirror: peer bootstrap

Reviewed-by: Venky Shankar <vshankar@redhat.com>
4 years agoMerge pull request #40349 from neha-ojha/wip-39729-pacific
Yuri Weinstein [Thu, 25 Mar 2021 17:00:58 +0000 (10:00 -0700)]
Merge pull request #40349 from neha-ojha/wip-39729-pacific

pacific: os/bluestore: Add use_direct_io function

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
4 years agoos/bluestore: separate omap per-pool vs per-pg alerts 40410/head
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.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f755e353e88b65fb923289464935ec635daf13b2)

4 years agomgr/cephadm: Fix dashboard gateway configuration when using IPV6 40355/head
Juan Miguel Olmo Martínez [Wed, 24 Mar 2021 14:30:38 +0000 (15:30 +0100)]
mgr/cephadm: Fix dashboard gateway configuration when using IPV6

Fixes: https://tracker.ceph.com/issues/49957
Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit 1b18f4f9cb28708b544c62b3d07f9e1b4c701e41)

4 years agoqa/workunits/cephadm/test_cephadm: specify image separately
Sage Weil [Thu, 25 Mar 2021 12:33:26 +0000 (07:33 -0500)]
qa/workunits/cephadm/test_cephadm: specify image separately

On master, this will be IMAGE_MASTER.  On pacific branch, we'll make it
IMAGE_PACIFIC so that we don't hit the release mismatch error.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 4d5c6044b062d7e61b1bb0c5c1efb705878517bf)

 - adjusted IMAGE_DFEAULT to be pacific

4 years agorun-make-check.sh: let ctest generate XML output 40405/head
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

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 48ba39987d3958531589d7969750ea749e6a6d30)

4 years agotools/cephfs: fix missing keys in cephfs-top client_metadata 40402/head
Jos Collin [Wed, 17 Mar 2021 12:18:09 +0000 (17:48 +0530)]
tools/cephfs: fix missing keys in cephfs-top client_metadata

Fixes: https://tracker.ceph.com/issues/49736
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 3fd63e97b41b9f648390e796d60451ddee2143db)

4 years agocommon/options: bluefs_buffered_io=true by default 40391/head
Dan van der Ster [Thu, 12 Nov 2020 16:14:37 +0000 (17:14 +0100)]
common/options: bluefs_buffered_io=true by default

Enable bluefs_buffered_io again because it makes a huge user-visible
improvement in metadata intensive scenarios, such as but not limited to
PG deletion.

In our environment, deleting PGs from 4 hybrid OSDs (sharing one SATA SSD block.db) saturates
the block.db at 350MB/s reads and causes slow reqs and flapping on the OSDs.
Those OSDs have 3GB osd_target_memory.
Enabling bluefs_buffered_io drops the SSD IO down to <1MBps and the OSDs
are performant again. (The underlying PG deletion inefficiency is being
solved separately, but the page cache is so much more effective than
the bluestore cache in this scenario).

Lastly, remove the comment about swap. We should separately advise
operators to disable swap on OSD machines, as it is much better in
our experience to OOM and restart than to chug along swapping.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Related-to: https://tracker.ceph.com/issues/45765
Related-to: https://tracker.ceph.com/issues/47044
(cherry picked from commit 5ec8e8e63d409860c35e24a192090ac2b70af8f6)

4 years agoMerge PR #40317 into pacific
Patrick Donnelly [Wed, 24 Mar 2021 23:11:03 +0000 (16:11 -0700)]
Merge PR #40317 into pacific

* refs/pull/40317/head:
cephsqlite: add julian day offset in milliseconds
doc: add libcephsqlite
ceph.spec,debian: package libcephsqlite
test/libcephsqlite,qa: add tests for libcephsqlite
libcephsqlite: rework architecture and backend
SimpleRADOSStriper: wait for finished aios after write
SimpleRADOSStriper: add new minimal async striper
mon: define simple-rados-client-with-blocklist profile
librados: define must renew lock flag
common: add timeval conversion for durations
Revert "libradosstriper: add function to read into char*"
test_libcephsqlite: test random inserts
cephsqlite: fix compiler errors
cmake: improve build inst for cephsqlite
libcephsqlite: sqlite interface to RADOS
libradosstriper: add function to read into char*

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agomgr/cephadm: retry after JSONDecodeError in wait_for_mgr_restart()
John Fulton [Wed, 17 Mar 2021 22:03:46 +0000 (18:03 -0400)]
mgr/cephadm: retry after JSONDecodeError in wait_for_mgr_restart()

'ceph mgr dump' does not always return valid JSON so cephadm
will throw an exception sometimes when applying a spec as per
the issue this PR closes. Add a try/except to catch a possible
JSONDecodeError and retry after sleeping.

Fixes: https://tracker.ceph.com/issues/49870
Signed-off-by: John Fulton <fulton@redhat.com>
(cherry picked from commit 0aba5704d9eb1a2df6dd437785fc1f8c558c0990)

4 years agocephadm: prevent podman from breaking socket.getfqdn()
Sage Weil [Thu, 18 Mar 2021 18:26:48 +0000 (14:26 -0400)]
cephadm: prevent podman from breaking socket.getfqdn()

socket.getfqdn() will return the reverse lookup for 127.0.1.1, which is
the last item listed for that IP in /etc/hosts.  Podman, by default, will
append the container name (ceph-$fsid-$name) to that line, which is not
a valid hostname, and not what we want the dashbaord to use for the URI
it advertises in the service map.

Pass --no-hosts to podman to disable this.

Docker does not appear to modify /etc/hosts by default--or, more
importantly, does not add the container name there.

Explicitly instruct podman (and docker) to add a

Fixes: https://tracker.ceph.com/issues/49890
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit cfc1f914ce74f1fd1f45e2efd3ba2ddcb2da129a)

4 years agoPendingReleaseNotes: Document mclock scheduler refinements and profiles 40361/head
Sridhar Seshasayee [Wed, 24 Mar 2021 07:52:03 +0000 (13:22 +0530)]
PendingReleaseNotes: Document mclock scheduler refinements and profiles

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
4 years agoMerge pull request #39999 from rhcs-dashboard/wip-49708-pacific
Ernesto Puerta [Wed, 24 Mar 2021 16:11:18 +0000 (17:11 +0100)]
Merge pull request #39999 from rhcs-dashboard/wip-49708-pacific

pacific: mgr/dashboard: cluster > hosts: replace inventory->devices table title

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agotest: reduce number of threads to 32 in LibCephFS.ShutdownRace 40372/head
Jeff Layton [Wed, 17 Mar 2021 15:52:05 +0000 (11:52 -0400)]
test: reduce number of threads to 32 in LibCephFS.ShutdownRace

We're still occasionally hitting file descriptor limits when running
this test. Reduce the thread count to 32 for now, since it was possible
to reproduce the original problem with 10 or so threads.

Fixes: https://tracker.ceph.com/issues/49559
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 5aec283a1c33b6c21f877a27f57a1bc03b4894a0)

4 years agotest: add test for removing non-existent xattr 40371/head
Jeff Layton [Tue, 16 Mar 2021 15:14:28 +0000 (11:14 -0400)]
test: add test for removing non-existent xattr

We should get back -ENODATA.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit b94b668b7e340fa660462b75c97ab77dda9d5273)

4 years agomds: fix removexattr logic when there aren't any
Jeff Layton [Tue, 16 Mar 2021 16:22:56 +0000 (12:22 -0400)]
mds: fix removexattr logic when there aren't any

The MDS currently returns success on a removexattr if the xattr map is
completely empty. Fix the subtle logic bug and have it return -ENODATA
in that case.

Fixes: https://tracker.ceph.com/issues/49833
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 85e73c7c7509cefbc50902436aca07a9a333eb23)

4 years agoMerge PR #39988 into pacific
Patrick Donnelly [Wed, 24 Mar 2021 15:52:55 +0000 (08:52 -0700)]
Merge PR #39988 into pacific

* refs/pull/39988/head:
doc: fix broken links multimds and kcephfs

Reviewed-by: Jos Collin <jcollin@redhat.com>
4 years agoMerge PR #40250 into pacific
Patrick Donnelly [Wed, 24 Mar 2021 15:49:18 +0000 (08:49 -0700)]
Merge PR #40250 into pacific

* refs/pull/40250/head:
doc: mds cap acquisition readdir throttle documentation

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge PR #40306 into pacific
Patrick Donnelly [Wed, 24 Mar 2021 15:48:51 +0000 (08:48 -0700)]
Merge PR #40306 into pacific

* refs/pull/40306/head:
doc/cephfs/nfs: Add rook pod restart note, export and log block example

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40255 from singuliere/wip-49743-pacific
Casey Bodley [Wed, 24 Mar 2021 15:47:46 +0000 (11:47 -0400)]
Merge pull request #40255 from singuliere/wip-49743-pacific

pacific: rgw: limit rgw_gc_max_objs to RGW_SHARDS_PRIME_1

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #40261 from singuliere/wip-49310-pacific
Casey Bodley [Wed, 24 Mar 2021 15:47:38 +0000 (11:47 -0400)]
Merge pull request #40261 from singuliere/wip-49310-pacific

WIP: pacific: rgw: add support for SSL encrypted AMQP connections

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #40338 from cbodley/wip-rgw-lc-lock-pacific
Casey Bodley [Wed, 24 Mar 2021 15:47:22 +0000 (11:47 -0400)]
Merge pull request #40338 from cbodley/wip-rgw-lc-lock-pacific

pacific: rgw/lc: Fix use-after-free in RGWLC::process

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge PR #40362 into pacific
Patrick Donnelly [Wed, 24 Mar 2021 15:45:12 +0000 (08:45 -0700)]
Merge PR #40362 into pacific

* refs/pull/40362/head:
doc/cephfs/nfs: Add note about cephadm NFS-Ganesha daemon port

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>