]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoqa/workunits/fs: add test for subvolume 38553/head
Yan, Zheng [Wed, 5 Aug 2020 15:31:03 +0000 (23:31 +0800)]
qa/workunits/fs: add test for subvolume

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit df7e9aa42b97f3203e92387d2ceea5636f5230ad)

4 years agomds: don't move inode with nlink > 1 to global snaprealm if it's in subvolume
Yan, Zheng [Wed, 5 Aug 2020 09:31:57 +0000 (17:31 +0800)]
mds: don't move inode with nlink > 1 to global snaprealm if it's in subvolume

Fixes: https://tracker.ceph.com/issues/46074
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 63da28d6a8be20183a294744892a41f47e8ba24b)

Conflicts: resolution similar to nautilus backport
src/mds/Server.cc

4 years agomds: disallow hardlink across subvolume
Yan, Zheng [Wed, 5 Aug 2020 08:04:30 +0000 (16:04 +0800)]
mds: disallow hardlink across subvolume

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 55cc3f7d7d27837bfe64ee46444358c0e45d16f6)

4 years agomds: disallow across subvolume rename
Yan, Zheng [Wed, 5 Aug 2020 07:37:20 +0000 (15:37 +0800)]
mds: disallow across subvolume rename

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 53348ab67f0f3e691cfeb6b02d80b868fdb98d89)

4 years agomds: disallow creating snapshot on descendent directory of subvolume
Yan, Zheng [Wed, 5 Aug 2020 07:33:10 +0000 (15:33 +0800)]
mds: disallow creating snapshot on descendent directory of subvolume

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 34c6b4437a2e8a49bb76e86d07cd86b740e3f581)

4 years agomds: add vxattr that marks/clears subvolume flag
Yan, Zheng [Tue, 4 Aug 2020 13:26:26 +0000 (21:26 +0800)]
mds: add vxattr that marks/clears subvolume flag

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 8d531680cdf48ba43d93becd5a19072844e92c19)

Conflicts: resolutions similar to nautilus backport
src/mds/Server.cc
src/mds/SnapRealm.h
src/mds/snap.h

4 years agoMerge PR #38205 into octopus
Jan Fajerski [Wed, 9 Dec 2020 16:01:39 +0000 (17:01 +0100)]
Merge PR #38205 into octopus

* refs/pull/38205/head:
ceph-volume: pass *-slots arguments to LV creation
use extent count for slots conversion instead of free count
ceph-volume: available_lvm: vg space takes precedence

4 years agoMerge PR #38014 into octopus
Jan Fajerski [Wed, 9 Dec 2020 15:57:32 +0000 (16:57 +0100)]
Merge PR #38014 into octopus

* refs/pull/38014/head:
ceph-volume: consume mount opt in simple activate

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoMerge PR #38047 into octopus
Jan Fajerski [Wed, 9 Dec 2020 15:56:45 +0000 (16:56 +0100)]
Merge PR #38047 into octopus

* refs/pull/38047/head:
ceph-volume: fix lvm help test
ceph-volume: remove mention of dmcache from docs and help text

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
4 years agoMerge PR #38199 into octopus
Jan Fajerski [Wed, 9 Dec 2020 15:55:47 +0000 (16:55 +0100)]
Merge PR #38199 into octopus

* refs/pull/38199/head:
ceph-volume: fix test_setup_device_device_name_is_none
ceph-volume: cover devices.lvm.prepare.setup_device
ceph-volume: fix filestore/dmcrypt activate

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge PR #38280 into octopus
Jan Fajerski [Wed, 9 Dec 2020 15:54:56 +0000 (16:54 +0100)]
Merge PR #38280 into octopus

* refs/pull/38280/head:
ceph-volume batch: reject partitions in argparser

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge PR #38426 into octopus
Jan Fajerski [Wed, 9 Dec 2020 15:54:12 +0000 (16:54 +0100)]
Merge PR #38426 into octopus

* refs/pull/38426/head:
ceph-volume: implement the --log-level flag

Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoceph-volume: fix lvm help test 38047/head
Dimitri Savineau [Mon, 9 Nov 2020 15:50:20 +0000 (10:50 -0500)]
ceph-volume: fix lvm help test

ed5ceb0 changed the LVM help code but not the associated test.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 879ed30984de2b94879959de1c3611083c85bd99)

4 years agoceph-volume: remove mention of dmcache from docs and help text
Andrew Schoen [Wed, 21 Oct 2020 15:55:46 +0000 (10:55 -0500)]
ceph-volume: remove mention of dmcache from docs and help text

With the introduction of bluestore dmcache is no longer needed and
is no longer supported with `ceph-volume lvm`.

Resolves: rhbz#1876827
Fixes: https://tracker.ceph.com/issues/48039
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ed5ceb04fc8ff57c5f7e2b5fa5e859c2cdbf2ffd)

4 years agoMerge pull request #38155 from sebastian-philipp/octopus-backport-37432-37397-37112...
Sebastian Wagner [Mon, 7 Dec 2020 09:03:18 +0000 (10:03 +0100)]
Merge pull request #38155 from sebastian-philipp/octopus-backport-37432-37397-37112-36622-37411-37521-37500-37104-37542-37650-37621-3764

