]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agocrimson/mgr: close() in background 33797/head
Kefu Chai [Mon, 9 Mar 2020 03:48:07 +0000 (11:48 +0800)]
crimson/mgr: close() in background

as per Yingxin,

application code is not required to wait for the `close()` future, it
would be safe to ignore it, because:
- `close()` will shutdown its socket synchronously;
- `close()` will create an internal `ConnectionRef` when it's closing;
- `Messenger` will wait for all connections closed during `shutdown()`;

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agocommon/buffer.cc: silence ASan warning
Kefu Chai [Sat, 7 Mar 2020 11:36:52 +0000 (19:36 +0800)]
common/buffer.cc: silence ASan warning

silences following warning
```
../src/common/buffer.cc:472:9: runtime error: member access within null pointer of type 'struct raw'
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agocrimson/osd: reorder includes
Kefu Chai [Sat, 7 Mar 2020 10:55:22 +0000 (18:55 +0800)]
crimson/osd: reorder includes

to follow
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agocrimson/mgr: use periodical timer for report
Kefu Chai [Sat, 7 Mar 2020 10:53:07 +0000 (18:53 +0800)]
crimson/mgr: use periodical timer for report

* always rearm the timer when handling MMgrConfigure
* remove `mgr::Client::tick_period`

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge PR #33804 into master
Sage Weil [Mon, 9 Mar 2020 00:57:06 +0000 (19:57 -0500)]
Merge PR #33804 into master

* refs/pull/33804/head:
cephadm: ls: warn if daemon type (version) is not supported
cephadm: report grafana version
cephadm: report prometheus, node-exporter, alertmanager versions
cephadm: use None (not '<no value>') for monitoring daemon version

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge PR #33792 into master
Sage Weil [Sun, 8 Mar 2020 22:29:00 +0000 (17:29 -0500)]
Merge PR #33792 into master

* refs/pull/33792/head:
doc/cephadm: fix formatting for osd section
doc/cephadm: update 'adding mons' section to suggest/prefer 'apply'
doc/cephadm: fix formatting, typos
mgr/cephadm: implement apply_mon
mgr/cephadm: allow mon creation without explicit ip or addr
mgr/cephadm: allow _apply_service to delete mon daemon's data
mgr/cephadm: remove mon from monmap before removing mon
mgr/cephadm: do not remove mon if it breaks quorum

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agocephadm: ls: warn if daemon type (version) is not supported 33804/head
Sage Weil [Sun, 8 Mar 2020 22:24:27 +0000 (17:24 -0500)]
cephadm: ls: warn if daemon type (version) is not supported

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agocephadm: report grafana version
Sage Weil [Sat, 7 Mar 2020 22:49:44 +0000 (16:49 -0600)]
cephadm: report grafana version

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33802 into master
Sage Weil [Sun, 8 Mar 2020 21:49:38 +0000 (16:49 -0500)]
Merge PR #33802 into master

* refs/pull/33802/head:
mgr/cephadm: sanity check upgrade version
mgr/cephadm: only need to invalidate once here
mgr/cephadm: upgrade requires root mode for now

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge PR #33800 into master
Sage Weil [Sun, 8 Mar 2020 21:38:28 +0000 (16:38 -0500)]
Merge PR #33800 into master

* refs/pull/33800/head:
mgr/cephadm: fix prom config generation when hosts have no labels or addrs

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge PR #33795 into master
Sage Weil [Sun, 8 Mar 2020 21:38:15 +0000 (16:38 -0500)]
Merge PR #33795 into master

* refs/pull/33795/head:
mgr/orch: collapse 'SPEC' and 'PLACEMENT' columns in 'orch ls'

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge pull request #33788 from ajarr/wip-44438
Ramana Raja [Sun, 8 Mar 2020 17:36:50 +0000 (23:06 +0530)]
Merge pull request #33788 from ajarr/wip-44438

test_volumes: fix _verify_clone_attrs call

Reviewed-by: Venky Shankar <vshankar@redhat.com>
5 years agoMerge pull request #33686 from yuvalif/fix_data_corruption_in_cls_queue_head
Yuval Lifshitz [Sun, 8 Mar 2020 11:17:02 +0000 (13:17 +0200)]
Merge pull request #33686 from yuvalif/fix_data_corruption_in_cls_queue_head

cls/queue: fix data corruption in urgent data

5 years agomgr/cephadm: fix prom config generation when hosts have no labels or addrs 33800/head
Sage Weil [Sat, 7 Mar 2020 14:09:30 +0000 (08:09 -0600)]
mgr/cephadm: fix prom config generation when hosts have no labels or addrs

The inventory for a host might be {}, which evaluates as false.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33742 into master
Sage Weil [Sun, 8 Mar 2020 02:18:23 +0000 (20:18 -0600)]
Merge PR #33742 into master

* refs/pull/33742/head:
msg/async: s/nowait/always_async/ in EventCenter::submit_to().
msg/async: perform recv reset immediately if called inside EC.

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agocephadm: report prometheus, node-exporter, alertmanager versions
Sage Weil [Sat, 7 Mar 2020 22:43:14 +0000 (16:43 -0600)]
cephadm: report prometheus, node-exporter, alertmanager versions

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agocephadm: use None (not '<no value>') for monitoring daemon version
Sage Weil [Sat, 7 Mar 2020 22:34:08 +0000 (16:34 -0600)]
cephadm: use None (not '<no value>') for monitoring daemon version

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33706 into master
Sage Weil [Sat, 7 Mar 2020 19:45:16 +0000 (13:45 -0600)]
Merge PR #33706 into master

* refs/pull/33706/head:
qa/suites/rados/cephadm/upgrade: adjust starting version
mgr/orch: from_strings -> from_string; do not accept a list
mgr/volumes: pass placement as string, not list
qa/tasks/mgr/test_orchestrator_cli: adjust placement args
qa/tasks/cephadm: pass apply placement as a single arg
mgr/orch: PlacementSpec: allow 'count:123'
mgr/orch: PlacementSpec: may pretty_str() match input
mgr/orch: take single placement argument
mgr/orch: PlacementSpec.from_strings: take a string *or* a list

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #33625 from sebastian-philipp/python-common-drive-groups-and
Kefu Chai [Sat, 7 Mar 2020 17:47:42 +0000 (01:47 +0800)]
Merge pull request #33625 from sebastian-philipp/python-common-drive-groups-and

python-common: Make Drive Group filter by AND, instead of OR

Reviewed-by: Joshua Schmid <jschmid@suse.de>
5 years agodoc/cephadm: fix formatting for osd section 33792/head
Sage Weil [Sat, 7 Mar 2020 17:22:47 +0000 (11:22 -0600)]
doc/cephadm: fix formatting for osd section

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agodoc/cephadm: update 'adding mons' section to suggest/prefer 'apply'
Sage Weil [Sat, 7 Mar 2020 15:14:43 +0000 (09:14 -0600)]
doc/cephadm: update 'adding mons' section to suggest/prefer 'apply'

It's nicer for users to specify the cluster/mon subnet once and let
cephadm scale mons.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agodoc/cephadm: fix formatting, typos
Sage Weil [Sat, 7 Mar 2020 15:13:23 +0000 (09:13 -0600)]
doc/cephadm: fix formatting, typos

No need for [monitor 1] when accessing the CLI--this can happy from
any node or container that has a working CLI.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: implement apply_mon
Sage Weil [Fri, 6 Mar 2020 20:57:35 +0000 (14:57 -0600)]
mgr/cephadm: implement apply_mon

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: allow mon creation without explicit ip or addr
Sage Weil [Fri, 6 Mar 2020 20:53:22 +0000 (14:53 -0600)]
mgr/cephadm: allow mon creation without explicit ip or addr

Allow mons to be created if the public_network option is defined in the
config database.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: allow _apply_service to delete mon daemon's data
Sage Weil [Fri, 6 Mar 2020 20:02:06 +0000 (14:02 -0600)]
mgr/cephadm: allow _apply_service to delete mon daemon's data

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: remove mon from monmap before removing mon
Sage Weil [Fri, 6 Mar 2020 20:00:42 +0000 (14:00 -0600)]
mgr/cephadm: remove mon from monmap before removing mon

Check for force flag early so we don't update the monmap if the daemon
remove is going to fail anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: do not remove mon if it breaks quorum
Sage Weil [Fri, 6 Mar 2020 19:57:18 +0000 (13:57 -0600)]
mgr/cephadm: do not remove mon if it breaks quorum

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: sanity check upgrade version 33802/head
Sage Weil [Sat, 7 Mar 2020 16:06:40 +0000 (10:06 -0600)]
mgr/cephadm: sanity check upgrade version

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: only need to invalidate once here
Sage Weil [Sat, 7 Mar 2020 15:55:13 +0000 (09:55 -0600)]
mgr/cephadm: only need to invalidate once here

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: upgrade requires root mode for now
Sage Weil [Sat, 7 Mar 2020 15:55:01 +0000 (09:55 -0600)]
mgr/cephadm: upgrade requires root mode for now

See https://tracker.ceph.com/issues/44429

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33794 into master
Sage Weil [Sat, 7 Mar 2020 15:21:32 +0000 (09:21 -0600)]
Merge PR #33794 into master

* refs/pull/33794/head:
pybind/mgr/mgr_util: fix pretty time delta

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge PR #33752 into master
Sage Weil [Sat, 7 Mar 2020 14:25:22 +0000 (08:25 -0600)]
Merge PR #33752 into master

* refs/pull/33752/head:
mgr: update metadata if an osd just joins
mgr: update "hostname" when we already have the daemon state from the same entity

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge PR #33747 into master
Sage Weil [Sat, 7 Mar 2020 13:07:41 +0000 (07:07 -0600)]
Merge PR #33747 into master

* refs/pull/33747/head:
doc/mgr/telemetry: add 'send' command
mgr/telemetry: force --license when sending while opted-out

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoqa/suites/rados/cephadm/upgrade: adjust starting version 33706/head
Sage Weil [Thu, 5 Mar 2020 13:38:25 +0000 (07:38 -0600)]
qa/suites/rados/cephadm/upgrade: adjust starting version

This version understands how to apply a mgr spec like '2;host=x' with a
semicolon.  This particular test build does.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: from_strings -> from_string; do not accept a list
Sage Weil [Thu, 5 Mar 2020 15:18:50 +0000 (09:18 -0600)]
mgr/orch: from_strings -> from_string; do not accept a list

Normalize all callers to pass a single string.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/volumes: pass placement as string, not list
Sage Weil [Thu, 5 Mar 2020 15:15:44 +0000 (09:15 -0600)]
mgr/volumes: pass placement as string, not list

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #33780 from xxhdx1985126/wip-crimson-osd-pg-creation-issue
Kefu Chai [Sat, 7 Mar 2020 07:53:47 +0000 (15:53 +0800)]
Merge pull request #33780 from xxhdx1985126/wip-crimson-osd-pg-creation-issue

crimson: solve the problem that crimson-osd's created pgs stuck in "unknown" state

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agocrimson: fix the problem that crimson-osd can't establish stable connection with mgr 33780/head
Xuehan Xu [Fri, 6 Mar 2020 11:28:46 +0000 (19:28 +0800)]
crimson: fix the problem that crimson-osd can't establish stable connection with mgr

Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
5 years agocrimson: decouple mgr client reconnect and connect reset handling
Xuehan Xu [Fri, 6 Mar 2020 10:55:07 +0000 (18:55 +0800)]
crimson: decouple mgr client reconnect and connect reset handling

As of now, the following invocation sequence triggers deadlock when
closing crimson-osd's connection with mgr:
  ProtocolV2::dispatch_reset() --> crimson::mgr::Client::ms_handle_reset
--> crimson::mgr::Client::reconnect --> crimson::net::SocketConnection::close
--> crimson::net::Protocol::close()

In the above invocation sequence, ProtocalV2::dispatch_reset() enters the gate
"pending_dispatch" the leaving of which would wait for the complete of crimson::\
net::Protocal::close() which further wait for the complete of the gate's close().

This commit decouples this waiting chain.

Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
5 years agoqa/tasks/mgr/test_orchestrator_cli: adjust placement args
Sage Weil [Thu, 5 Mar 2020 01:18:06 +0000 (19:18 -0600)]
qa/tasks/mgr/test_orchestrator_cli: adjust placement args

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/tasks/cephadm: pass apply placement as a single arg
Sage Weil [Wed, 4 Mar 2020 20:38:43 +0000 (14:38 -0600)]
qa/tasks/cephadm: pass apply placement as a single arg

Use ';' as a separator, although ' ' would also work.  ',' would not
when msgr v2 addrs are in use.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: PlacementSpec: allow 'count:123'
Sage Weil [Wed, 4 Mar 2020 17:05:20 +0000 (11:05 -0600)]
mgr/orch: PlacementSpec: allow 'count:123'

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: PlacementSpec: may pretty_str() match input
Sage Weil [Wed, 4 Mar 2020 17:03:06 +0000 (11:03 -0600)]
mgr/orch: PlacementSpec: may pretty_str() match input

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: take single placement argument
Sage Weil [Tue, 3 Mar 2020 21:39:50 +0000 (15:39 -0600)]
mgr/orch: take single placement argument

This is maybe a wash on the 'ceph orch ...' portion of the CLI.  However,
it means that elsewhere, like 'ceph fs volume ...', we can be consistent
and have placement be (1) optional and (2) a single arg so that it is
easier to use both positionally and as a flag (--placement=all:true).

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: PlacementSpec.from_strings: take a string *or* a list
Sage Weil [Tue, 3 Mar 2020 21:28:47 +0000 (15:28 -0600)]
mgr/orch: PlacementSpec.from_strings: take a string *or* a list

The string can be ' ', ';', or ',' separated.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: collapse 'SPEC' and 'PLACEMENT' columns in 'orch ls' 33795/head
Sage Weil [Fri, 6 Mar 2020 23:20:51 +0000 (17:20 -0600)]
mgr/orch: collapse 'SPEC' and 'PLACEMENT' columns in 'orch ls'

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33700 into master
Sage Weil [Sat, 7 Mar 2020 03:19:49 +0000 (21:19 -0600)]
Merge PR #33700 into master

* refs/pull/33700/head:
mgr/cephadm: point dashboard at grafana automatically
doc/cephadm/monitoring: document process to set up monitoring with cephadm

Reviewed-by: Alexandra Settle <asettle@suse.com>
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
5 years agoMerge PR #33785 into master
Sage Weil [Sat, 7 Mar 2020 03:19:34 +0000 (21:19 -0600)]
Merge PR #33785 into master

* refs/pull/33785/head:
qa/suites/rados/cephadm: deploy all monitoring components
qa/tasks/cephadm: deploy other monitoring components

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge PR #33602 into master
Sage Weil [Sat, 7 Mar 2020 03:18:26 +0000 (21:18 -0600)]
Merge PR #33602 into master

* refs/pull/33602/head:
mgr/cephadm/osd: call synchronous _remove_daemon()
mgr/cephadm/osd: Add pytest for osd removal
mgr/cephadm/osd: delete transitional attributes
mgr/cephadm: Move remove osd code to osd.py

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Joshua Schmid <jschmid@suse.de>
5 years agopybind/mgr/mgr_util: fix pretty time delta 33794/head
Sage Weil [Fri, 6 Mar 2020 22:24:32 +0000 (16:24 -0600)]
pybind/mgr/mgr_util: fix pretty time delta

We were off by a factor of 10 with teh 'hours' values.  Oops!

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/suites/rados/cephadm: deploy all monitoring components 33785/head
Sage Weil [Fri, 6 Mar 2020 13:34:44 +0000 (13:34 +0000)]
qa/suites/rados/cephadm: deploy all monitoring components

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm/osd: call synchronous _remove_daemon() 33602/head
Sage Weil [Fri, 6 Mar 2020 18:31:22 +0000 (12:31 -0600)]
mgr/cephadm/osd: call synchronous _remove_daemon()

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm/osd: Add pytest for osd removal
Sebastian Wagner [Fri, 28 Feb 2020 09:35:43 +0000 (10:35 +0100)]
mgr/cephadm/osd: Add pytest for osd removal

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/cephadm/osd: delete transitional attributes
Sebastian Wagner [Fri, 28 Feb 2020 09:13:10 +0000 (10:13 +0100)]
mgr/cephadm/osd: delete transitional attributes

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/cephadm: Move remove osd code to osd.py
Sebastian Wagner [Fri, 28 Feb 2020 09:11:04 +0000 (10:11 +0100)]
mgr/cephadm: Move remove osd code to osd.py

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/cephadm: point dashboard at grafana automatically 33700/head
Sage Weil [Tue, 3 Mar 2020 16:15:28 +0000 (10:15 -0600)]
mgr/cephadm: point dashboard at grafana automatically

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agodoc/cephadm/monitoring: document process to set up monitoring with cephadm
Sage Weil [Tue, 3 Mar 2020 16:32:41 +0000 (10:32 -0600)]
doc/cephadm/monitoring: document process to set up monitoring with cephadm

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33772 into master
Sage Weil [Fri, 6 Mar 2020 17:30:01 +0000 (11:30 -0600)]
Merge PR #33772 into master

* refs/pull/33772/head:
mgr/cephadm: upgrade all ceph daemon types
mgr/cephadm: do not specify --image arg for non-ceph daemons; fix upgrade
mgr/cephadm: fix error-path return values for _run_cephadm
mgr/orch: fix RGWSpec loading
mgr/cephadm: fix 'orch rm'

Reviewed-by: Joshua Schmid <jschmid@suse.de>
5 years agoMerge PR #33779 into master
Sage Weil [Fri, 6 Mar 2020 17:26:58 +0000 (11:26 -0600)]
Merge PR #33779 into master

* refs/pull/33779/head:
mgr/orch: fix ServiceSpec deserialization error

Reviewed-by: Joshua Schmid <jschmid@suse.de>
Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33614 into master
Sage Weil [Fri, 6 Mar 2020 17:26:47 +0000 (11:26 -0600)]
Merge PR #33614 into master

* refs/pull/33614/head:
mgr/cephadm: enable custom TLS certificates for grafana
mgr: enable verification of TLS certs without files
mgr/cephadm: dump config to JSON only once when creating daemons

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agotest_volumes: fix _verify_clone_attrs call 33788/head
Ramana Raja [Fri, 6 Mar 2020 11:33:51 +0000 (17:03 +0530)]
test_volumes: fix _verify_clone_attrs call

... to verify the attributes of clone and source subvolume belonging
to different subvolume groups.

Introduced in e22d546beb0472bf7e9bb038aa5e781d90a52349

Fixes: https://tracker.ceph.com/issues/44438
Signed-off-by: Ramana Raja <rraja@redhat.com>
5 years agoMerge pull request #33696 from cbodley/wip-common-spliterator
Casey Bodley [Fri, 6 Mar 2020 15:31:59 +0000 (10:31 -0500)]
Merge pull request #33696 from cbodley/wip-common-spliterator

common: add iterator-based string splitter

Reviewed-by: Adam Emersen <aemerson@redhat.com>
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
5 years agoMerge pull request #33754 from cbodley/wip-rgw-formatter-plain-segfault
Casey Bodley [Fri, 6 Mar 2020 15:28:43 +0000 (10:28 -0500)]
Merge pull request #33754 from cbodley/wip-rgw-formatter-plain-segfault

rgw: fix string_view formatting in RGWFormatter_Plain

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
5 years agoMerge PR #33784 into master
Sage Weil [Fri, 6 Mar 2020 15:21:53 +0000 (09:21 -0600)]
Merge PR #33784 into master

* refs/pull/33784/head:
mgr/cephadm: update type annotation

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: update type annotation 33784/head
Kefu Chai [Fri, 6 Mar 2020 14:01:59 +0000 (22:01 +0800)]
mgr/cephadm: update type annotation

the method signature was changed in
ea987a0e56db106f7c76d11f86b3e602257f365e

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/tasks/cephadm: deploy other monitoring components
Sage Weil [Fri, 6 Mar 2020 13:32:57 +0000 (13:32 +0000)]
qa/tasks/cephadm: deploy other monitoring components

Grafana and alertmanager.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33757 into master
Sage Weil [Fri, 6 Mar 2020 13:17:45 +0000 (07:17 -0600)]
Merge PR #33757 into master

* refs/pull/33757/head:
qa/valgrind.supp: abstract from ceph::buffer's symbol versioning.

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33755 into master
Sage Weil [Fri, 6 Mar 2020 12:39:50 +0000 (06:39 -0600)]
Merge PR #33755 into master

* refs/pull/33755/head:
mgr/cephadm: make osd create on an existing LV idempotent

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/orch: fix ServiceSpec deserialization error 33779/head
Kiefer Chang [Fri, 6 Mar 2020 11:41:48 +0000 (19:41 +0800)]
mgr/orch: fix ServiceSpec deserialization error

cephadm fails to load Service spec data when deserializing
HostPlacementSpec resource. Fix the issue by loading it properly.

Renaming the call from_dict to from_json for consistency.

This change also makes `spec` filed visible in JSON output of
ServiceSpec list.

Fixes: https://tracker.ceph.com/issues/44491
Fixes: https://tracker.ceph.com/issues/44392
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
5 years agoMerge pull request #33081 from bk201/wip-43166
Lenz Grimmer [Fri, 6 Mar 2020 11:30:50 +0000 (12:30 +0100)]
Merge pull request #33081 from bk201/wip-43166

mgr/dashboard: improve device selection modal for creating OSDs

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
5 years agoMerge pull request #33775 from tchaikov/wip-44454
Ramana Raja [Fri, 6 Mar 2020 07:01:12 +0000 (12:31 +0530)]
Merge pull request #33775 from tchaikov/wip-44454

qa/tasks/ceph.py: quote "<kind>" in command line

Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoMerge PR #33674 into master
Patrick Donnelly [Fri, 6 Mar 2020 04:52:46 +0000 (20:52 -0800)]
Merge PR #33674 into master

* refs/pull/33674/head:
mgr/volumes: OpSmException.error -> OpSmException.errno
mgr/volumes: remove unneeded assignment to `NoneType`
mgr/volumes: add missing OpSmException import
mgr/volumes: add missing error code
mgr/volumes: remove stray return
mgr/volumes: fixup format string args
mgr/volumes: add missing `mgr` param
mgr/volumes: assert self.fs
mgr/volumes: skip type checking on RTimer class
mgr/volumes: fixup threading.Timer import
mgr/volumes: fix positional str formatting
mgr/volumes: place getters and setters next to each other
mgr/volumes: reverse params passed to `isinstace()`
mgr/volumes: fix arg typo '.' -> ','
mgr/volumes: add `deque` type
mgr/volumes: `threading.Event.isSet` no longer exists in py3
mgr/volumes: assert JobThread class
mgr/volumes: import VolumeException
mgr/volumes: use `SafeConfigParser` with py2
mgr/volumes: use python version during configparser import
mgr/volumes: add `Dict` type
mgr/volumes: import errno
mgr/volumes: add `mgr/volumes` to the mypy checks

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoqa/tasks/ceph.py: quote "<kind>" in command line 33775/head
Kefu Chai [Fri, 6 Mar 2020 04:17:40 +0000 (12:17 +0800)]
qa/tasks/ceph.py: quote "<kind>" in command line

otherwise bash will intepret "kind" as a file when handling command like
```
sudo zgrep <kind> /var/log/ceph/valgrind/* /dev/null | sort | uniq
```
and try to feed its content to zgrep, and write the output of zgrep
to /var/log/ceph/valgrind/*. this is not the intended behavior. what we
what to do is to pass "<kind>" as an argument to zgrep, along with
the globbed files names which matches "/var/log/ceph/valgrind/*".

in this change, "<kind>" is quoted as in the command line. it's also
what `pipes.quote()` does before the change of
35cf5131e7152ce20d916aa99c124751d6a97f5c.

this addresses the regression introduced by
35cf5131e7152ce20d916aa99c124751d6a97f5c.

Fixes: https://tracker.ceph.com/issues/44454
Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agomgr/cephadm: upgrade all ceph daemon types 33772/head
Sage Weil [Fri, 6 Mar 2020 03:27:26 +0000 (21:27 -0600)]
mgr/cephadm: upgrade all ceph daemon types

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: do not specify --image arg for non-ceph daemons; fix upgrade
Sage Weil [Fri, 6 Mar 2020 03:24:53 +0000 (21:24 -0600)]
mgr/cephadm: do not specify --image arg for non-ceph daemons; fix upgrade

If we are calling the cephadm script for a non-ceph daemon (prometheus,
etc), do not specify the --image argument, and do not pull it out of
the config db from sections that don't exist.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: fix error-path return values for _run_cephadm
Sage Weil [Fri, 6 Mar 2020 03:22:37 +0000 (21:22 -0600)]
mgr/cephadm: fix error-path return values for _run_cephadm

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orch: fix RGWSpec loading
Sage Weil [Fri, 6 Mar 2020 01:57:56 +0000 (19:57 -0600)]
mgr/orch: fix RGWSpec loading

Fixes ServiceSpec.from_json

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: fix 'orch rm'
Sage Weil [Fri, 6 Mar 2020 01:44:14 +0000 (19:44 -0600)]
mgr/cephadm: fix 'orch rm'

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33766 into master
Sage Weil [Fri, 6 Mar 2020 00:58:00 +0000 (18:58 -0600)]
Merge PR #33766 into master

* refs/pull/33766/head:
mgr/cephadm: fix placement when existing + specified don't overlap

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/cephadm: make osd create on an existing LV idempotent 33755/head
Sage Weil [Thu, 5 Mar 2020 16:42:26 +0000 (10:42 -0600)]
mgr/cephadm: make osd create on an existing LV idempotent

If we try to prepare an LV that was already prepared, ceph-volume will
return an error message and code.  We want our osd create command to be
idempotent, though, so recognize the error string and continue.

This is an ugly hack, but quicker than changing ceph-volume behavior, and
it is sufficient to stop all of the teuthology failures.

The second part of this is that we have to deploy the daemon on OSDs that
are already prepared and already exist in our osdmap beforehand, but have
never started.

Works-around: https://tracker.ceph.com/issues/44313
Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33744 into master
Sage Weil [Thu, 5 Mar 2020 22:41:48 +0000 (16:41 -0600)]
Merge PR #33744 into master

* refs/pull/33744/head:
qa/tasks/radosbench: fix usage of -O

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agomgr/cephadm: fix placement when existing + specified don't overlap 33766/head
Sage Weil [Thu, 5 Mar 2020 20:51:31 +0000 (14:51 -0600)]
mgr/cephadm: fix placement when existing + specified don't overlap

If we have a daemon on A, and our spec is (count=2, hosts=[B]), we should
always return [A,B], but we sometimes were returning [B,B].

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/volumes: OpSmException.error -> OpSmException.errno 33674/head
Michael Fritch [Tue, 3 Mar 2020 15:22:57 +0000 (08:22 -0700)]
mgr/volumes: OpSmException.error -> OpSmException.errno

fixes mypy errors:

volumes/fs/async_cloner.py: note: In function "handle_clone_pending":
volumes/fs/async_cloner.py:71: error: "OpSmException" has no attribute "error"; maybe "errno"?

volumes/fs/async_cloner.py: note: In function "handle_clone_in_progress":
volumes/fs/async_cloner.py:139: error: "OpSmException" has no attribute "error"; maybe "errno"?

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: remove unneeded assignment to `NoneType`
Michael Fritch [Tue, 3 Mar 2020 15:22:48 +0000 (08:22 -0700)]
mgr/volumes: remove unneeded assignment to `NoneType`

fixes mypy error:

volumes/fs/operations/versions/__init__.py: note: In member "get_subvolume_object" of class "SubvolumeLoader":
volumes/fs/operations/versions/__init__.py:70: error: Incompatible types in assignment (expression has type "None", variable has type "SubvolumeBase")

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: add missing OpSmException import
Michael Fritch [Tue, 3 Mar 2020 15:21:59 +0000 (08:21 -0700)]
mgr/volumes: add missing OpSmException import

fixes mypy error:

volumes/fs/operations/versions/__init__.py: note: In member "upgrade_legacy_subvolume" of class "SubvolumeLoader":
volumes/fs/operations/versions/__init__.py:56: error: Name 'OpSmException' is not defined

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: add missing error code
Michael Fritch [Tue, 3 Mar 2020 15:21:54 +0000 (08:21 -0700)]
mgr/volumes: add missing error code

fixes mypy error:

volumes/fs/operations/versions/__init__.py: note: In member "_load_supported_versions" of class "SubvolumeLoader":
volumes/fs/operations/versions/__init__.py:35: error: Too few arguments for "VolumeException"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: remove stray return
Michael Fritch [Tue, 3 Mar 2020 15:21:49 +0000 (08:21 -0700)]
mgr/volumes: remove stray return

fixes mypy errors:

volumes/fs/purge_queue.py: note: In function "get_trash_entry_for_volume":
volumes/fs/purge_queue.py:28: error: Name 'ret' is not defined

volumes/fs/async_cloner.py: note: In function "get_next_clone_entry":
volumes/fs/async_cloner.py:39: error: Name 'ret' is not defined

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: fixup format string args
Michael Fritch [Tue, 3 Mar 2020 15:21:36 +0000 (08:21 -0700)]
mgr/volumes: fixup format string args

fixes mypy errors:

volumes/fs/purge_queue.py:26: error: Cannot find replacement for positional format specifier 1
volumes/fs/async_cloner.py:37: error: Cannot find replacement for positional format specifier 1

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: add missing `mgr` param
Michael Fritch [Tue, 3 Mar 2020 15:21:30 +0000 (08:21 -0700)]
mgr/volumes: add missing `mgr` param

fixes mypy errors:

volumes/fs/operations/volume.py: note: In function "create_volume":
volumes/fs/operations/volume.py:216: error: Too few arguments for "remove_pool"
volumes/fs/operations/volume.py:223: error: Too few arguments for "remove_pool"
volumes/fs/operations/volume.py:224: error: Too few arguments for "remove_pool"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: assert self.fs
Michael Fritch [Tue, 3 Mar 2020 15:21:25 +0000 (08:21 -0700)]
mgr/volumes: assert self.fs

fixes mypy errors:

volumes/fs/operations/volume.py: note: In member "disconnect" of class "Connection":
volumes/fs/operations/volume.py:94: error: Item "None" of "Optional[Any]" has no attribute "get_addrs"
volumes/fs/operations/volume.py:95: error: Item "None" of "Optional[Any]" has no attribute "shutdown"

volumes/fs/operations/volume.py: note: In member "abort" of class "Connection":
volumes/fs/operations/volume.py:105: error: Item "None" of "Optional[Any]" has no attribute "abort_conn"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: skip type checking on RTimer class
Michael Fritch [Tue, 3 Mar 2020 15:21:18 +0000 (08:21 -0700)]
mgr/volumes: skip type checking on RTimer class

Unclear why mypy does not like this:

volumes/fs/operations/volume.py: note: In member "run" of class "RTimer":
volumes/fs/operations/volume.py:118: error: "RTimer" has no attribute "finished"
volumes/fs/operations/volume.py:119: error: "RTimer" has no attribute "finished"
volumes/fs/operations/volume.py:119: error: "RTimer" has no attribute "interval"
volumes/fs/operations/volume.py:120: error: "RTimer" has no attribute "function"
volumes/fs/operations/volume.py:120: error: "RTimer" has no attribute "args"
volumes/fs/operations/volume.py:120: error: "RTimer" has no attribute "kwargs"
volumes/fs/operations/volume.py:121: error: "RTimer" has no attribute "finished"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: fixup threading.Timer import
Michael Fritch [Tue, 3 Mar 2020 15:20:09 +0000 (08:20 -0700)]
mgr/volumes: fixup threading.Timer import

Python 3.3 changed `Timer` from a factory function to a class
https://docs.python.org/3.8/library/threading.html#timer-objects

fixes mypy error:

volumes/fs/operations/volume.py:9: error: Module 'threading' has no attribute '_Timer'; maybe "Timer"?

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: fix positional str formatting
Michael Fritch [Tue, 3 Mar 2020 15:20:01 +0000 (08:20 -0700)]
mgr/volumes: fix positional str formatting

fixes mypy error:

volumes/fs/operations/group.py: note: In function "create_group":
volumes/fs/operations/group.py:135: error: Not all arguments converted during string formatting

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: place getters and setters next to each other
Michael Fritch [Tue, 3 Mar 2020 15:19:53 +0000 (08:19 -0700)]
mgr/volumes: place getters and setters next to each other

workaround for mypy issue:
https://github.com/python/mypy/issues/1465

fixes mypy errors:

volumes/fs/operations/group.py: note: In class "Group":
volumes/fs/operations/group.py:44: error: Name 'uid' already defined on line 36
volumes/fs/operations/group.py:44: error: "Callable[[Group], Any]" has no attribute "setter"
volumes/fs/operations/group.py:48: error: Name 'gid' already defined on line 40
volumes/fs/operations/group.py:48: error: "Callable[[Group], Any]" has no attribute "setter"

volumes/fs/operations/group.py: note: In function "open_group":
volumes/fs/operations/group.py:170: error: Property "uid" defined in "Group" is read-only
volumes/fs/operations/group.py:171: error: Property "gid" defined in "Group" is read-only

volumes/fs/operations/versions/subvolume_base.py: note: In class "SubvolumeBase":
volumes/fs/operations/versions/subvolume_base.py:45: error: Name 'uid' already defined on line 33
volumes/fs/operations/versions/subvolume_base.py:45: error: "Callable[[SubvolumeBase], Any]" has no attribute "setter"
volumes/fs/operations/versions/subvolume_base.py:49: error: Name 'gid' already defined on line 37
volumes/fs/operations/versions/subvolume_base.py:49: error: "Callable[[SubvolumeBase], Any]" has no attribute "setter"
volumes/fs/operations/versions/subvolume_base.py:53: error: Name 'mode' already defined on line 41
volumes/fs/operations/versions/subvolume_base.py:53: error: "Callable[[SubvolumeBase], Any]" has no attribute "setter"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: reverse params passed to `isinstace()`
Michael Fritch [Tue, 3 Mar 2020 15:18:43 +0000 (08:18 -0700)]
mgr/volumes: reverse params passed to `isinstace()`

fixes mypy error:

volumes/fs/operations/clone_index.py: note: In member "track" of class "CloneIndex":
volumes/fs/operations/clone_index.py:38: error: Argument 2 to "isinstance" has incompatible type "Union[VolumeException, Any]"; expected "Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: fix arg typo '.' -> ','
Michael Fritch [Tue, 3 Mar 2020 15:18:36 +0000 (08:18 -0700)]
mgr/volumes: fix arg typo '.' -> ','

fixes mypy error:

volumes/fs/fs_util.py: note: In function "get_ancestor_xattr":
volumes/fs/fs_util.py:129: error: Too few arguments for "VolumeException"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: add `deque` type
Michael Fritch [Tue, 3 Mar 2020 15:18:19 +0000 (08:18 -0700)]
mgr/volumes: add `deque` type

fixes mypy error:

volumes/fs/async_job.py: note: In member "__init__" of class "AsyncJobs":
volumes/fs/async_job.py:97: error: Need type annotation for 'q'

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: `threading.Event.isSet` no longer exists in py3
Michael Fritch [Tue, 3 Mar 2020 15:18:11 +0000 (08:18 -0700)]
mgr/volumes: `threading.Event.isSet` no longer exists in py3

fixes mypy errors:

volumes/fs/async_job.py: note: In member "should_cancel" of class "JobThread":
volumes/fs/async_job.py:70: error: "Event" has no attribute "isSet"

volumes/fs/volume.py: note: In member "is_stopping" of class "VolumeClient":
volumes/fs/volume.py:59: error: "Event" has no attribute "isSet"

volumes/fs/volume.py: note: In member "list_fs_volumes" of class "VolumeClient":
volumes/fs/volume.py:106: error: "Event" has no attribute "isSet"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: assert JobThread class
Michael Fritch [Tue, 3 Mar 2020 15:16:11 +0000 (08:16 -0700)]
mgr/volumes: assert JobThread class

fixes mypy error:

volumes/fs/async_job.py: note: In member "run" of class "JobThread":
volumes/fs/async_job.py:43: error: "Thread" has no attribute "should_cancel"

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agomgr/volumes: import VolumeException
Michael Fritch [Tue, 3 Mar 2020 15:16:03 +0000 (08:16 -0700)]
mgr/volumes: import VolumeException

fixes mypy errors:

volumes/fs/operations/index.py: note: In member "track" of class "Index":
volumes/fs/operations/index.py:19: error: Name 'VolumeException' is not defined

volumes/fs/operations/index.py: note: In member "untrack" of class "Index":
volumes/fs/operations/index.py:22: error: Name 'VolumeException' is not defined

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>