]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agomgr/prometheus: don't store exception as e 38334/head
Ken Dreyer [Thu, 3 Dec 2020 17:48:06 +0000 (10:48 -0700)]
mgr/prometheus: don't store exception as e

Python's logging module's exception() method will log the full exception
and stack trace for us, so we do not need to store the exception in the
"e" variable here.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit a17c603effd3367dc64c87a1d6c53d6d3d794fc7)

4 years agomgr/prometheus: use threading.Event instead of sleep
Boris Ranto [Wed, 25 Nov 2020 19:49:48 +0000 (20:49 +0100)]
mgr/prometheus: use threading.Event instead of sleep

This allows us to avoid waiting for the sleep to finish when waiting for
the thread to finish.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit dd5886c3c006e388283df50cc87addeffb3b2b52)

4 years agomgr/prometheus: Log collection issues
Boris Ranto [Wed, 25 Nov 2020 09:32:35 +0000 (10:32 +0100)]
mgr/prometheus: Log collection issues

Log any issues encountered during the data collection and continue to
collect the data anyway (after a sleep).

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 28a5c13bf993679e3098d73df27ded249f34dc99)

4 years agomgr/prometheus: Use mgr.release_name for always on modules
Boris Ranto [Wed, 25 Nov 2020 09:27:25 +0000 (10:27 +0100)]
mgr/prometheus: Use mgr.release_name for always on modules

The host_version is not populated properly in the early stages of ceph
mgr start up process. We can use mgr.release_name instead. It is more
stable and it provides the data even if mgr_map does not contain the
versions, yet.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit aa0650092da3cbf1a73151999874001352cfb9ef)

4 years agomgr/prometheus: Clean up collection thread
Boris Ranto [Wed, 25 Nov 2020 09:25:49 +0000 (10:25 +0100)]
mgr/prometheus: Clean up collection thread

We need to clean up the metrics collection thread.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 03fcaccafc877d10a894b1c39af5547f172c1ed3)

Conflicts:
prometheus/module.py: Pass _global_instance as an argument to
        MetricCollectionThread, collect can't be a static function
        anymore

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

nautilus: 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 38295/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: cmake call differences and trivial logging
        output change.

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 #38268 from idryomov/wip-relax-preauth-asserts-again-nautilus
Ilya Dryomov [Thu, 26 Nov 2020 12:40:07 +0000 (13:40 +0100)]
Merge pull request #38268 from idryomov/wip-relax-preauth-asserts-again-nautilus

nautilus: msg/async/ProtocolV2: allow rxbuf/txbuf get bigger in testing, again

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge pull request #38024 from rhcs-dashboard/wip-48180-nautilus
Ernesto Puerta [Thu, 26 Nov 2020 11:46:59 +0000 (12:46 +0100)]
Merge pull request #38024 from rhcs-dashboard/wip-48180-nautilus

nautilus: mgr/dashboard: Display users current bucket quota usage

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoMerge pull request #37995 from callithea/wip-48133-nautilus
Ernesto Puerta [Thu, 26 Nov 2020 11:45:37 +0000 (12:45 +0100)]
Merge pull request #37995 from callithea/wip-48133-nautilus

nautilus: mgr/dashboard: disable cluster selection in NFS export editing form

Reviewed-by: Sebastian Krah <skrah@suse.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
4 years agoMerge pull request #37756 from tspmelo/wip-47198-nautilus
Ernesto Puerta [Thu, 26 Nov 2020 11:41:15 +0000 (12:41 +0100)]
Merge pull request #37756 from tspmelo/wip-47198-nautilus

nautilus: mgr/dashboard: Datatable catches select events from other datatables

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agoMerge pull request #38188 from rakeshgm/rhel_nautilus_repos
rakeshgm [Thu, 26 Nov 2020 10:41:41 +0000 (16:11 +0530)]
Merge pull request #38188 from rakeshgm/rhel_nautilus_repos

nautilus: qa/distros: add rhel 7.9

4 years agoqa/distros: add rhel 7.9 38188/head
rakeshgm [Wed, 18 Nov 2020 12:46:09 +0000 (18:16 +0530)]
qa/distros: add rhel 7.9

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
4 years agoMerge pull request #38296 from badone/wip-nautilus-pin-importlib_metadata
Brad Hubbard [Thu, 26 Nov 2020 05:57:26 +0000 (15:57 +1000)]
Merge pull request #38296 from badone/wip-nautilus-pin-importlib_metadata