octopus: cephadm batch backport November

Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agoMerge pull request #38287 from yuriw/wip-yuriw-cleanup-octopus
Yuri Weinstein [Sat, 5 Dec 2020 21:06:40 +0000 (13:06 -0800)]
Merge pull request #38287 from yuriw/wip-yuriw-cleanup-octopus

octopus: qa/tests: added rhel 8.2

Reviewed-by: Rakesh Manohar <rgowdege@redhat.com>
4 years agoceph-volume: consume mount opt in simple activate 38014/head
Dimitri Savineau [Mon, 26 Oct 2020 19:12:59 +0000 (15:12 -0400)]
ceph-volume: consume mount opt in simple activate

When running ceph-volume simple activate command on a Filestore OSD
then the data device is mounted without any specific options so the
one from the ceph configuration file are ignored.
When deploying Filestore with the lvm subcommand then everything is
fine because the filestore_activate method uses mount_osd which relies
on the mount options defined in the ceph configuration file (if any).

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1891557
Fixes: https://tracker.ceph.com/issues/48018
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 1f4301a15df82bf31468d76fbcccc1c5fa192e38)

4 years agoceph-volume: implement the --log-level flag 38426/head
Andrew Schoen [Thu, 29 Oct 2020 19:11:14 +0000 (14:11 -0500)]
ceph-volume: implement the --log-level flag

The --log-level flag was being ignored and
the file log level was always set to DEBUG.

Fixes: https://tracker.ceph.com/issues/48045
Resolves: rhbz#1867717

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ecbd6c13f116b390c782c9ae14b5becd0bdecc8e)

4 years agoMerge pull request #38359 from dzafman/wip-47767-octopus
David Zafman [Thu, 3 Dec 2020 01:38:11 +0000 (17:38 -0800)]
Merge pull request #38359 from dzafman/wip-47767-octopus

octopus: osd: Check for nosrub/nodeep-scrub in between chunks, to avoid races

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #38361 from badone/wip-octopus-mon-scrub-testing
Brad Hubbard [Wed, 2 Dec 2020 22:05:55 +0000 (08:05 +1000)]
Merge pull request #38361 from badone/wip-octopus-mon-scrub-testing

octopus: mon scrub testing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #38396 from badone/wip-octopus-run-tox-mgr-insights-six-missing
Brad Hubbard [Wed, 2 Dec 2020 20:28:26 +0000 (06:28 +1000)]
Merge pull request #38396 from badone/wip-octopus-run-tox-mgr-insights-six-missing

octopus: mgr/insights: Test environment requires 'six'

Reviewed-by: Nathan Cutler <ncutler@suse.com>
4 years agomgr/insights: Test environment requires 'six' 38396/head
Brad Hubbard [Wed, 2 Dec 2020 05:24:16 +0000 (15:24 +1000)]
mgr/insights: Test environment requires 'six'

Not a backport because python2 support was dropped in master and only
nautilus and octopus seem to be affected at this time.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
4 years agoMerge remote-tracking branch 'origin/octopus-saved' into octopus
Josh Durgin [Tue, 1 Dec 2020 17:36:51 +0000 (09:36 -0800)]
Merge remote-tracking branch 'origin/octopus-saved' into octopus

4 years agoqa/suites/rados/monthrash: Exercise mon scrub error injectors 38361/head
Brad Hubbard [Wed, 11 Nov 2020 01:58:01 +0000 (11:58 +1000)]
qa/suites/rados/monthrash: Exercise mon scrub error injectors

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit a5bcca7f415790521a76213620ae079318e7bee1)

 Conflicts:
qa/suites/rados/monthrash/ceph.yaml - whitelist vs. ignorelist

4 years agoqa/config/rados.yaml: Test mon scrub
Brad Hubbard [Wed, 11 Nov 2020 01:49:41 +0000 (11:49 +1000)]
qa/config/rados.yaml: Test mon scrub

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit f85001e5d5fb11718ab2fd8b708402cd2db951d4)

4 years agoosd: Check for nosrub/nodeep-scrub in between chunks, to avoid races 38359/head
David Zafman [Tue, 24 Nov 2020 23:23:20 +0000 (15:23 -0800)]
osd: Check for nosrub/nodeep-scrub in between chunks, to avoid races

Fixes: https://tracker.ceph.com/issues/47767
Signed-off-by: David Zafman <dzafman@redhat.com>
4 years ago15.2.7 v15.2.7
Jenkins Build Slave User [Mon, 30 Nov 2020 19:58:30 +0000 (19:58 +0000)]
15.2.7

4 years agorgw: temporarily disable calls to defer_gc() in RGWGetObj
Casey Bodley [Mon, 23 Nov 2020 23:06:26 +0000 (18:06 -0500)]
rgw: temporarily disable calls to defer_gc() in RGWGetObj

cls_rgw_gc_queue_update_entry() is known to cause data loss when called
on objects that have not actually been scheduled for garbage collection

RGWGetObj is the only caller, and uses defer_gc() when reads are taking
a long time compared to rgw_gc_obj_min_wait. if an object has since been
deleted and submitted for garbage collection, this allows RGWGetObj to
defer that gc until the entire read completes

by disabling these calls to defer_gc(), very long reads (longer than 1hr,
with default configuration) may fail if the object gets deleted, and a
retry will result in a 404 Not Found error as expected

