]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agodoc/cephadm: Add Compatibility with Podman Versions
Sebastian Wagner [Wed, 3 Mar 2021 13:00:51 +0000 (14:00 +0100)]
doc/cephadm: Add Compatibility with Podman Versions

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit f15f0deccb93d0ec79beb4f7ba32c843e6e07e63)

4 years agodoc/cephadm: rewrite "index.rst"
Zac Dover [Tue, 23 Mar 2021 15:19:11 +0000 (01:19 +1000)]
doc/cephadm: rewrite "index.rst"

This PR rewrites the three paragraphs at the
front of the cephadm guide, increasing their
elegance and removing ambiguities.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit dfd205dca7889e325a6ec22892d3a9e058ad89d2)

4 years agodoc/cephadm: explicitly show host requirments in adding host section
Daniel Pivonka [Tue, 23 Mar 2021 17:50:33 +0000 (13:50 -0400)]
doc/cephadm: explicitly show host requirments in adding host section

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

4 years agomgr/cephadm: ingress: add optional virtual_interface_networks
Sage Weil [Mon, 12 Apr 2021 21:21:33 +0000 (17:21 -0400)]
mgr/cephadm: ingress: add optional virtual_interface_networks

It may be that the virtual IP we want to use is not in the same network
as any existing IPs on the host.  In that case, allow the spec to specify
a list of networks to match against existing IPs so that a match will
identify an ethernet interface to use.

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

4 years agodoc/cephadm/rgw: clean up example spec
Sage Weil [Mon, 12 Apr 2021 21:21:22 +0000 (17:21 -0400)]
doc/cephadm/rgw: clean up example spec

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

4 years agomgr/cephadm/services/ingress: less verbose about prepare_create
Sage Weil [Mon, 12 Apr 2021 19:55:19 +0000 (15:55 -0400)]
mgr/cephadm/services/ingress: less verbose about prepare_create

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

4 years agodoc/cephadm/rgw: add note about which ethernet interface is used
Sage Weil [Mon, 12 Apr 2021 19:53:50 +0000 (15:53 -0400)]
doc/cephadm/rgw: add note about which ethernet interface is used

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

4 years agocephadm: make keepalived unit fiddle sysctl settings
Sage Weil [Mon, 12 Apr 2021 17:50:12 +0000 (13:50 -0400)]
cephadm: make keepalived unit fiddle sysctl settings

No need to make the user adjust these manually.

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

4 years agomgr/orchestrator: report external endpoints from 'orch ls'
Sage Weil [Fri, 9 Apr 2021 22:47:52 +0000 (18:47 -0400)]
mgr/orchestrator: report external endpoints from 'orch ls'

Add a PORTS column and report the external/virtual IP (and port(s)) from
'orch ls' output.

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

4 years agomgr/orchestrator: drop - when no ports
Sage Weil [Sat, 10 Apr 2021 16:53:24 +0000 (12:53 -0400)]
mgr/orchestrator: drop - when no ports

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

4 years agodoc/cephadm/rgw: update docs for ingress service
Sage Weil [Fri, 9 Apr 2021 19:10:49 +0000 (15:10 -0400)]
doc/cephadm/rgw: update docs for ingress service

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

4 years agomgr/cephadm: use per_host_daemon feature in scheduler
Sage Weil [Fri, 9 Apr 2021 18:43:59 +0000 (14:43 -0400)]
mgr/cephadm: use per_host_daemon feature in scheduler

This only affects ingress, at least for now.

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

4 years agocephadm: fix a typo
Guillaume Abrioux [Tue, 30 Mar 2021 12:23:25 +0000 (14:23 +0200)]
cephadm: fix a typo

this adds a space in order to avoid displaying this:

```
"2021-03-29T10:51:32.595782Z service:rgw.default [ERROR] \"Failed while placing rgw.default.ceph-vasi-node5-osd-rgw-iscsi-gw.hpuesfon ceph-vasi-node5-osd-rgw-iscsi-gw
```

instead of:

```
"2021-03-29T10:51:32.595782Z service:rgw.default [ERROR] \"Failed while placing rgw.default.ceph-vasi-node5-osd-rgw-iscsi-gw.hpuesf on ceph-vasi-node5-osd-rgw-iscsi-rgw
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a3cb119a7a5134e7a3e4006381da14ea2a927136)

4 years agomgr/cephadm/schedule: add per_host_daemon_type support
Sage Weil [Fri, 9 Apr 2021 18:43:45 +0000 (14:43 -0400)]
mgr/cephadm/schedule: add per_host_daemon_type support

This will be used to schedule a per-host keepalived alongside other
services.

Implement this as a final stage for place() that puts one per host and
also takes existing/stray daemons into consideration.

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

4 years agomgr/cephadm: HA_RGW -> Ingress
Sage Weil [Fri, 9 Apr 2021 16:34:20 +0000 (12:34 -0400)]
mgr/cephadm: HA_RGW -> Ingress

This is mostly a rename, with some simplification and cleanup.

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

4 years agomgr/cephadm: include daemon_type in DaemonPlacement
Sage Weil [Fri, 9 Apr 2021 18:19:37 +0000 (14:19 -0400)]
mgr/cephadm: include daemon_type in DaemonPlacement

Initially, this will always match the service_type.

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

4 years agomgr/cephadm: update list-networks to report interface names too
Sage Weil [Thu, 1 Apr 2021 18:14:13 +0000 (14:14 -0400)]
mgr/cephadm: update list-networks to report interface names too

Also, minor fix in the ipv6 addr reporting: ignore networks that aren't in CIDR
form (no /).

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

4 years agomgr/orchestrator: streamline 'orch ps' PORTS formatting
Sage Weil [Tue, 23 Mar 2021 21:18:56 +0000 (17:18 -0400)]
mgr/orchestrator: streamline 'orch ps' PORTS formatting

"*:8000 *:8100" -> "*:8000,8100"

FWIW this matches the internal rendering used by DaemonPlacement

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

4 years agomgr/cephadm/schedule: handle multiple ports per daemon
Sage Weil [Tue, 23 Mar 2021 20:37:20 +0000 (16:37 -0400)]
mgr/cephadm/schedule: handle multiple ports per daemon

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

4 years agomgr/cephadm/utils: resolve_ip(): prefer IPv4
Sage Weil [Tue, 23 Mar 2021 20:09:15 +0000 (16:09 -0400)]
mgr/cephadm/utils: resolve_ip(): prefer IPv4

On my system the first item in hte list is
'fe80::408d:35e7:510:e9fe%eno1np0'.

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

4 years agocephadm: cleanup extra slash in runtime dir
胡玮文 [Wed, 7 Apr 2021 13:18:52 +0000 (21:18 +0800)]
cephadm: cleanup extra slash in runtime dir

%t already contains a slash, no need to add an extra one

Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit 9a864f086bedb7098060637ffb27ccc5dc92a88b)

4 years agocephadm: use split cgroup strategy for podman
胡玮文 [Thu, 11 Mar 2021 04:43:34 +0000 (12:43 +0800)]
cephadm: use split cgroup strategy for podman

Since systemd will create a cgroup for each service, we can instruct podman to
just split the current cgroup into sub-cgroups. This enables system admins to
use resource control features from systemd.

Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit 1a76f4793ec96045b0fed5cd85b1a6b3dbcd732c)

4 years agocephadm: use class to represent container engine
胡玮文 [Thu, 11 Mar 2021 16:51:33 +0000 (00:51 +0800)]
cephadm: use class to represent container engine

This allow us to store additional information about engine apart from it's
path.

Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit ca6a8fc90b1ad567ad4d777eaab402219d5d7ffb)

4 years agomgr/cephadm: don't cleanup the daemon keyring on failed redeploy
Melissa Li [Mon, 29 Mar 2021 04:34:42 +0000 (00:34 -0400)]
mgr/cephadm: don't cleanup the daemon keyring on failed redeploy

Fixes: https://tracker.ceph.com/issues/49872
Signed-off-by: Melissa Li <li.melissa.kun@gmail.com>
(cherry picked from commit 9b6ae808c68feec672c6e55a65bcde22b7085ee4)

4 years agomgr/cephadm: fix orch host add with multiple labels and no addr
Daniel Pivonka [Tue, 30 Mar 2021 20:17:46 +0000 (16:17 -0400)]
mgr/cephadm: fix orch host add with multiple labels and no addr

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

4 years agodoc/cephadm: remove keepalived_user from haproxy docs
Daniel Pivonka [Tue, 30 Mar 2021 14:13:02 +0000 (10:13 -0400)]
doc/cephadm: remove keepalived_user from haproxy docs

keepalived_user is not used and not required

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

4 years agorpm: re-disable SUSE lttng build on z390x
Nathan Cutler [Thu, 25 Feb 2021 18:01:18 +0000 (19:01 +0100)]
rpm: re-disable SUSE lttng build on z390x

This partially reverts 2b1e646f7aade3135a98c505111ac7ebef5e93a6 which
mistakenly changed a line inside an "%if 0%{?suse_version}" conditional.

Fixes: 2b1e646f7aade3135a98c505111ac7ebef5e93a6
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit ffd202a08619fc535df593eb41c0769577a1586a)

4 years agoceph.spec.in: enable tcmalloc and lttng on s390x
Yaakov Selkowitz [Tue, 9 Feb 2021 16:03:42 +0000 (11:03 -0500)]
ceph.spec.in: enable tcmalloc and lttng on s390x

The necessary prerequisites are already in RHEL+EPEL 8.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
(cherry picked from commit 2b1e646f7aade3135a98c505111ac7ebef5e93a6)

4 years agoMerge PR #40746 into pacific
Sage Weil [Fri, 23 Apr 2021 12:21:50 +0000 (07:21 -0500)]
Merge PR #40746 into pacific

* refs/pull/40746/head:
doc/cephadm: fix a typo
mgr/cephadm: rewrite/simplify describe_service
mgr/orchestrator: report osds as osd.unmanaged as appropriate
mgr/orchestrator: remove IMAGE ID from 'orch ls'
cephadm: normalize unqualified repo digests to docker.io
mgr/cephadm/upgrade: normalize unqualified target image
cephadm:persist the grafana.db file
qa/tasks/cephadm: add apply() method/task
cephadm: pass '-i' to docker|podman run for shell|enter

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
4 years agoMerge PR #40985 into pacific
Sage Weil [Thu, 22 Apr 2021 16:23:50 +0000 (11:23 -0500)]
Merge PR #40985 into pacific

* refs/pull/40985/head:
ceph-volume: fix raw listing when finding OSDs from different clusters

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoceph-volume: fix raw listing when finding OSDs from different clusters 40985/head
Sébastien Han [Thu, 22 Apr 2021 10:52:09 +0000 (12:52 +0200)]
ceph-volume: fix raw listing when finding OSDs from different clusters

When listing OSDs on host with 2 OSDs with the same ID, the output gets
overwritten with the last listed device. So a single OSD will show up.
See the ceph-volume.log which correctly parsed both disks:

```
[2021-04-22 09:44:21,391][ceph_volume.devices.raw.list][DEBUG ] Examining /dev/sda1
[2021-04-22 09:44:21,391][ceph_volume.process][INFO  ] Running command: /usr/bin/ceph-bluestore-tool show-label --dev /dev/sda1
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout {
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "/dev/sda1": {
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "osd_uuid": "423bf64d-f241-4f4b-a589-25a66fc836d1",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "size": 6442450944,
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "btime": "2021-04-22T09:32:55.894961+0000",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "description": "main",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "bfm_blocks": "1572864",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "bfm_blocks_per_key": "128",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "bfm_bytes_per_block": "4096",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "bfm_size": "6442450944",
[2021-04-22 09:44:21,418][ceph_volume.process][INFO  ] stdout "bluefs": "1",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "ceph_fsid": "d3cd4b72-5342-4fd3-96ec-a6e581261eab",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "kv_backend": "rocksdb",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "magic": "ceph osd volume v026",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "mkfs_done": "yes",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "osd_key": "AQDGQoFg+XHqJBAAw9ZQmtrnotHCLI0Nc2to6A==",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "ready": "ready",
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout "whoami": "0"
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout }
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] stdout }
[2021-04-22 09:44:21,419][ceph_volume.devices.raw.list][DEBUG ] Examining /dev/sda2
[2021-04-22 09:44:21,419][ceph_volume.process][INFO  ] Running command: /usr/bin/ceph-bluestore-tool show-label --dev /dev/sda2
[2021-04-22 09:44:21,445][ceph_volume.process][INFO  ] stdout {
[2021-04-22 09:44:21,445][ceph_volume.process][INFO  ] stdout "/dev/sda2": {
[2021-04-22 09:44:21,445][ceph_volume.process][INFO  ] stdout "osd_uuid": "c7c66bbd-7b38-4dcd-ad6d-3769c516f2fe",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "size": 6442450944,
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "btime": "2021-04-22T09:32:21.814768+0000",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "description": "main",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "bfm_blocks": "1572864",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "bfm_blocks_per_key": "128",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "bfm_bytes_per_block": "4096",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "bfm_size": "6442450944",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "bluefs": "1",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "ceph_fsid": "69c40cb1-22af-42e4-9d59-4a4468a2f58f",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "kv_backend": "rocksdb",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "magic": "ceph osd volume v026",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "mkfs_done": "yes",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "osd_key": "AQCkQoFgre9SKBAANgHH6scIb+IiyKxh6MhY0A==",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "ready": "ready",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "require_osd_release": "16",
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout "whoami": "0"
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout }
[2021-04-22 09:44:21,446][ceph_volume.process][INFO  ] stdout }
```

However, a single OSD gets listed by `ceph-volume raw list`:

```
[root@2b5a3b8bf31c /]# ceph-volume raw list
{
    "0": {
        "ceph_fsid": "69c40cb1-22af-42e4-9d59-4a4468a2f58f",
        "device": "/dev/sda2",
        "osd_id": 0,
        "osd_uuid": "c7c66bbd-7b38-4dcd-ad6d-3769c516f2fe",
        "type": "bluestore"
    }
}
```

We now use the osd_uuid so the output will never conflict:

```
[root@2b5a3b8bf31c /]# ceph-volume raw list
{
    "423bf64d-f241-4f4b-a589-25a66fc836d1": {
        "ceph_fsid": "d3cd4b72-5342-4fd3-96ec-a6e581261eab",
        "dev": "/dev/sda1",
        "osd_id": 0,
        "osd_uuid": "423bf64d-f241-4f4b-a589-25a66fc836d1",
        "type": "bluestore"
    },
    "c7c66bbd-7b38-4dcd-ad6d-3769c516f2fe": {
        "ceph_fsid": "69c40cb1-22af-42e4-9d59-4a4468a2f58f",
        "dev": "/dev/sda2",
        "osd_id": 0,
        "osd_uuid": "c7c66bbd-7b38-4dcd-ad6d-3769c516f2fe",
        "type": "bluestore"
    }
}
```

Fixes: https://tracker.ceph.com/issues/50478
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit ec0f5f3b22d24754c16131a1996e42b787e4255f)

4 years agoMerge pull request #40822 from rhcs-dashboard/wip-50303-pacific
Ernesto Puerta [Thu, 22 Apr 2021 09:01:44 +0000 (11:01 +0200)]
Merge pull request #40822 from rhcs-dashboard/wip-50303-pacific

pacific: mgr/dashboard: fix errors when creating NFS export.

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #40957 from rhcs-dashboard/wip-50458-pacific
Ilya Dryomov [Wed, 21 Apr 2021 16:00:46 +0000 (18:00 +0200)]
Merge pull request #40957 from rhcs-dashboard/wip-50458-pacific

pacific: vstart.sh: disable "auth_allow_insecure_global_id_reclaim"

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
4 years agomgr/dashboard: fix errors when creating NFS export. 40822/head
Alfonso Martínez [Fri, 9 Apr 2021 08:51:21 +0000 (10:51 +0200)]
mgr/dashboard: fix errors when creating NFS export.

- Fix daemon raw config parsing.
- Handle error when no rgw daemons found.

Fixes: https://tracker.ceph.com/issues/49925
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 8bad7360ef23fa154622d0bee7823092b9440ca6)

4 years agovstart.sh: disable "auth_allow_insecure_global_id_reclaim" 40957/head
Kefu Chai [Thu, 15 Apr 2021 13:07:53 +0000 (21:07 +0800)]
vstart.sh: disable "auth_allow_insecure_global_id_reclaim"

to silence the health warning of "mons are allowing insecure global_id
reclaim", which prevents the cluster from being active+clean. couple
tests are expecting a warning free cluster before they starts.

as this option is enabled by default for appeasing the old clients, but when it
comes to most of upstream testing, we can just disable it.

Fixes: https://tracker.ceph.com/issues/50374
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 77a8376d0731c24e7bbf24523d3d7450e9f978af)

4 years agoMerge PR #40687 into pacific
Patrick Donnelly [Wed, 21 Apr 2021 00:01:13 +0000 (17:01 -0700)]
Merge PR #40687 into pacific

* refs/pull/40687/head:
doc/cephfs/nfs: add user id, fs name and key to FSAL block

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge branch 'pacific-saved' into pacific
Ilya Dryomov [Tue, 20 Apr 2021 09:01:15 +0000 (11:01 +0200)]
Merge branch 'pacific-saved' into pacific

Conflicts:
qa/tasks/ceph.conf.template [ commit 94df76244798
  ("qa/tasks/ceph.conf: shorten cephx TTL for testing") was
  cherry-picked to 16.2.0 separately and so exists both in
  16.2.0 and pacific-saved ]
qa/tasks/cephadm.conf [ ditto ]

4 years ago16.2.1 v16.2.1
Jenkins Build Slave User [Mon, 19 Apr 2021 13:50:07 +0000 (13:50 +0000)]
16.2.1

4 years agoauth/cephx: make KeyServer::build_session_auth_info() less confusing
Ilya Dryomov [Thu, 15 Apr 2021 13:18:58 +0000 (15:18 +0200)]
auth/cephx: make KeyServer::build_session_auth_info() less confusing

The second KeyServer::build_session_auth_info() overload is used only
by the monitor, for mon <-> mon authentication.  The monitor passes in
service_secret (mon secret) and secret_id (-1).  The TTL is irrelevant
because there is no rotation.

However the signature doesn't make it obvious.  Clarify that
service_secret and secret_id are input parameters and info is the only
output parameter.

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

4 years agoauth/cephx: cap ticket validity by expiration of "next" key
Ilya Dryomov [Thu, 15 Apr 2021 07:48:13 +0000 (09:48 +0200)]
auth/cephx: cap ticket validity by expiration of "next" key

If auth_mon_ticket_ttl is increased by several times as done in
commit 522a52e6c258 ("auth/cephx: rotate auth tickets less often"),
active clients eventually get stuck because the monitor sends out an
auth ticket with a bogus validity.  The ticket is secured with the
"current" secret that is scheduled to expire according to the old TTL,
but the validity of the ticket is set to the new TTL.  As a result,
the client simply doesn't attempt to renew, letting the secrets rotate
potentially more than once.  When that happens, the client first hits
auth authorizer errors as it tries to renew service tickets and when
it finally gets to renewing the auth ticket, it hits the insecure
global_id reclaim wall.

Cap TTL by expiration of "next" key -- the "current" key may be
milliseconds away from expiration and still be used, legitimately.
Do it in KeyServerData alongside key rotation code and propagate the
capped TTL to the upper layer.

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

4 years agoauth/cephx: drop redundant KeyServerData::get_service_secret() overload
Ilya Dryomov [Thu, 15 Apr 2021 07:47:50 +0000 (09:47 +0200)]
auth/cephx: drop redundant KeyServerData::get_service_secret() overload

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

4 years agodoc/cephadm: fix a typo 40746/head
Guillaume Abrioux [Wed, 7 Apr 2021 15:00:13 +0000 (17:00 +0200)]
doc/cephadm: fix a typo

This fixes a small typo in the cephadm/iscsi documentation

s/iSCSI Ganesha gateway/iSCSI gateway/

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 6602eb7e7cd127509c4967c84d92574ccd7296c4)

4 years agomgr/cephadm: rewrite/simplify describe_service
Sage Weil [Fri, 9 Apr 2021 20:26:00 +0000 (16:26 -0400)]
mgr/cephadm: rewrite/simplify describe_service

The prior implementation first tried to fabricate services based on the
running daemons, and then filled in defined services on top.  This led
to duplication and a range of small errors.

Instead, flip this around: start with the services that are defined,
and only fill in 'unmanaged' services where we need to.

Drop the osd kludges and instead rely on DaemonDescription.service_id to
return the right thing.

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

4 years agomgr/orchestrator: report osds as osd.unmanaged as appropriate
Sage Weil [Fri, 9 Apr 2021 20:22:49 +0000 (16:22 -0400)]
mgr/orchestrator: report osds as osd.unmanaged as appropriate

If there is no osdspec_affinity or service_name (from unit.meta), then
report as 'osd.unmanaged'.

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

4 years agomgr/orchestrator: remove IMAGE ID from 'orch ls'
Sage Weil [Fri, 9 Apr 2021 19:35:17 +0000 (15:35 -0400)]
mgr/orchestrator: remove IMAGE ID from 'orch ls'

This is not very useful at this level:
 - we see it from 'orch ps'
 - it can be a mix of ids during upgrade
 - some services may have multiple images at steady state (e.g., ingress)

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

4 years agoMerge pull request #40826 from idryomov/wip-no-cephxv2-for-unmap-pacific
Ilya Dryomov [Tue, 13 Apr 2021 16:41:54 +0000 (18:41 +0200)]
Merge pull request #40826 from idryomov/wip-no-cephxv2-for-unmap-pacific

pacific: qa/suites/krbd: don't require CEPHX_V2 for unmap subsuite

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
4 years agoMerge pull request #40665 from idryomov/wip-require-ceph-common-for-ioc-pacific
Ilya Dryomov [Tue, 13 Apr 2021 09:44:48 +0000 (11:44 +0200)]
Merge pull request #40665 from idryomov/wip-require-ceph-common-for-ioc-pacific

pacific: packaging: require ceph-common for immutable object cache daemon

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
4 years agoqa/suites/krbd: don't require CEPHX_V2 for unmap subsuite 40826/head
Ilya Dryomov [Sat, 3 Apr 2021 09:13:56 +0000 (11:13 +0200)]
qa/suites/krbd: don't require CEPHX_V2 for unmap subsuite

Starting with pacific, CEPHX_V2 is required by default but
pre-single-major.yaml kernel doesn't support it.

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

4 years agoqa/standalone: default to disable insecure global id reclaim
Sage Weil [Sun, 28 Mar 2021 22:07:57 +0000 (18:07 -0400)]
qa/standalone: default to disable insecure global id reclaim

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

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 agoMerge pull request #40805 from tchaikov/pacific-pr-40738
Kefu Chai [Mon, 12 Apr 2021 13:42:07 +0000 (21:42 +0800)]
Merge pull request #40805 from tchaikov/pacific-pr-40738

pacific: include/librados: fix doxygen syntax for docs build

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40648 from rhcs-dashboard/wip-50203-pacific
Ernesto Puerta [Mon, 12 Apr 2021 09:36:37 +0000 (11:36 +0200)]
Merge pull request #40648 from rhcs-dashboard/wip-50203-pacific

pacific: mgr/dashboard: Revoke read-only user's access to Manager modules

Reviewed-by: Waadkh7 <walkhour@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoinclude/librados: fix doxygen syntax for docs build 40805/head
Josh Durgin [Fri, 9 Apr 2021 22:01:32 +0000 (18:01 -0400)]
include/librados: fix doxygen syntax for docs build

The docs build is now warning about these like:

WARNING: Unparseable C cross-reference: '[in]'
Invalid C declaration: Expected identifier in nested name.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 70b8f16a2c9fe2375457bf66bf46e4296a86e31d)

4 years agocephadm: normalize unqualified repo digests to docker.io
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>
(cherry picked from commit e07a73830436340e77180782216524f071a5a292)

4 years agomgr/cephadm/upgrade: normalize unqualified target image
Sage Weil [Tue, 6 Apr 2021 13:36:31 +0000 (09:36 -0400)]
mgr/cephadm/upgrade: normalize unqualified target image

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.

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

4 years agocephadm:persist the grafana.db file
Paul Cuzner [Thu, 1 Apr 2021 04:38:18 +0000 (17:38 +1300)]
cephadm:persist the grafana.db file

This patch persists the grafana.db file, so the user can
create there own dashboard referencing ceph and node
metrics and not lose them on grafana restart! This also
ensures changes to users/passwords within grafana are
persisted.

Fixes: https://tracker.ceph.com/issues/49954
Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 581250d943915cb3f8e7e4071440ee5cad5e5908)

4 years agoqa/tasks/cephadm: add apply() method/task
Sage Weil [Thu, 1 Apr 2021 20:37:13 +0000 (15:37 -0500)]
qa/tasks/cephadm: add apply() method/task

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

4 years agocephadm: pass '-i' to docker|podman run for shell|enter
Sage Weil [Mon, 5 Apr 2021 14:48:07 +0000 (09:48 -0500)]
cephadm: pass '-i' to docker|podman run for shell|enter

This allows us to pipe things to stdin.

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

4 years agoMerge PR #40663 into pacific
Sage Weil [Fri, 9 Apr 2021 23:04:33 +0000 (18:04 -0500)]
Merge PR #40663 into pacific

* refs/pull/40663/head:
qa/tasks/ceph.conf: shorten cephx TTL for testing

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge pull request #40645 from batrick/i50015
Yuri Weinstein [Fri, 9 Apr 2021 15:41:42 +0000 (08:41 -0700)]
Merge pull request #40645 from batrick/i50015

pacific: qa: "AttributeError: 'NoneType' object has no attribute 'mon_manager'"

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agodoc/cephfs/nfs: add user id, fs name and key to FSAL block 40687/head
Varsha Rao [Tue, 6 Apr 2021 10:06:45 +0000 (15:36 +0530)]
doc/cephfs/nfs: add user id, fs name and key to FSAL block

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

4 years agoMerge pull request #40706 from cbodley/wip-50247
Ilya Dryomov [Fri, 9 Apr 2021 04:42:25 +0000 (06:42 +0200)]
Merge pull request #40706 from cbodley/wip-50247

pacific: cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT globally

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40629 from batrick/i50025
Yuri Weinstein [Thu, 8 Apr 2021 22:22:11 +0000 (15:22 -0700)]
Merge pull request #40629 from batrick/i50025

pacific: client: items pinned in cache preventing unmount

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40628 from batrick/i49936
Yuri Weinstein [Thu, 8 Apr 2021 22:21:30 +0000 (15:21 -0700)]
Merge pull request #40628 from batrick/i49936

pacific: ceph-fuse: src/include/buffer.h: 1187: FAILED ceph_assert(_num <= 1024)

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40528 from batrick/i50030
Yuri Weinstein [Thu, 8 Apr 2021 22:20:54 +0000 (15:20 -0700)]
Merge pull request #40528 from batrick/i50030

pacific: qa: fs:cephadm mount does not wait for mds to be created

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agocmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT globaly 40706/head
Kefu Chai [Sun, 21 Mar 2021 15:06:00 +0000 (23:06 +0800)]
cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT globaly

turns out we also need it for compiling librados tests with libboost
1.75, so just define it globally

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

4 years agocmake: use list(APPEND..) when appropriate
Kefu Chai [Sun, 21 Mar 2021 15:06:43 +0000 (23:06 +0800)]
cmake: use list(APPEND..) when appropriate

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

4 years agocmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT for rgw tests
Kefu Chai [Fri, 19 Mar 2021 04:46:17 +0000 (12:46 +0800)]
cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT for rgw tests

otherwise unittest_rgw_iam_policy does not compile with boost v1.75

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

4 years agoMerge pull request #40588 from rhcs-dashboard/wip-50068-pacific
Ernesto Puerta [Thu, 8 Apr 2021 10:46:27 +0000 (12:46 +0200)]
Merge pull request #40588 from rhcs-dashboard/wip-50068-pacific

pacific: mgr/dashboard: Fix for alert notification message being undefined

Reviewed-by: Waadkh7 <walkhour@redhat.com>
Reviewed-by: pereman2 <pdiazbou@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
4 years agopackaging: require ceph-common for immutable object cache daemon 40665/head
Ilya Dryomov [Wed, 7 Apr 2021 09:36:53 +0000 (11:36 +0200)]
packaging: require ceph-common for immutable object cache daemon

This daemon has a systemd service which starts it with --setuser ceph
--setgroup ceph.  "ceph" user and group are created by ceph-common and
won't be there unless ceph-common is installed.

Fixes: https://tracker.ceph.com/issues/50207
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit dc55f0bb43226259068545c6e13c2921d225ddbe)

4 years agoqa/tasks/ceph.conf: shorten cephx TTL for testing 40663/head
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 agomgr/dashboard: Revoke read-only user's access to Manager modules 40648/head
Nizamudeen A [Tue, 6 Apr 2021 15:54:51 +0000 (21:24 +0530)]
mgr/dashboard: Revoke read-only user's access to Manager modules

This will disable read only user to read/open Manager Modules page in
Ceph Dashboard where some of the security related informations are
shown.

Fixes: https://tracker.ceph.com/issues/50174
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit fb607f1561371340d2c9d4e16c4eaceb365fd926)

4 years agoqa/cephfs: move is_blocklisted() to filesystem.CephCluster 40645/head
Rishabh Dave [Wed, 3 Mar 2021 11:44:22 +0000 (17:14 +0530)]
qa/cephfs: move is_blocklisted() to filesystem.CephCluster

Using self.fs.mon_manager in mount.py can lead to a crash since self.fs
can be None. Move is_blocklisted() to tasks.filesystem.CephCluster where
it can get access to mon_manager without depending on objects
representing Ceph FSs.

Fixes: https://tracker.ceph.com/issues/49511
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 4d0f56fcc524cfe328d89d0b3706ca22a68a268f)

4 years agoMerge pull request #40398 from rhcs-dashboard/wip-49945-pacific
Ernesto Puerta [Wed, 7 Apr 2021 09:10:00 +0000 (11:10 +0200)]
Merge pull request #40398 from rhcs-dashboard/wip-49945-pacific

pacific: mgr/dashboard: Fix for broken User management role cloning

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
4 years agoMerge pull request #40586 from rhcs-dashboard/wip-50067-pacific
Ernesto Puerta [Wed, 7 Apr 2021 09:06:25 +0000 (11:06 +0200)]
Merge pull request #40586 from rhcs-dashboard/wip-50067-pacific

pacific: mgr/dashboard: Unable to login to ceph dashboard until clearing cookies manually

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoclient: fire the finish_cap_snap() after buffer being flushed 40629/head
Xiubo Li [Wed, 30 Dec 2020 01:41:01 +0000 (09:41 +0800)]
client: fire the finish_cap_snap() after buffer being flushed

When the inode has Fb cap and the used reference is none zero, the
cap snap flushing will be delayed, so we need to make sure it will
be invoked after the dirty buffer is flushed to osd.

Fixes: https://tracker.ceph.com/issues/48679
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit a34d0c242a73d7c29956b6894a430d9979225632)

4 years agoclient: simplify the iterating code
Xiubo Li [Wed, 30 Dec 2020 09:17:56 +0000 (17:17 +0800)]
client: simplify the iterating code

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 1bea6e5135148169baaf656563bb1acbe6a593b6)

4 years agoclient: remove unused _flushed_cap_snap
Xiubo Li [Wed, 30 Dec 2020 08:40:23 +0000 (16:40 +0800)]
client: remove unused _flushed_cap_snap

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit f60329bf1c5f9ad051387dbee10a210822620254)

4 years agoclient: clean up the code
Xiubo Li [Wed, 30 Dec 2020 01:14:25 +0000 (09:14 +0800)]
client: clean up the code

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 820d39da39e65e99c1d58d56afc415186c1ae933)

4 years agoclient: rebuild bl to avoid too many vector(> IOV_MAX) 40628/head
Yanhu Cao [Tue, 23 Mar 2021 03:29:33 +0000 (11:29 +0800)]
client: rebuild bl to avoid too many vector(> IOV_MAX)

Fixes: https://tracker.ceph.com/issues/49936
Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
(cherry picked from commit 463dda7251aec1528f5796ea47956fba6e80fae1)

4 years agoMerge pull request #40559 from adamemerson/wip-50104-pacific
Adam C. Emerson [Tue, 6 Apr 2021 16:26:07 +0000 (12:26 -0400)]
Merge pull request #40559 from adamemerson/wip-50104-pacific

rgw: Backport of datalog improvements to Pacific

Reviewed-By: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #40494 from aaSharma14/wip-50053-pacific
Yuri Weinstein [Mon, 5 Apr 2021 21:19:55 +0000 (14:19 -0700)]
Merge pull request #40494 from aaSharma14/wip-50053-pacific

pacific: mgr/dashboard: Device health status is not getting listed under hosts section

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #40474 from rhcs-dashboard/wip-50038-pacific
Yuri Weinstein [Mon, 5 Apr 2021 21:18:49 +0000 (14:18 -0700)]
Merge pull request #40474 from rhcs-dashboard/wip-50038-pacific

pacific: mgr/dashboard: fix broken feature toggles

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>