nautilus: mgr: Pin importlib_metadata version 2.1.0

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/mgr: Pin importlib_metadata version 2.1.0 38296/head
Brad Hubbard [Thu, 26 Nov 2020 03:49:11 +0000 (13:49 +1000)]
pybind/mgr: Pin importlib_metadata version 2.1.0

Latest release of importlib_metadata breaks the Nautilus build.

Master does not appear to be affected, probably because it uses
python3.6 or greater which is compatible with the latest
importlib_metadata version.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
4 years agoMerge pull request #37605 from smithfarm/wip-47803-nautilus
Yuri Weinstein [Wed, 25 Nov 2020 19:35:38 +0000 (11:35 -0800)]
Merge pull request #37605 from smithfarm/wip-47803-nautilus

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

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38015 from dsavineau/wip-48087-nautilus
Jan Fajerski [Wed, 25 Nov 2020 14:51:20 +0000 (15:51 +0100)]
Merge pull request #38015 from dsavineau/wip-48087-nautilus

nautilus: ceph-volume: consume mount opt in simple activate

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
4 years agoMerge PR #38048 into nautilus
Jan Fajerski [Wed, 25 Nov 2020 11:00:17 +0000 (12:00 +0100)]
Merge PR #38048 into nautilus

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

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
4 years agoMerge PR #37723 into nautilus
Jan Fajerski [Wed, 25 Nov 2020 10:57:27 +0000 (11:57 +0100)]
Merge PR #37723 into nautilus

* refs/pull/37723/head:
ceph-volume: add no-systemd argument to zap

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
4 years agoMerge pull request #37961 from callithea/wip-47620-nautilus
Yuri Weinstein [Tue, 24 Nov 2020 17:52:58 +0000 (09:52 -0800)]
Merge pull request #37961 from callithea/wip-47620-nautilus

nautilus: mgr/dashboard: fix security scopes of some NFS-Ganesha endpoints

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #37834 from smithfarm/wip-47933-nautilus
Yuri Weinstein [Tue, 24 Nov 2020 17:49:22 +0000 (09:49 -0800)]
Merge pull request #37834 from smithfarm/wip-47933-nautilus

nautilus: tools/rados: flush formatter periodically during json output of "rados ls"

Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agoMerge pull request #37706 from smithfarm/wip-47899-nautilus
Yuri Weinstein [Tue, 24 Nov 2020 17:47:39 +0000 (09:47 -0800)]
Merge pull request #37706 from smithfarm/wip-47899-nautilus

nautilus: mon: have 'mon stat' output json as well

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37693 from smithfarm/wip-47878-nautilus
Yuri Weinstein [Tue, 24 Nov 2020 17:46:27 +0000 (09:46 -0800)]
Merge pull request #37693 from smithfarm/wip-47878-nautilus

nautilus: build-integration-branch: take PRs in chronological order

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #37659 from smithfarm/wip-46014-nautilus
Yuri Weinstein [Tue, 24 Nov 2020 17:43:51 +0000 (09:43 -0800)]
Merge pull request #37659 from smithfarm/wip-46014-nautilus

nautilus: log: fix timestap precision of log can't set to millisecond.

Reviewed-by: Adam Emerson <aemerson@redhat.com>
4 years agomsg/async/ProtocolV2: allow rxbuf/txbuf get bigger in testing, again 38268/head
Ilya Dryomov [Sat, 21 Nov 2020 10:01:40 +0000 (11:01 +0100)]
msg/async/ProtocolV2: allow rxbuf/txbuf get bigger in testing, again

With CEPHX_V2 authorizer challenges brought back in commit
4a82c72e3bdd, these need to be bumped again, as two authorizers
(without and then with the challenge) are transmitted and signed
instead of one (without the challenge).  See commit 94953dd9398a
("msg/async/ProtocolV2: allow rxbuf/txbuf get bigger in testing")
for details.

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

4 years ago14.2.15 v14.2.15
Jenkins Build Slave User [Mon, 23 Nov 2020 18:30:14 +0000 (18:30 +0000)]
14.2.15

4 years agoMerge pull request #38198 from jan--f/wip-48302-nautilus
Yuri Weinstein [Mon, 23 Nov 2020 18:21:25 +0000 (10:21 -0800)]
Merge pull request #38198 from jan--f/wip-48302-nautilus

nautilus: ceph-volume: fix filestore/dmcrypt activate

Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoceph-volume: fix test_setup_device_device_name_is_none 38198/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 agomon: make mon summary more concise in 'ceph -s' 37706/head
Sage Weil [Mon, 5 Aug 2019 14:38:28 +0000 (09:38 -0500)]
mon: make mon summary more concise in 'ceph -s'

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 3e7c185bd4b2312f9801b8664fb175801c904871)

