Jason Dillaman [Mon, 27 Jan 2020 21:45:54 +0000 (16:45 -0500)]
librbd: helper state machines for updating/removing mirror images
When the mirror image state is updated or removed, we need to send
notifications to peer listeners like rbd-mirror. These two new
state machines allow re-use of that logic to avoid the duplication.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 27 Jan 2020 18:16:56 +0000 (13:16 -0500)]
rbd-mirror: remove unnecessary get mirror info call from bootstrap
Both the prepare local and remote state machines will now retrieve their
respective mirror info data so it does not need to be repeated at the
higher-level bootstrap state machine.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 27 Jan 2020 17:43:51 +0000 (12:43 -0500)]
rbd-mirror: store remote promotion state within state builder
This simplifies the factory method for the prepare state since it
no longer needs to be an parameter. It will also permit the removal
of the extra get mirror info call in bootstrap.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 28 Jan 2020 20:24:09 +0000 (15:24 -0500)]
rbd-mirror: cache local and remote pool meta properties for all pools
When replicating cloned images across pools, the replayer will
need access to the meta from the parent image pool. By caching
the data, it avoids the need to have the image replayer query
the parent pools.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 27 Jan 2020 15:41:40 +0000 (10:41 -0500)]
rbd-mirror: utilize get mirror info within prepare local image request
This avoids lots of duplicated logic between the two state machines and
provides a path to support both journal and snapshot-based mirroring
with the same class.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Wed, 29 Jan 2020 23:46:07 +0000 (18:46 -0500)]
qa: move existing rbd-mirror functional test to journal-specific test
A new functional test for snapshot-based mirroring will be created and
the other stress-tests should eventually be applied to both snapshot-
and journal-based mirroring.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Patrick Donnelly [Thu, 30 Jan 2020 15:06:21 +0000 (07:06 -0800)]
Merge PR #32397 into master
* refs/pull/32397/head:
mds: Move StrayManager initializations to its header
mds: Remove extra spaces in StrayManager header.
mds: Reorganize structure members in StrayManager header
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Lenz Grimmer [Thu, 30 Jan 2020 13:43:46 +0000 (13:43 +0000)]
mgr/dashboard: Change project name to "Ceph Dashboard" (#32959)
mgr/dashboard: Change project name to "Ceph Dashboard"
Reviewed-by: Laura Paduano <lpaduano@suse.com> Reviewed-by: Patrick Seidensal <pnawracay@suse.com> Reviewed-by: Stephan Müller <smueller@suse.com> Reviewed-by: Tatjana Dehler <tdehler@suse.com> Reviewed-by: Volker Theile <vtheile@suse.com>
Sage Weil [Thu, 30 Jan 2020 13:01:47 +0000 (07:01 -0600)]
Merge PR #32972 into master
* refs/pull/32972/head:
python-common/ceph/deployment/translate: use 'prepare' instead of 'batch' for trivial case
qa/tasks/cephadm: pass short dev name to osd prepare
mgr/cephadm: fix detection of just-created OSDs
mgr/cephadm: properly indent raise conditions
mgr/cephadm: add warning to other orchestrators
mgr/cephadm: separate acceptance criterias for Devices
mgr/cephadm: fix typos
mgr/cephadm: move utils in test/utils.py
mgr/ssh: increase disk size to 20G
drivegroups: add support for drivegroups + tests
mgr/orch_cli: allow multiple drivegroups
drivegroups: translate disk spec to ceph-volume call
Reviewed-by: Jan Fajerski <jfajerski@suse.com> Reviewed-by: Joshua Schmid <jschmid@suse.de>
Gregory Farnum [Thu, 30 Jan 2020 10:27:06 +0000 (11:27 +0100)]
doc: remove the CephFS-Hadoop instructions
These have not aged gracefully, and in particular include instructions
for setting pool size 1 to let Hadoop control the replication — but I've
heard reports of users setting up multiple size-1 pools and then wondering
where their data went when an OSD dies.
Aleksei Zakharov [Fri, 20 Dec 2019 15:05:05 +0000 (18:05 +0300)]
mgr/prometheus: pg count by pool
If we have all other stats by pool, it's better to have total
count by pool too. We always can sum() all of total, but it's
hard to count by-pool total.
Signed-off-by: Aleksei Zakharov <zakharov.a.g@yandex.ru>
Kefu Chai [Wed, 29 Jan 2020 12:46:45 +0000 (20:46 +0800)]
mgr/cephadm: init attrs created by settattr()
to address the test falure caused by mypy:
```
mypy run-test: commands[0] | mypy --config-file=../../mypy.ini ansible/module.py cephadm/module.py mgr_module.py mgr_util.py orchestrator.py orchestrator_cli/module.py rook/module.py
test_orchestrator/module.py
cephadm/module.py: note: In member "_check_for_strays" of class "CephadmOrchestrator":
cephadm/module.py:596: error: "CephadmOrchestrator" has no attribute "warn_on_stray_hosts"
cephadm/module.py:596: error: "CephadmOrchestrator" has no attribute "warn_on_stray_services"
cephadm/module.py:599: error: "CephadmOrchestrator" has no attribute "warn_on_stray_services"
Found 3 errors in 1 file (checked 8 source files)
```
see also https://github.com/python/mypy/issues/5719
Sébastien Han [Fri, 24 Jan 2020 15:29:54 +0000 (16:29 +0100)]
ceph-volume: add db and wal support to raw mode
Using the raw mode, the OSD preparation can now be called with extra
arguments to specify a block device for either rocksdb db or wal.
The code expects the device to be available and no validation will be
performed. Also, the entire block device will be consumed.
The goal is run this on Kubernetes with Rook and OSD are running on PVC.
Users will request PVC from a certain size, the request will be
acknowledged and a block will be created, then attached to the machine.
Later on consumed by Rook's preparation job.
Lenz Grimmer [Wed, 29 Jan 2020 10:04:28 +0000 (11:04 +0100)]
mgr/dashboard: Change project name to "Ceph Dashboard"
The Dashboard's "About" page still referred to the
application as "Ceph Manager Dashboard".
Changed the `projectName` constant to
"Ceph Dashboard" to resolve this.
Sage Weil [Tue, 28 Jan 2020 19:33:49 +0000 (13:33 -0600)]
osd: dispatch_context and queue split finish on early bail-out
If we bail out of advance_pg early because there is an upcoming merge, we
still need to dispatch_context() on rctx before we drop the PG lock. And
the rctx that we submit needs to include the on_applied finisher comit
to call _finish_splits.
This is noticeable (at least) when there is a split and merge that are
both known. When we process the split, the new child is added to new_pgs.
When we get to the merge epoch, we stop early and take the bail-out
path.
Fix by adding a dispatch_context call for this path. And further make sure
that both dispatch_context callers in this function queue up the
new_pgs event.
Fixes: https://tracker.ceph.com/issues/43825 Signed-off-by: Sage Weil <sage@redhat.com>