Fixes: https://tracker.ceph.com/issues/47866
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 94df9cd37a1ca457130f90803281b166a5fa7eef)

4 years agorgw: during GC defer, prevent new GC enqueue
J. Eric Ivancich [Sat, 21 Nov 2020 16:10:35 +0000 (11:10 -0500)]
rgw: during GC defer, prevent new GC enqueue

With the new queue-based GC code, when a GC defer operation is
performed, it adds an "urgent" record to prevent GC from removing
objects that are still being read. It does not check whether the
objects are on the GC queue or not and that's OK for the urgent
record.

The code *also* adds a new GC entry to the queue to cause GC to occur
at a later time. This would be incorrect if there was no GC entry to
begin with, however. In such a case this would cause GC to delete tail
objects when no user-initiated remove has happend. In other words a
READ could cause a DELETE of tail objects and therefore data loss.

This fix prevents such a new GC entry from being enqueued, thus
preventing the data loss in this rare case. There is a new risk that
tail object orphans to be created, but as an immediate fix to prevent
data loss, this is appropriate and it is a rare event. A follow-on PR
that will handle these cases is likely.

This PR adds a level 0 log entry as a way to potentially confirm this
case is being triggered in real-world cases. In time, this log entry
should be deleted.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 2603485bcb4402260e0f7aadd2f2c8ab05b07399)

4 years agoMerge pull request #38294 from badone/wip-octopus-dont-run-tests-if-build-fails
Brad Hubbard [Fri, 27 Nov 2020 03:17:33 +0000 (13:17 +1000)]
Merge pull request #38294 from badone/wip-octopus-dont-run-tests-if-build-fails

octopus: run-make-check.sh: Don't run tests if build fails

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agorun-make-check.sh: Make sure a build failure will exit 38294/head
Brad Hubbard [Thu, 26 Nov 2020 05:30:55 +0000 (15:30 +1000)]
run-make-check.sh: Make sure a build failure will exit

We 'set -e' but that is ignored because 'build tests' is executed in a
'&&' list (see 'man set') so move the echo to the following line.

Follow-up to 03ff2146f95

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit e70483133db87a3f04bc1fff31d8472465c305b3)

 Conflicts:
run-make-check.sh - Trivial change in logging output

4 years agorun-make-check.sh: Don't run tests if build fails
Brad Hubbard [Thu, 26 Nov 2020 01:18:02 +0000 (11:18 +1000)]
run-make-check.sh: Don't run tests if build fails

When run-make was taken out we lost the 'set -e' call and therefore
continue after an error.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit 03ff2146f95c7e03a84df1f8c3b38bbbb315b708)

4 years agoMerge pull request #38189 from votdev/issue_48295_widget
Ernesto Puerta [Thu, 26 Nov 2020 12:52:49 +0000 (13:52 +0100)]
Merge pull request #38189 from votdev/issue_48295_widget

octopus: mgr/dashboard: The performance 'Client Read/Write' widget shows incorrect write values

Reviewed-by: avanthakkar <athakkar@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: nizamial09 <nia@redhat.com>
4 years agoMerge pull request #37763 from bk201/wip-47943-octopus
Ernesto Puerta [Thu, 26 Nov 2020 12:50:59 +0000 (13:50 +0100)]
Merge pull request #37763 from bk201/wip-47943-octopus

octopus: mgr/dashboard: Merge disable and disableDesc

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
4 years agoMerge PR #38299 into octopus
Jan Fajerski [Thu, 26 Nov 2020 12:48:23 +0000 (13:48 +0100)]
Merge PR #38299 into octopus

* refs/pull/38299/head:
ceph-volume inventory: make libstoragemgmt data retrieval optional

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
4 years agoceph-volume inventory: make libstoragemgmt data retrieval optional 38299/head
Jan Fajerski [Wed, 18 Nov 2020 08:37:48 +0000 (09:37 +0100)]
ceph-volume inventory: make libstoragemgmt data retrieval optional

Default to not retrieving libstoragemgmt data since it seems this can
cause serious issues on older hardware. Safest way is to only retrieve
lsm data when the user opts in..

Fixes: https://tracker.ceph.com/issues/48270
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit b29a54d21e314db7a9d681cf5cc089dcfcbf6dc0)

4 years agoqa/tests: added rhel 8.2 38287/head
Yuri Weinstein [Wed, 25 Nov 2020 17:08:27 +0000 (09:08 -0800)]
qa/tests: added rhel 8.2

See https://sentry.ceph.com/organizations/ceph/issues/164/?project=2&query=is%3Aunresolved

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #38249 from ivancich/wip-48331-octopus
Yuri Weinstein [Wed, 25 Nov 2020 16:12:23 +0000 (08:12 -0800)]
Merge pull request #38249 from ivancich/wip-48331-octopus

octopus: rgw: during GC defer, prevent new GC enqueue

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoceph-volume batch: reject partitions in argparser 38280/head
Jan Fajerski [Wed, 18 Nov 2020 11:18:48 +0000 (12:18 +0100)]
ceph-volume batch: reject partitions in argparser

Fixes: https://tracker.ceph.com/issues/47966
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 9742efa907aa54b3135f5daf73080b7be12534eb)