Conflicts:
PendingReleaseNotes
- drop already published release notes
        src/mon/MonMap.cc
- change ceph::to_string to std::to_string

4 years agoqa/cephtool: test 'mon stat' commands
Joao Eduardo Luis [Tue, 13 Oct 2020 08:24:34 +0000 (08:24 +0000)]
qa/cephtool: test 'mon stat' commands

Signed-off-by: Joao Eduardo Luis <joao@suse.com>
(cherry picked from commit 122388429d01ef2f294dc2846d16d88aa0bdba68)

Conflicts:
qa/workunits/cephtool/test.sh
- drop unrelated "# test elector" comment (elector test not backported)
- no "test_mon_priority_and_weight" function in nautilus

4 years agomon: have 'mon stat' output json as well
Joao Eduardo Luis [Mon, 12 Oct 2020 11:29:16 +0000 (11:29 +0000)]
mon: have 'mon stat' output json as well

Fixes: https://tracker.ceph.com/issues/46816
Signed-off-by: Joao Eduardo Luis <joao@suse.com>
(cherry picked from commit c148a3cde5c256576d0a67a40321e543fdf891bf)

4 years agoMerge pull request #38173 from kamoltat/wip-ksirivad-nautilus-backports2
Yuri Weinstein [Sat, 21 Nov 2020 00:36:08 +0000 (16:36 -0800)]
Merge pull request #38173 from kamoltat/wip-ksirivad-nautilus-backports2

nautilus:mgr/progress: introduce turn off/on feature

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #38100 from trociny/wip-48244-nautilus
Yuri Weinstein [Fri, 20 Nov 2020 21:30:52 +0000 (13:30 -0800)]
Merge pull request #38100 from trociny/wip-48244-nautilus

nautilus: os/bluestore: fix "end reached" check in collection_list_legacy

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #38046 from dsavineau/wip-48185-nautilus
Yuri Weinstein [Fri, 20 Nov 2020 17:54:17 +0000 (09:54 -0800)]
Merge pull request #38046 from dsavineau/wip-48185-nautilus

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

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agomgr/progress: introduce turn off/on feature 38173/head
Kamoltat [Wed, 30 Sep 2020 05:44:23 +0000 (05:44 +0000)]
mgr/progress: introduce turn off/on feature

progress module can be turned off/on by using
the commands: 'progress off' and 'progress on'

As well as refractoring teuthology test suite
to prevent future bugs that can possibly occur

fixes: https://tracker.ceph.com/issues/47238

Signed-off-by: kamoltat <ksirivad@redhat.com>
(cherry picked from commit 993bb02b30cf73a1c1c70da1ef266be8373d56dd)

 Conflicts:
PendingReleaseNotes - add release notes about this feature
qa/tasks/mgr/test_progress.py - replace helper functions that is neeeded
for dealing with more than 1 type of events
      - remove `period` in wait_until_equal()
src/pybind/mgr/progress/module.py - remove code that deals with mypy in master
qa/suites/rados/singleton/all/pg-autoscaler-progress-off.yaml - remove log-ignorelist

update some files

Signed-off-by: kamoltat <ksirivad@redhat.com>
4 years agomgr/dashboard: Display users current bucket quota usage 38024/head
Avan Thakkar [Fri, 17 Apr 2020 08:51:48 +0000 (14:21 +0530)]
mgr/dashboard: Display users current bucket quota usage
Fixes: https://tracker.ceph.com/issues/45011
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit 4fabba0bb772d480dcddc83272c83e7714726fc1)

 Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts
   - Resolved conflicts due to variable name change and few other import conflicts.

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 agoceph-volume: add a unit tests to lvm batch 38046/head
Guillaume Abrioux [Wed, 4 Nov 2020 14:11:58 +0000 (15:11 +0100)]
ceph-volume: add a unit tests to lvm batch

This commit adds unit tests in order to cover `_sort_rotational_disks()`
call when deploying with full hdd/ssd or mixed hdd/sdd scenarios.

Fixes: https://tracker.ceph.com/issues/48150
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 13514a24cfdc32d67cfbc1201aa427168a926978)

4 years agoceph-volume: fix lvm batch auto with full SSDs
Dimitri Savineau [Tue, 3 Nov 2020 23:21:35 +0000 (18:21 -0500)]
ceph-volume: fix lvm batch auto with full SSDs

The ceph-volume lvm batch --auto introduced by [1] breaks the backward
compatibility when using non rotational devices only (SSD and/or NVMe).
Those devices are reaffected as bluestore db or filestore journal
devices while we want them as data devices.

