Stephan Müller [Tue, 3 Mar 2020 14:39:32 +0000 (15:39 +0100)]
mgr/dashboard: Preserve rule selection on pool type change
Now if the pool type is changed from replicated to erasure in the pool
form and you have multiple rules, your selection is preserved and not
overwritten by null, which caused an error message to be shown
(crush rule is required).
Fixes: https://tracker.ceph.com/issues/44371 Signed-off-by: Stephan Müller <smueller@suse.com>
Stephan Müller [Mon, 2 Mar 2020 11:26:48 +0000 (12:26 +0100)]
mgr/dashboard: Crush rule is only send during replicated pool creation
The problem was that the crush rule setting was send during the creation
of a pool - the type didn't matter, but the setting is only used if a
replicated pool is created. This hasn't created any problems yet, but to
prevent that it's now omitted for erasure code pool creations.
Fixes: https://tracker.ceph.com/issues/44371 Signed-off-by: Stephan Müller <smueller@suse.com>
Stephan Müller [Mon, 2 Mar 2020 10:48:17 +0000 (11:48 +0100)]
mgr/dashboard: Hide ECP actions during ec pool edit
Hides erasure profile actions during erasure pool edit, as all
actions are disabled anyway as they can't be used in edit mode.
This commit makes also sure that the used crush rule will be shown
during edit of an erasure pool and no crush rule selection is shown
during creation of an erasure code pool, as in most cases a new crush
rule will be created for the ec pool.
Fixes: https://tracker.ceph.com/issues/44371 Signed-off-by: Stephan Müller <smueller@suse.com>
Stephan Müller [Mon, 2 Mar 2020 10:39:48 +0000 (11:39 +0100)]
mgr/dashboard: Pool form erasure/replicated boolean
Now a boolean will be set if the pool type is changed. The question
which type is currently set is raised a lot of times inside the pool
form therefor there is a speed advance if it's just a boolean instead of
getting the form control from the form in the first place and than
compare two strings.
Fixes: https://tracker.ceph.com/issues/44371 Signed-off-by: Stephan Müller <smueller@suse.com>
Stephan Müller [Mon, 2 Mar 2020 10:08:23 +0000 (11:08 +0100)]
mgr/dashboard: Change pool info API endpoint
Moves the "_info" endpoint of pool into an equivalent
UI-API call with the name "info".
Added three more attributes to the info dict which enables the dashboard
to only call info to get all the needed data, currently three calls will
be used to do that.
Removed pool_name parameter as the outcome was not used.
Updated the tests and related angular files accordingly.
Fixes: https://tracker.ceph.com/issues/44371 Signed-off-by: Stephan Müller <smueller@suse.com>
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()`;
Chunsong Feng [Thu, 19 Dec 2019 09:32:09 +0000 (17:32 +0800)]
os/bluestore/spdk: Fix the overflow error of parsing spdk coremask
coremask supports up to 256 bits in DPDK19.05, but the use of stoll in
NVMEManager::try_get limits the maximum use to 64 bits. Parse coremask by
hex character from low to high.
Fixes: https://tracker.ceph.com/issues/43044 Signed-off-by: Hu Ye <yehu5@huawei.com> Signed-off-by: Chunsong Feng <fengchunsong@huawei.com> Signed-off-by: luo rixin <luorixin@huawei.com>
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
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
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
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
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().
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).
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>
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
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/*".
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.
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>