4 years agoMerge pull request #37604 from smithfarm/wip-47802-octopus
Yuri Weinstein [Tue, 24 Nov 2020 20:53:55 +0000 (12:53 -0800)]
Merge pull request #37604 from smithfarm/wip-47802-octopus

octopus: test/librados: fix endian bugs in checksum test cases

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37863 from ideepika/add-stringio
Yuri Weinstein [Tue, 24 Nov 2020 18:03:28 +0000 (10:03 -0800)]
Merge pull request #37863 from ideepika/add-stringio

octopus: qa/tasks/{ceph,ceph_manager}: drop py2 support

Reviewed-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
4 years agorgw: temporarily disable calls to defer_gc() in RGWGetObj 38249/head
Casey Bodley [Mon, 23 Nov 2020 23:06:26 +0000 (18:06 -0500)]
rgw: temporarily disable calls to defer_gc() in RGWGetObj

cls_rgw_gc_queue_update_entry() is known to cause data loss when called
on objects that have not actually been scheduled for garbage collection

RGWGetObj is the only caller, and uses defer_gc() when reads are taking
a long time compared to rgw_gc_obj_min_wait. if an object has since been
deleted and submitted for garbage collection, this allows RGWGetObj to
defer that gc until the entire read completes

by disabling these calls to defer_gc(), very long reads (longer than 1hr,
with default configuration) may fail if the object gets deleted, and a
retry will result in a 404 Not Found error as expected

Fixes: https://tracker.ceph.com/issues/47866
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 94df9cd37a1ca457130f90803281b166a5fa7eef)

4 years agorgw: during GC defer, prevent new GC enqueue
J. Eric Ivancich [Sat, 21 Nov 2020 16:10:35 +0000 (11:10 -0500)]
rgw: during GC defer, prevent new GC enqueue

With the new queue-based GC code, when a GC defer operation is
performed, it adds an "urgent" record to prevent GC from removing
objects that are still being read. It does not check whether the
objects are on the GC queue or not and that's OK for the urgent
record.

The code *also* adds a new GC entry to the queue to cause GC to occur
at a later time. This would be incorrect if there was no GC entry to
begin with, however. In such a case this would cause GC to delete tail
objects when no user-initiated remove has happend. In other words a
READ could cause a DELETE of tail objects and therefore data loss.

This fix prevents such a new GC entry from being enqueued, thus
preventing the data loss in this rare case. There is a new risk that
tail object orphans to be created, but as an immediate fix to prevent
data loss, this is appropriate and it is a rare event. A follow-on PR
that will handle these cases is likely.

This PR adds a level 0 log entry as a way to potentially confirm this
case is being triggered in real-world cases. In time, this log entry
should be deleted.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 2603485bcb4402260e0f7aadd2f2c8ab05b07399)

4 years agoceph-volume: fix test_setup_device_device_name_is_none 38199/head
Guillaume Abrioux [Fri, 20 Nov 2020 10:41:28 +0000 (11:41 +0100)]
ceph-volume: fix test_setup_device_device_name_is_none

Let's call this function by using the same syntax than other tests.
This will make it work with py2 in nautilus branch.

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

4 years agoceph-volume: pass *-slots arguments to LV creation 38205/head
Jan Fajerski [Mon, 2 Mar 2020 14:16:39 +0000 (15:16 +0100)]
ceph-volume: pass *-slots arguments to LV creation

Fixes: https://tracker.ceph.com/issues/44494
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 61f0c3af0b0f36a03748733b16de1b11048342e6)

 Conflicts:
src/ceph-volume/ceph_volume/devices/lvm/common.py
src/ceph-volume/ceph_volume/devices/lvm/prepare.py
        pick HEAD

4 years agouse extent count for slots conversion instead of free count
Jan Fajerski [Wed, 4 Mar 2020 12:28:46 +0000 (13:28 +0100)]
use extent count for slots conversion instead of free count

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 4a81b4a2fbb4cafe45a8fe8cceeece636e51adb6)

4 years agoceph-volume: available_lvm: vg space takes precedence
Jan Fajerski [Wed, 4 Mar 2020 10:39:40 +0000 (11:39 +0100)]
ceph-volume: available_lvm: vg space takes precedence

This changes available_lvm to check for generic reasons only if no VGs
were found. A VG can contain a (mounted) lv, which triggers the
ro/locked test, despite the VG having space available.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit c6d71eb0022935731bb9380098c975d9c5f27a86)

Conflicts:
src/ceph-volume/ceph_volume/util/device.py
        pick ours

4 years agomgr/dashboard: Merge disable and disableDesc 37763/head
Tiago Melo [Fri, 24 Jul 2020 15:59:35 +0000 (15:59 +0000)]
mgr/dashboard: Merge disable and disableDesc

Fixes: https://tracker.ceph.com/issues/46750
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit 2f1c977ec6d8a25b4e5cf7ce7f3155eac69761a6)

 Conflicts:
     src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.ts
     src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts
     src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts
     src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts
     src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.ts
     src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts
     - `$localize` calls are not available in Angular 8. They are replaced with i18n.
     - Optional chaining syntax is not supported in typescript 3.5.3. Statements with optional chaining are re-coded.