Fixes: https://tracker.ceph.com/issues/48106
[1] https://github.com/ceph/ceph/pull/34740

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

4 years agomgr/dashboard: disable cluster selection in NFS export editing form 37995/head
Kiefer Chang [Wed, 4 Nov 2020 03:00:21 +0000 (11:00 +0800)]
mgr/dashboard: disable cluster selection in NFS export editing form

We should not allow changing an export's cluster because an export ID
might live in one cluster but not in another one. Editing a non-existing
export in a cluster causes an error.

Fixes: https://tracker.ceph.com/issues/47373
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
(cherry picked from commit d678d8076c2a4c5edfe489d553e3c8770462f023)

 Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.spec.ts
 - Some imports differ from master; remove SummaryService and CephReleaseNamePipe from providers
   and no longer needed test case; also remove not working docsUrl (and related lines) from
   nfs-form.component.ts

4 years ago14.2.14 v14.2.14
Jenkins Build Slave User [Tue, 17 Nov 2020 18:10:11 +0000 (18:10 +0000)]
14.2.14

4 years agoMerge remote-tracking branch 'security/wip-resurrect-authorizer-challenges-nautilus...
Yuri Weinstein [Tue, 17 Nov 2020 16:53:03 +0000 (08:53 -0800)]
Merge remote-tracking branch 'security/wip-resurrect-authorizer-challenges-nautilus' into nautilus

4 years agoMerge pull request #38076 from badone/wip-admin_socket_output-invalidated-iterator...
Yuri Weinstein [Mon, 16 Nov 2020 16:55:49 +0000 (08:55 -0800)]
Merge pull request #38076 from badone/wip-admin_socket_output-invalidated-iterator-crash

nautilus: test/admin_socket_output: Don't invalidate 'target' iterator

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
4 years agoos/bluestore: fix "end reached" check in collection_list_legacy 38100/head
Mykola Golub [Mon, 9 Nov 2020 20:19:48 +0000 (20:19 +0000)]
os/bluestore: fix "end reached" check in collection_list_legacy

To preserve the old bluestore behavior it should compare the
current object with the end using bluestore keys, not oids.

Fixes: https://tracker.ceph.com/issues/48153
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit e63489f249f9ba3bc9cb1806568f860effd8a0b6)

4 years agoMerge pull request #38069 from smithfarm/wip-48233-nautilus
Yuri Weinstein [Sat, 14 Nov 2020 23:27:21 +0000 (15:27 -0800)]
Merge pull request #38069 from smithfarm/wip-48233-nautilus

nautilus: mgr: avoid false alarm of MGR_MODULE_ERROR

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agotest/admin_socket_output: Don't invalidate 'target' iterator 38076/head
Brad Hubbard [Sat, 14 Nov 2020 01:53:06 +0000 (11:53 +1000)]
test/admin_socket_output: Don't invalidate 'target' iterator

Fixes: https://tracker.ceph.com/issues/48204
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
4 years agomgr: avoid false alarm of MGR_MODULE_ERROR 38069/head
Kefu Chai [Thu, 25 Jun 2020 02:41:30 +0000 (10:41 +0800)]
mgr: avoid false alarm of MGR_MODULE_ERROR

mgr sends healthy report periodically, the report includes the
information whether the always-on modules are loaded or not. but the
modules are loaded with two steps:

1. load the options and command exposed by modules. the options and
   commands are registered using static methods of the subclasss of
   MgrModule.
2. create an instance of the subclass of MgrModule. this is performed
   in background by a Finisher thread. upon finishing of the construction
   of the instance, ActivePyModules::start_one() adds the module which
   successfully creates the class to `modules`.

but there is chance that when mgr sends healthy report, the always-on
module is still creating its instance of MgrModule subclass, or that
task is still pending in the finisher thread. in that case, mgr would
add a false error message like
```
4 mgr modules have failed (MGR_MODULE_ERROR)
```
in the healthy report

in this change, the number of modules in pending state is tracked,
and mgr will not take the missing always-on modules into account unless
the number of pending modules is 0.

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

4 years agomgr/PyModuleRegistry: ignore 'obsolete' modules
Sage Weil [Sat, 11 Apr 2020 14:51:46 +0000 (09:51 -0500)]
mgr/PyModuleRegistry: ignore 'obsolete' modules

Old modules may be in the mgrmap (and always_on) but no longer exist.  Do
not try to load those or raise errors about them.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit a59f4e5deb49536af23473658e0f04d0f495829f)