4 years agoceph-volume: cover devices.lvm.prepare.setup_device
Guillaume Abrioux [Thu, 19 Nov 2020 14:43:53 +0000 (15:43 +0100)]
ceph-volume: cover devices.lvm.prepare.setup_device

Add some unit tests to cover setup_device() in devices.lvm.prepare

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

4 years agoceph-volume: fix filestore/dmcrypt activate
Guillaume Abrioux [Wed, 18 Nov 2020 07:26:27 +0000 (08:26 +0100)]
ceph-volume: fix filestore/dmcrypt activate

The uuid set for tags['ceph.journal_uuid'] should point to its
corresponding lv_uuid instead of the uuid generated for the lv_name.

The variable name 'uuid' used so far was probably too confusing so let's
change it to make it more clear.

Closes: https://tracker.ceph.com/issues/48271
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ee3aece808fd22e659c2c30c0674f7ec200f411b)

4 years agomgr/dashboard: The performance 'Client Read/Write' widget shows incorrect write values 38189/head
Volker Theile [Thu, 19 Nov 2020 15:27:24 +0000 (16:27 +0100)]
mgr/dashboard: The performance 'Client Read/Write' widget shows incorrect write values

Fixes: https://tracker.ceph.com/issues/48295
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit d66e684b9ec83cca8a58b0a7b8661c568eb0cf6d)

Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts
src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss
Discarded all changes except the relevant code part. The rest was sucessfully backported by b2360b1a6101b5cc61c236047ce7c757fd02c93d.

4 years agoMerge branch 'octopus-saved' into octopus
Josh Durgin [Thu, 19 Nov 2020 03:30:13 +0000 (19:30 -0800)]
Merge branch 'octopus-saved' into octopus

4 years agomgr/cephadm: show failure cause during placement 38155/head
Michael Fritch [Thu, 12 Nov 2020 22:09:42 +0000 (15:09 -0700)]
mgr/cephadm: show failure cause during placement

the host and exception cause are not shown in the event log when a
daemon placement failure occurs

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit d0c779007d1ef0f93b376e9c0f852d62301e876e)

4 years agoqa/task/cephadm: run cephadm only on bootstrap_remote
Kyr Shatskyy [Wed, 11 Nov 2020 15:18:56 +0000 (16:18 +0100)]
qa/task/cephadm: run cephadm only on bootstrap_remote

Because not all the node in teuthology config might
have any cephadm related role we should not execute
cephadm on random node.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
(cherry picked from commit f75b00984e17a08087f41e7110fe64d4872d3200)

4 years agomgr/cephadm: validate user provided ssh_config
Michael Fritch [Thu, 12 Nov 2020 23:21:40 +0000 (16:21 -0700)]
mgr/cephadm: validate user provided ssh_config

ensure the user provided ssh_config contains a valid
`StrictHostKeyChecking` setting

Fixes: https://tracker.ceph.com/issues/48158
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 69f2f4fbd92679a8576b68ba6b3e07d215a25eae)

4 years agocephadm: install podman from the Kubic project
Michael Fritch [Mon, 2 Nov 2020 15:54:53 +0000 (08:54 -0700)]
cephadm: install podman from the Kubic project

ppa:projectatomic is no longer maintained, updates are now provided via
the Kubic project

Fixes: https://tracker.ceph.com/issues/48072
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 26937aad69b9e476f6a8d476ba4e56913e3df5d6)

4 years agoqa/suites/rados/cephadm: install podman from the Kubic project
Michael Fritch [Mon, 2 Nov 2020 15:54:35 +0000 (08:54 -0700)]
qa/suites/rados/cephadm: install podman from the Kubic project

ppa:projectatomic is no longer maintained, updates are now provided via
the Kubic project

Fixes: https://tracker.ceph.com/issues/48072
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 22605b7e98b2e9fef261d8ba111f9ebfc20590c6)

4 years agomgr/cephadm: mon to mgr service type in scheduler tests
Adam King [Mon, 5 Oct 2020 12:07:00 +0000 (08:07 -0400)]
mgr/cephadm: mon to mgr service type in scheduler tests

now that we're not deploying even number of mons, need
to use different service type for scheduler tests

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

4 years agomgr/cephadm: only deploy 3 mons by default when there are 4 hosts
Adam King [Wed, 30 Sep 2020 13:44:36 +0000 (09:44 -0400)]
mgr/cephadm: only deploy 3 mons by default when there are 4 hosts

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

4 years agocephadm: verify root privileges before log dir create
Michael Fritch [Tue, 10 Nov 2020 01:07:15 +0000 (18:07 -0700)]
cephadm: verify root privileges before log dir create

root privileges need to be verified before creating the log dir

introduced by 81a7df0

Fixes: https://tracker.ceph.com/issues/48166
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 3817c6e258f2368bdf31d4ce9eab86c682c11d6d)

4 years agomgr/cephadm: add NFS RGW keyring application tag
Michael Fritch [Wed, 28 Oct 2020 19:26:29 +0000 (13:26 -0600)]
mgr/cephadm: add NFS RGW keyring application tag

restrict the OSD keyring caps to the `rgw` application

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit d400677765b05777ad4f482919f62e4ec4e13cbf)

4 years agomgr/cephadm: clean-up NFS rgw keyring
Michael Fritch [Wed, 7 Oct 2020 19:53:01 +0000 (13:53 -0600)]
mgr/cephadm: clean-up NFS rgw keyring