4 years agoceph-volume: fix lvm help test 38048/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 #37554 from Vicente-Cheng/wip-47748-nautilus
Yuri Weinstein [Wed, 11 Nov 2020 01:05:18 +0000 (17:05 -0800)]
Merge pull request #37554 from Vicente-Cheng/wip-47748-nautilus

nautilus: mon: set session_timeout when adding to session_map

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
4 years agoceph-volume: consume mount opt in simple activate 38015/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 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)

Conflicts:
src/msg/async/ProtocolV1.cc [ commit c58c5754dfd2
  ("msg/async/ProtocolV1: use AuthServer and AuthClient") not
  in nautilus.  This means that only msgr2 is affected, so drop
  ProtocolV1.cc hunk.  As a result, skip_authorizer_challenge is
  never set, but this is fine because msgr1 still uses old ms_*
  auth methods and tests CEPHX_V2 appropriately. ]

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)

Conflicts:
src/msg/async/ProtocolV1.cc [ drop nautilus-only commit
  89ffece49097 ("msg/async/ProtocolV1: require CEPHX_V2 if
  cephx_service_require_version >= 2") ]

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 #37844 from smithfarm/wip-46118-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:20:20 +0000 (09:20 -0800)]
Merge pull request #37844 from smithfarm/wip-46118-nautilus

nautilus: mgr: fix race between module load and notify

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
4 years agoMerge pull request #37843 from smithfarm/wip-47894-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:19:37 +0000 (09:19 -0800)]
Merge pull request #37843 from smithfarm/wip-47894-nautilus

nautilus: bluestore: attach csum for compressed blobs

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #37842 from smithfarm/wip-47707-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:19:11 +0000 (09:19 -0800)]
Merge pull request #37842 from smithfarm/wip-47707-nautilus

nautilus: bluestore: Support flock retry

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #37824 from smithfarm/wip-46008-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:18:21 +0000 (09:18 -0800)]
Merge pull request #37824 from smithfarm/wip-46008-nautilus

nautilus: bluestore: test/objectstore/store_test: kill ExcessiveFragmentation test case

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #37823 from smithfarm/wip-46628-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:17:46 +0000 (09:17 -0800)]
Merge pull request #37823 from smithfarm/wip-46628-nautilus

nautilus: bluestore: BlockDevice.cc: use pending_aios instead of iovec size as ios num

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #37818 from smithfarm/wip-47993-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:17:18 +0000 (09:17 -0800)]
Merge pull request #37818 from smithfarm/wip-47993-nautilus

nautilus: test/store_test: use 'threadsafe' style for death tests

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #37815 from smithfarm/wip-47825-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:16:35 +0000 (09:16 -0800)]
Merge pull request #37815 from smithfarm/wip-47825-nautilus

nautilus: osd/osd-rep-recov-eio.sh: TEST_rados_repair_warning:  return 1

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #37563 from smithfarm/wip-47761-nautilus
Yuri Weinstein [Thu, 5 Nov 2020 17:13:03 +0000 (09:13 -0800)]
Merge pull request #37563 from smithfarm/wip-47761-nautilus

nautilus: mgr/prometheus: add pool compression stats

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
4 years agoMerge pull request #37333 from callithea/wip-46975-nautilus
Lenz Grimmer [Thu, 5 Nov 2020 10:57:44 +0000 (11:57 +0100)]
Merge pull request #37333 from callithea/wip-46975-nautilus

nautilus: mgr/dashboard: Strange iSCSI discovery auth behavior

Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
4 years agomgr/dashboard: fix security scopes of some NFS-Ganesha endpoints 37961/head
Kiefer Chang [Tue, 8 Sep 2020 07:41:02 +0000 (15:41 +0800)]
mgr/dashboard: fix security scopes of some NFS-Ganesha endpoints

Apply NFS_GANESHA scope to these endpoints:
- `/api/nfs-ganesha/daemon`.
- `/ui-api/nfs-ganesha/*`.

Otherwise, any valid users can access them.

Fixes: https://tracker.ceph.com/issues/47356
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
(cherry picked from commit ed123e493cf43e71cb608a31ac8f2a9136f6febf)

 Conflicts:
src/pybind/mgr/dashboard/controllers/nfsganesha.py
 - ReadPermissions between Endpoint and def lsdir;
   def lsdir pylint addition

4 years agoMerge pull request #36834 from rhcs-dashboard/wip-47156-nautilus
Lenz Grimmer [Thu, 5 Nov 2020 09:48:53 +0000 (10:48 +0100)]
Merge pull request #36834 from rhcs-dashboard/wip-47156-nautilus

nautilus: mgr/dashboard: redirect to original URL after successful login

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #37813 from smithfarm/wip-47705-nautilus
Yuri Weinstein [Wed, 4 Nov 2020 21:19:57 +0000 (13:19 -0800)]
Merge pull request #37813 from smithfarm/wip-47705-nautilus

nautilus: osdc/ObjectCacher: overwrite might cause stray read request callbacks

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37810 from smithfarm/wip-48004-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:48:50 +0000 (11:48 -0800)]
Merge pull request #37810 from smithfarm/wip-48004-nautilus

nautilus: rgw: fix: S3 API KeyCount incorrect return.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #37806 from smithfarm/wip-47959-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:48:05 +0000 (11:48 -0800)]
Merge pull request #37806 from smithfarm/wip-47959-nautilus

nautilus: rgw: fix expiration header returned even if there is only one tag in the object the same as the rule

Reviewed-by: Friedmann <ofriedma@redhat.com>
4 years agoMerge pull request #37805 from smithfarm/wip-47897-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:47:12 +0000 (11:47 -0800)]
Merge pull request #37805 from smithfarm/wip-47897-nautilus

nautilus: rgw: use yum rather than dnf for teuthology testing of rgw-orphan-list

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agoMerge pull request #37804 from smithfarm/wip-47851-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:46:42 +0000 (11:46 -0800)]
Merge pull request #37804 from smithfarm/wip-47851-nautilus

nautilus: rgw/rgw_file: Fix the incorrect lru object eviction

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
4 years agoMerge pull request #37802 from smithfarm/wip-47818-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:46:04 +0000 (11:46 -0800)]
Merge pull request #37802 from smithfarm/wip-47818-nautilus

nautilus: rgw: radosgw-admin should paginate internally when listing bucket

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agoMerge pull request #37814 from smithfarm/wip-47890-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:45:13 +0000 (11:45 -0800)]
Merge pull request #37814 from smithfarm/wip-47890-nautilus

nautilus: rbd: librbd: ignore -ENOENT error when disabling object-map

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37811 from smithfarm/wip-47703-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:43:01 +0000 (11:43 -0800)]
Merge pull request #37811 from smithfarm/wip-47703-nautilus

nautilus: rbd: rbd-nbd: don't ignore namespace when unmapping by image spec

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
4 years agoMerge pull request #37682 from idryomov/wip-qa-krbd-whitelist-mon-down-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:42:18 +0000 (11:42 -0800)]
Merge pull request #37682 from idryomov/wip-qa-krbd-whitelist-mon-down-nautilus

nautilus: qa/suites/krbd: whitelist MON_DOWN health warning

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #37552 from Vicente-Cheng/wip-47735-nautilus
Yuri Weinstein [Tue, 3 Nov 2020 19:41:32 +0000 (11:41 -0800)]
Merge pull request #37552 from Vicente-Cheng/wip-47735-nautilus

nautilus: rgw: rgw_file: avoid long-ish delay on shutdown

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years ago14.2.13 v14.2.13
Jenkins Build Slave User [Fri, 30 Oct 2020 14:54:37 +0000 (14:54 +0000)]
14.2.13

4 years agoMerge pull request #37799 from smithfarm/wip-47816-nautilus
Yuri Weinstein [Wed, 28 Oct 2020 19:31:33 +0000 (12:31 -0700)]
Merge pull request #37799 from smithfarm/wip-47816-nautilus

nautilus: rgw: allow rgw-orphan-list to note when rados objects are in namespace

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #37798 from smithfarm/wip-47814-nautilus
Yuri Weinstein [Wed, 28 Oct 2020 19:30:41 +0000 (12:30 -0700)]
Merge pull request #37798 from smithfarm/wip-47814-nautilus

nautilus: rgw: fix setting of namespace in ordered and unordered bucket listing

4 years agoMerge pull request #37747 from smithfarm/wip-fix-enum34-nautilus
Yuri Weinstein [Wed, 28 Oct 2020 19:29:55 +0000 (12:29 -0700)]
Merge pull request #37747 from smithfarm/wip-fix-enum34-nautilus

nautilus: rpm: move python-enum34 into rhel 7 conditional

Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
4 years agoMerge pull request #37816 from smithfarm/wip-47986-nautilus
Yuri Weinstein [Wed, 28 Oct 2020 18:17:03 +0000 (11:17 -0700)]
Merge pull request #37816 from smithfarm/wip-47986-nautilus

nautilus: mon/MonMap: fix unconditional failure for init_with_hosts

Reviewed-by: Wido den Hollander <wido@widodh.nl>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agomgr/dashboard: Fix stale table actions 37756/head
Tiago Melo [Thu, 27 Aug 2020 17:31:48 +0000 (17:31 +0000)]
mgr/dashboard: Fix stale table actions