remove RGW keyring during NFS daemon `post_remove`

Fixes: https://tracker.ceph.com/issues/43686
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 219c0c3d1b7f21b9bf1969b3311d313844bdd1e3)

4 years agomgr/cephadm: add RGW support for NFS ganesha
Michael Fritch [Wed, 7 Oct 2020 19:38:10 +0000 (13:38 -0600)]
mgr/cephadm: add RGW support for NFS ganesha

- create an RGW keyring for NFS daemon access
- generate RGW FSAL in ganesha.conf

Fixes: https://tracker.ceph.com/issues/43686
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 5a2ffc3dba52b9ebb55a10ed8f8dd6cc9febd1a3)

4 years agocephadm: mount RGW keyring in NFS container
Michael Fritch [Wed, 7 Oct 2020 19:37:59 +0000 (13:37 -0600)]
cephadm: mount RGW keyring in NFS container

Fixes: https://tracker.ceph.com/issues/43686
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 53c6388c5774a2fd10e2ab5a23963698a5a0e336)

4 years agomgr/cephadm: many-to-many Prometheus error
Patrick Seidensal [Mon, 26 Oct 2020 11:53:17 +0000 (12:53 +0100)]
mgr/cephadm: many-to-many Prometheus error

Fix configuration created by cephadm to prevent any "many-to-many
matching not allowed: matching labels must be unique on one side"
issues. The mgr/prometheus exporter exports suitable instance labels
itself, which can be taken over when `honor_labels` in Prometheus is set
to `true`.

Fixes: https://tracker.ceph.com/issues/47997
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit ea8a3aca02f2adc1e68a055ab95ced207da1561a)

4 years agomgr/cephadm: Allow customizing mgr/cephadm/lsmcli_blink_lights_cmd per host
Volker Theile [Fri, 30 Oct 2020 08:22:30 +0000 (09:22 +0100)]
mgr/cephadm: Allow customizing mgr/cephadm/lsmcli_blink_lights_cmd per host

* Rename key name from 'lsmcli_blink_lights_cmd' to 'blink_device_light_cmd'
* Refactor TemplateMgr::render() method to use the Ceph common behavior how to name store/module option keys. The old implementation required a key like 'mgr/cephadm/services_nfs_ganesha.conf' instead of 'mgr/cephadm/services/nfs/ganesha.conf' or 'mgr/cephadm/mgr0_blink_device_light_cmd' instead of 'mgr/cephadm/mgr0/blink_device_light_cmd'.

Fixes: https://tracker.ceph.com/issues/48041
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit cd79c9912ab35ee6296d613edc7830410a141e05)

Conflicts:
doc/rados/operations/devices.rst

4 years agodoc/mgr/orchestrator: Update about "{mds, rgw} add" status in rook
Varsha Rao [Wed, 28 Oct 2020 13:37:35 +0000 (19:07 +0530)]
doc/mgr/orchestrator: Update about "{mds, rgw} add" status in rook

"mds add" and "rgw add" are no longer supported in rook. Their implementation
was removed by commits 56cfeb6 and 0580297. Instead "apply mds" and "apply rgw"
is preferred.

Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 23b9fb6456eab167719d653402f59126a12b261b)

4 years agocephadm: Set listen-addresses on alertmanager container
diwilli [Wed, 28 Oct 2020 17:43:05 +0000 (17:43 +0000)]
cephadm: Set listen-addresses on alertmanager container

This explicitly passes web.listen-address and cluster.listen-address to the alertmanager container allowing the use of public IP addresses.

Fixes: https://tracker.ceph.com/issues/48031
Signed-off-by: Dan Williams <dw@adventsol.co.uk>
(cherry picked from commit 29730a4bc168913d5dad6d9e487d2dc58a0e3c86)

4 years agodoc: document additional journal args in cephadm logs command
Adam King [Tue, 20 Oct 2020 20:08:28 +0000 (16:08 -0400)]
doc: document additional journal args in cephadm logs command

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

4 years agomgr/orchestrator: set `lsm_data` to default of Dict type
Michael Fritch [Tue, 13 Oct 2020 00:56:34 +0000 (18:56 -0600)]
mgr/orchestrator: set `lsm_data` to default of Dict type

similar to handling of `sys_api`, convert a NoneType to a Dict

Fixes: https://tracker.ceph.com/issues/47841
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 39512f9f9aa8ad6f0dab31e249ff563003c0befe)

4 years agocephadm: allow ntpsec service
Dimitri Savineau [Fri, 9 Oct 2020 17:44:32 +0000 (13:44 -0400)]
cephadm: allow ntpsec service

ntpsec is available starting Ubuntu Focal (20.04) and Debian Buster (10)
as an alternate NTP daemon.

Fixes: https://tracker.ceph.com/issues/47525
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit a8a64d5417d6f9ad977ea685eb74d564b1344cf3)

4 years agomgr/cephadm: adapt <placement> usage string
Joshua Schmid [Tue, 13 Oct 2020 10:48:32 +0000 (12:48 +0200)]
mgr/cephadm: adapt <placement> usage string

Signed-off-by: Joshua Schmid <jschmid@suse.de>
(cherry picked from commit 86d226471113736e864328eece5e9e34b3ae3696)