If we don't emit the select event, the action button can become stale and not
update when the data changes.

This fixes a regression introduced in 31e9bbb9b308277d2f89390d5ff62f13457d69cb

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

Conflicts:
        src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html
        src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
        One of the methods used still requires 1 parameter in nautilus

4 years agodoc/PendingReleaseNotes: mention mon_host DNS regression 37816/head
Nathan Cutler [Tue, 27 Oct 2020 20:35:28 +0000 (21:35 +0100)]
doc/PendingReleaseNotes: mention mon_host DNS regression

This is a nautilus-specific commit.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
4 years agomon/MonMap: fix unconditional failure for init_with_hosts
Patrick Donnelly [Thu, 22 Oct 2020 17:08:26 +0000 (10:08 -0700)]
mon/MonMap: fix unconditional failure for init_with_hosts

This bug prevents setting mon_host to a DNS name.

Fixes: https://tracker.ceph.com/issues/47951
Fixes: 7a1f02acfe6b5d8a760efd16bb594a0656b39eac
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 21d9f8333b8c76979bbe90d60a8ad6ebb5e36c76)

4 years agotest/mon: add tests for mon_host build by hostname
Patrick Donnelly [Fri, 23 Oct 2020 23:33:23 +0000 (16:33 -0700)]
test/mon: add tests for mon_host build by hostname

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 4022c1f1fb4c37e63bf884e36a2b533735c56f94)

Conflicts:
    src/test/mon/MonMap.cc
- do not attempt to introduce boost::intrusive_ptr into Nautilus
- monmap.build_initial takes bare cct in nautilus (master: cct.get())

4 years agotest/mon: fix compiler errors in MonMap unittest
Patrick Donnelly [Fri, 23 Oct 2020 23:28:08 +0000 (16:28 -0700)]
test/mon: fix compiler errors in MonMap unittest

The code atrophied. Clean this up.

The tests are disabled because they SIGSEGV during SetUp.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 06f44cbf12c20ce8f1862111340f3b3f132577d0)

Conflicts:
    src/test/mon/MonMap.cc
- do not attempt to introduce boost::intrusive_ptr into nautilus
- monmap.build_initial takes bare cct in nautilus (master: cct.get())

4 years agoblk/kernel: retry forever if bdev_flock_retry is 0 37842/head
Kefu Chai [Wed, 16 Sep 2020 01:28:04 +0000 (09:28 +0800)]
blk/kernel: retry forever if bdev_flock_retry is 0

retry forever if cct->_conf->bdev_flock_retry is 0.
systemd-udevd is most likely the reason why ceph-osd fails to
acquire the flock when "mkfs", because systemd-udevd probes
all block devices when the device changes in the system using
libblkid, and when systemd-udevd starts looking at the device
it takes a `LOCK_SH|LOCK_NB` lock. and it releases the lock
right after done with it. so normally, it only takes a jiffy,
see
https://github.com/systemd/systemd/blob/ee0b9e721a368742ac6fa9c3d9a33e45dc3203a2/src/shared/lockfile-util.c#L18
so, we just need to retry couple times before acquiring the
lock.

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

Conflicts:
src/blk/kernel/KernelDevice.cc
- file does not exist in nautilus; made changes manually in
  src/os/bluestore/KernelDevice.cc

4 years agoblk/kernel: use open file description lock if available
Kefu Chai [Tue, 15 Sep 2020 07:38:36 +0000 (15:38 +0800)]
blk/kernel: use open file description lock if available

* use OFD lock if available. OFD is Linux specific, and only available
  on 3.15 kernels. OFD is able to synchronize both threads and
  processes. and has simpler semantics. this is just a cleanup.
  as we don't create threads for acquiring the flock.
* use BSD flock(2) as a fallback
* return the errno right away, without printing logging messages.
  for two reasons:
  - writing logging messages would reset the errno.
  - the caller of _lock() also prints the logging messages along
    with strerror(errno)

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

Conflicts:
src/blk/kernel/KernelDevice.cc
- file does not exist in nautilus; made changes manually in
  src/os/bluestore/KernelDevice.cc

4 years agoblk/kernel: use uint64_t for bdev_flock_retry
Kefu Chai [Mon, 21 Sep 2020 12:01:25 +0000 (20:01 +0800)]
blk/kernel: use uint64_t for bdev_flock_retry

also drop bdev_flock_retry and bdev_flock_retry_interval from
legacy_config_opts.h, as `KernelDevice::_lock()` is not in the critical
path, there is no need to access these settings via member variables --
get_val<> would just suffice.

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