4 years agocephadm: allow uid/gid == 0 in copy_tree, copy_files, move_files
Tim Serong [Mon, 5 Oct 2020 09:14:42 +0000 (20:14 +1100)]
cephadm: allow uid/gid == 0 in copy_tree, copy_files, move_files

If the uid or gid passed to copy_tree(), copy_files() or
move_files() is 0 (the root user), the current check for
`if not uid or not gid` does the wrong thing, i.e. it
thinks the uid and/or gid aren't set, then calls out to
extract_uid_gid(), which fails when run against
prometheus/grafana/alertmanager containers.

Fixes: https://tracker.ceph.com/issues/47745
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit 768e89d9ae733c88a9e85b71b5432f8d6f511f43)

4 years agomgr/cepahdm: move convert_tags_to_repo_digest to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:44:54 +0000 (13:44 +0200)]
mgr/cepahdm: move convert_tags_to_repo_digest to serve.py

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

4 years agomgr/cephadm: move _check_daemons to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:36:25 +0000 (13:36 +0200)]
mgr/cephadm: move _check_daemons to serve.py

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

4 years agomgr/cephadm: move _apply_service to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:26:46 +0000 (13:26 +0200)]
mgr/cephadm: move _apply_service to serve.py

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

4 years agomgr/cephadm: move _apply_all_services to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:21:29 +0000 (13:21 +0200)]
mgr/cephadm: move _apply_all_services to serve.py

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

4 years agomgr/cephadm: move _update_paused_health to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:14:13 +0000 (13:14 +0200)]
mgr/cephadm: move _update_paused_health to serve.py

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

4 years agomgr/cephadm: move _check_for_strays to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:12:21 +0000 (13:12 +0200)]
mgr/cephadm: move _check_for_strays to serve.py

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

4 years agomgr/cephadm: move _deploy_etc_ceph_ceph_conf to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:09:28 +0000 (13:09 +0200)]
mgr/cephadm: move _deploy_etc_ceph_ceph_conf to serve.py

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

4 years agomgr/cephadm: move _refresh_host_osdspec_previews to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:07:36 +0000 (13:07 +0200)]
mgr/cephadm: move _refresh_host_osdspec_previews to serve.py

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

4 years agomgr/cephadm: move _refresh_host_devices to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 11:05:06 +0000 (13:05 +0200)]
mgr/cephadm: move _refresh_host_devices to serve.py

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

4 years agomgr/cephadm: move _refresh_host_daemons to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 10:59:12 +0000 (12:59 +0200)]
mgr/cephadm: move _refresh_host_daemons to serve.py

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

4 years agomgr/cephadm: move _check_host to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 10:54:55 +0000 (12:54 +0200)]
mgr/cephadm: move _check_host to serve.py

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

4 years agomgr/cephadm: move _refresh_hosts_and_daemons to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 10:49:39 +0000 (12:49 +0200)]
mgr/cephadm: move _refresh_hosts_and_daemons to serve.py

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

4 years agomgr/cephadm: move _serve_sleep to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 10:49:02 +0000 (12:49 +0200)]
mgr/cephadm: move _serve_sleep to serve.py

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

4 years agomgr/cephadm: move serve() to serve.py
Sebastian Wagner [Fri, 11 Sep 2020 10:42:40 +0000 (12:42 +0200)]
mgr/cephadm: move serve() to serve.py

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

4 years agomgr/cephadm: add serve.py
Sebastian Wagner [Fri, 11 Sep 2020 10:39:01 +0000 (12:39 +0200)]
mgr/cephadm: add serve.py

This module contains functions that are executed in the
serve() thread.
Meaning they don't block the CLI

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

4 years agocephadm: Fix error setting 'mgr/cephadm/container_init' config
Ricardo Marques [Wed, 30 Sep 2020 15:32:57 +0000 (16:32 +0100)]
cephadm: Fix error setting 'mgr/cephadm/container_init' config

Fixes: https://tracker.ceph.com/issues/47501
Signed-off-by: Ricardo Marques <rimarques@suse.com>
(cherry picked from commit cce937a599ebaf37fc0b35de19ed44afa80d1f06)

4 years agodocs: <orch osd spec> is no longer present
Joshua Schmid [Fri, 2 Oct 2020 08:22:23 +0000 (10:22 +0200)]
docs: <orch osd spec> is no longer present

Signed-off-by: Joshua Schmid <jschmid@suse.de>
(cherry picked from commit b38bc14525460e0bec7829774d2385b62d6c8742)

4 years agomgr/cephadm: do not escape HTML for custom templates
Patrick Seidensal [Fri, 25 Sep 2020 12:05:17 +0000 (14:05 +0200)]
mgr/cephadm: do not escape HTML for custom templates

Fixes: https://tracker.ceph.com/issues/47648
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit ae9cab58e24389ded885561a763e9826cfa5c645)

4 years agomgr/cephadm: continue trying all hosts for service deployment
Dan Mick [Thu, 6 Aug 2020 02:00:57 +0000 (02:00 +0000)]
mgr/cephadm: continue trying all hosts for service deployment

One failure should not stop the attempt to start all instances.

Fixes: https://tracker.ceph.com/issues/46665
Signed-off-by: Dan Mick <dmick@redhat.com>
(cherry picked from commit dd7bd4807a1668e1fb91581c69bb549ae62611db)

4 years agomgr/cephadm: Make type annotnations for cephadm.services mandatory
Sebastian Wagner [Fri, 11 Sep 2020 15:42:44 +0000 (17:42 +0200)]
mgr/cephadm: Make type annotnations for cephadm.services mandatory

* Found a wrong default for `OSDService.create_single_host`

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

Conflicts:
src/mypy.ini
src/pybind/mgr/cephadm/services/nfs.py

4 years agomgr/cephadm: get rbd-mirror daemon-id when checking for strays
Adam King [Wed, 23 Sep 2020 16:52:37 +0000 (12:52 -0400)]
mgr/cephadm: get rbd-mirror daemon-id when checking for strays

Currently, list_servers() gets the rbd-mirror service-id instead
of the daemon-id so the daemon is marked as stray. This PR uses
that service-id to find the daemon-id and uses that to check if
the daemon is stray.

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

4 years agomgr/cephadm: upgrade_state can be literally "null"
Sebastian Wagner [Mon, 28 Sep 2020 13:09:16 +0000 (15:09 +0200)]
mgr/cephadm: upgrade_state can be literally "null"

Fixes: https://tracker.ceph.com/issues/47580
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 155fd9800211cf4c90cecae59b5f332ecdd665e8)

4 years ago15.2.6 v15.2.6
Jenkins Build Slave User [Tue, 17 Nov 2020 18:12:53 +0000 (18:12 +0000)]
15.2.6

4 years agomon/MonClient: bring back CEPHX_V2 authorizer challenges
Ilya Dryomov [Fri, 16 Oct 2020 10:57:50 +0000 (12:57 +0200)]
mon/MonClient: bring back CEPHX_V2 authorizer challenges

Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
challenges for peers that don't support CEPHX_V2.  However, it
made it so that authorizer challenges are skipped for all peers in
both msgr1 and msgr2 cases, effectively disabling the protection
against replay attacks that was put in place in commit f80b848d3f83
("auth/cephx: add authorizer challenge", CVE-2018-1128).

This is because con->get_features() always returns 0 at that
point.  In msgr1 case, the peer shares its features along with the
authorizer, but while they are available in connect_msg.features they
aren't assigned to con until ProtocolV1::open().  In msgr2 case, the
peer doesn't share its features until much later (in CLIENT_IDENT
frame, i.e. after the authentication phase).  The result is that
!CEPHX_V2 branch is taken in all cases and replay attack protection
is lost.

Only clusters with cephx_service_require_version set to 2 on the
service daemons would not be silently downgraded.  But, since the
default is 1 and there are no reports of looping on BADAUTHORIZER
faults, I'm pretty sure that no one has ever done that.  Note that
cephx_require_version set to 2 would have no effect even though it
is supposed to be stronger than cephx_service_require_version
because MonClient::handle_auth_request() didn't check it.

To fix:

- for msgr1, check connect_msg.features (as was done before commit
  c58c5754dfd2) and challenge if CEPHX_V2 is supported.  Together
  with two preceding patches that resurrect proper cephx_* option
  handling in msgr1, this covers both "I want old clients to work"
  and "I wish to require better authentication" use cases.

- for msgr2, don't check anything and always challenge.  CEPHX_V2
  predates msgr2, anyone speaking msgr2 must support it.

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

4 years agomsg/async/ProtocolV1: resurrect "implement cephx_*require_version options"
Ilya Dryomov [Fri, 16 Oct 2020 09:35:27 +0000 (11:35 +0200)]
msg/async/ProtocolV1: resurrect "implement cephx_*require_version options"

This was added in commit 9bcbc2a3621f ("mon,msg: implement
cephx_*_require_version options") and inadvertently dropped in
commit e6f043f7d2dc ("msgr/async: huge refactoring of protocol V1").
As a result, service daemons don't enforce cephx_require_version
and cephx_cluster_require_version options and connections without
CEPH_FEATURE_CEPHX_V2 are allowed through.

(cephx_service_require_version enforcement was brought back a
year later in commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it"), although the peer gets
TAG_BADAUTHORIZER instead of TAG_FEATURES.)

Resurrect the original behaviour: all cephx_*require_version
options are enforced and the peer gets TAG_FEATURES, signifying
that it is missing a required feature.

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

4 years agomsg/async/ProtocolV1: resurrect "include MGR as service when applying cephx settings"
Ilya Dryomov [Fri, 16 Oct 2020 09:33:32 +0000 (11:33 +0200)]
msg/async/ProtocolV1: resurrect "include MGR as service when applying cephx settings"

This was added in commit 0ec7d6bbc4af ("msg/async,simple: include MGR
as service when applying cephx settings") and inadvertently dropped in
commit e6f043f7d2dc ("msgr/async: huge refactoring of protocol V1").
As a result, mgr daemons are miscategorized as clients when enforcing
cephx_*require_signatures options.

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

4 years agoMerge pull request #38045 from dsavineau/wip-48184-octopus
Yuri Weinstein [Fri, 13 Nov 2020 20:01:34 +0000 (12:01 -0800)]
Merge pull request #38045 from dsavineau/wip-48184-octopus

octopus: ceph-volume: fix lvm batch auto with full SSDs

Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>