Conflicts:
src/blk/kernel/KernelDevice.cc
- file does not exist in nautilus; changes applied without conflicts to
  src/os/bluestore/KernelDevice.cc

4 years agoblk/kernel: use sleep_for()
Kefu Chai [Tue, 15 Sep 2020 07:01:55 +0000 (15:01 +0800)]
blk/kernel: use sleep_for()

instead of relying on utime_t, use standard library directly.

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

Conflicts:
src/blk/kernel/KernelDevice.cc
- file does not exist in nautilus; changes applied without conflicts to
  os/bluestore/KernelDevice.cc

4 years agomgr: fix race between module load and notify 37844/head
Mykola Golub [Mon, 13 Jan 2020 08:36:39 +0000 (08:36 +0000)]
mgr: fix race between module load and notify

When starting a module, there was a time window between we
registered the module in the module list and loaded it in the
finisher thread, when a notify could be delivered to not fully
initialized module.

We can avoid this by delaying registering the module in the
module list until it is successfully initialized.

Fixes: https://tracker.ceph.com/issues/41736
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 56e34f58cb7a84439c53779467b2d5b495beb3ef)

4 years agomgr: handle race with finisher after shutdown
Patrick Donnelly [Wed, 13 Nov 2019 19:00:44 +0000 (11:00 -0800)]
mgr: handle race with finisher after shutdown

The module is deleted when modules is cleared. The notify method is
called on a destructed class.

Fixes: https://tracker.ceph.com/issues/42744
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 40c4b9ac9d8e2b2c17269affada304f5e1554974)

Conflicts:
src/mgr/ActivePyModules.cc
- nautilus has capitalized lock.Lock and lock.Unlock
- finisher.queue calls look different in nautilus

4 years agoos/bluestore: attach csum for compressed blobs 37843/head
Igor Fedotov [Tue, 15 Sep 2020 20:06:20 +0000 (23:06 +0300)]
os/bluestore: attach csum for compressed blobs

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

4 years agobluestore: Support flock retry
wanghongxu [Wed, 15 Apr 2020 11:52:40 +0000 (19:52 +0800)]
bluestore: Support flock retry

When the block changes, systemd-udevd will open the block,
read some information and close it. Then a failure occurs here.
So we need to try again here.

Fixes: https://tracker.ceph.com/issues/46124
Signed-off-by: wanghongxu <x.ken@outlook.com>
(cherry picked from commit 23f8c323d2ba9133c3ef5834ae93115425c862d1)

Conflicts:
src/blk/kernel/KernelDevice.cc
- file does not exist in Nautilus; made the changes manually in
  src/os/bluestore/KernelDevice.cc

4 years agotools/rados: flush formatter periodically during json output of `rados ls` 37834/head
J. Eric Ivancich [Wed, 21 Oct 2020 14:32:30 +0000 (10:32 -0400)]
tools/rados: flush formatter periodically during json output of `rados ls`

While `rados ls` is emitting object info through a json formatter,
flush the formatter after there are at least 4096 bytes are buffered
for output.

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

4 years agotest/objectstore/store_test: kill ExcessiveFragmentation test case. 37824/head
Igor Fedotov [Fri, 29 May 2020 19:28:15 +0000 (22:28 +0300)]
test/objectstore/store_test: kill ExcessiveFragmentation test case.
This test case was introduced by https://github.com/ceph/ceph/pull/18494
to verify allocation failure handling while gifting during bluefs rebalance
Not it looks outdated as there is no periodic gifting any more.

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

4 years agoblk:BlockDevice.cc: use pending_aios instead of iovec size as ios num 37823/head
weixinwei [Fri, 29 May 2020 14:43:31 +0000 (22:43 +0800)]
blk:BlockDevice.cc: use pending_aios instead of iovec size as ios num

Signed-off-by: weixinwei <xinweiwei90@gmail.com>
(cherry picked from commit 64ce414b022b96b7a5c73d2c03393a877b30e508)

Conflicts:
src/blk/BlockDevice.cc
- file does not exist in Nautilus; made the changes manually in
  src/os/bluestore/BlockDevice.cc

4 years agotest/store_test: use 'threadsafe' style for death tests. 37818/head
Igor Fedotov [Wed, 21 Oct 2020 13:24:30 +0000 (16:24 +0300)]
test/store_test: use 'threadsafe' style for death tests.

Hopefully Fixes: https://tracker.ceph.com/issues/47328
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 99ac34cbfeb98c36ffcc3e1b5b65174930273c4c)