]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agocephadm: fixup command_deploy log line 35188/head
Michael Fritch [Mon, 18 May 2020 21:40:43 +0000 (15:40 -0600)]
cephadm: fixup command_deploy log line

fixup log line to reflect the deploy action
(e.g. deploy, reconfig, redeploy)

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

5 years agocephadm: skip `port_in_use` during redeploy
Michael Fritch [Mon, 18 May 2020 21:40:39 +0000 (15:40 -0600)]
cephadm: skip `port_in_use` during redeploy

skip the `port_in_use` check during reconfig/redeploy
of the monitoring components and nfs-ganesha

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

5 years agocephadm: remove unused `reconfig` param from create_daemon_dirs
Michael Fritch [Mon, 18 May 2020 21:40:29 +0000 (15:40 -0600)]
cephadm: remove unused `reconfig` param from create_daemon_dirs

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

5 years agocephadm: don't check port in use during nfs reconfig
Michael Fritch [Mon, 18 May 2020 21:40:23 +0000 (15:40 -0600)]
cephadm: don't check port in use during nfs reconfig

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

5 years agomgr/cephadm: Fix OSDs not being created
Sebastian Wagner [Fri, 15 May 2020 10:04:14 +0000 (12:04 +0200)]
mgr/cephadm: Fix OSDs not being created

Fixes: https://tracker.ceph.com/issues/45560
This was caused by completions no longer getting
executed synchonously.

Also

* We don't want to have a busy loop when applying OSDs
* Added call to `_apply_all_services` to OSD test

This is a follow-up on f7bf4d0c597080f45bb8466bd6bab3b9cecb03c4

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

5 years agodoc/cephadm: accessing the admin socket
Sebastian Wagner [Fri, 15 May 2020 12:17:38 +0000 (14:17 +0200)]
doc/cephadm: accessing the admin socket

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

5 years agoqa/tasks/cephadm: ignore tarfile.ReadError
Kefu Chai [Tue, 19 May 2020 11:09:26 +0000 (19:09 +0800)]
qa/tasks/cephadm: ignore tarfile.ReadError

there is chance that /var/log/ceph (and other directories) is not
created when cephadm fails, but we always try to collect /var/log/ceph
by tar the directory on the test node and transfer it back for archiving
it. when we fail to do so, an exception is thrown, and this exception is
in turn logged as the cause of the failure instead of the one which
fails the test.

in this change, `tarfile.TarError`s is caught and ignored if it is
thrown by `misc.pull_directory()`, as normally, we don't consider it a fatal
failure when `misc.pull_directory()` fails because of `tar`. the
failures for the test are.

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

5 years agoqa/cephadm: rm ubuntu_latest for now
Sebastian Wagner [Mon, 11 May 2020 09:53:11 +0000 (11:53 +0200)]
qa/cephadm: rm ubuntu_latest for now

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

5 years agodoc/cephadm: Synopsis: add `cephadm unit`
Sebastian Wagner [Mon, 18 May 2020 10:39:36 +0000 (12:39 +0200)]
doc/cephadm: Synopsis: add `cephadm unit`

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

5 years agocephadm: `ls`: also return systemd_unit
Sebastian Wagner [Mon, 18 May 2020 10:35:34 +0000 (12:35 +0200)]
cephadm: `ls`: also return systemd_unit

Let users directly know the systemd unit name.

Enable things like

```
cephadm ls | jq -r '.[].systemd_unit' | xargs -n 1 systemctl status | cat
```

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

5 years agoqa/tasks/cephadm: Add support for raw disks
Georgios Kyratsas [Wed, 13 May 2020 11:29:35 +0000 (13:29 +0200)]
qa/tasks/cephadm: Add support for raw disks

Currently tests on raw disks are failing due to stripping '/dev/' from
device name. (ie https://tracker.ceph.com/issues/45383#change-165721)

Signed-off-by: Georgios Kyratsas <gkyratsas@suse.com>
(cherry picked from commit 35e158605ef557671e8feec691fd245b17ea6189)

5 years agoqa/tasks/cephadm.py: Support bootstrapped clusters
Georgios Kyratsas [Tue, 5 May 2020 07:27:45 +0000 (09:27 +0200)]
qa/tasks/cephadm.py: Support bootstrapped clusters

Add the possibility of being able to run cephadm.py on clusters that
were already bootstrapped by some other task/way so you can deploy the
rest of the daemons/services.

Signed-off-by: Georgios Kyratsas <gkyratsas@suse.com>
(cherry picked from commit a002b28bc1aa75e087d850759138763a9a2a3916)

5 years agomgr/cephadm: upgrade: use check_mon_command
Sebastian Wagner [Thu, 14 May 2020 14:29:56 +0000 (16:29 +0200)]
mgr/cephadm: upgrade: use check_mon_command

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

5 years agomgr/dashboard: support setting iSCSI gateways from orchestrator
Kiefer Chang [Fri, 15 May 2020 09:22:15 +0000 (17:22 +0800)]
mgr/dashboard: support setting iSCSI gateways from orchestrator

- Dashboard doesn't actively query iSCSI gateways from orchestrator anymore.
  Instead, Orchestrator backend invokes iscsi-gateway-add CLI after any
  iSCSI daemons are deployed.
- Add an optional argument `name` to `iscsi-gateway-add` command. If
  `name` is provided, Dashboard won't issue API request to iSCSI gateway
  to get the hostname. This is required because when orchestrator sets
  the gateway via CLI, the gateway is just spawned and might be not
  ready yet.

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

5 years agomgr/cephadm: config iSCSI gateways in Dashboard
Kiefer Chang [Fri, 15 May 2020 09:20:55 +0000 (17:20 +0800)]
mgr/cephadm: config iSCSI gateways in Dashboard

- Add `daemon_check_post` fuction to allow services implement actions
  needed to be done after daemons are checked.
- After iSCSI daemons are spawned, call dashboard CLI to
  set the API URL of the daemons.

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

5 years agomgr/cephadm: move iSCSI service class to its own file
Kiefer Chang [Fri, 15 May 2020 09:17:54 +0000 (17:17 +0800)]
mgr/cephadm: move iSCSI service class to its own file

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
(cherry picked from commit 1aea3a0850ea7fcc12c15b39b4bd9039dab2c594)

5 years agomgr/orchestrator: adapting orch interface to preview changes
Joshua Schmid [Fri, 15 May 2020 09:34:27 +0000 (11:34 +0200)]
mgr/orchestrator: adapting orch interface to preview changes

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

5 years agomgr/cephadm: adapt cephadm to osdspec preview caching
Joshua Schmid [Fri, 15 May 2020 09:33:31 +0000 (11:33 +0200)]
mgr/cephadm: adapt cephadm to osdspec preview caching

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

5 years agomgr/cephadm: add preview caching to inventory.py
Joshua Schmid [Fri, 15 May 2020 09:32:03 +0000 (11:32 +0200)]
mgr/cephadm: add preview caching to inventory.py

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

5 years agomgr/cephadm: increase global scrape interval
Patrick Seidensal [Fri, 15 May 2020 09:01:35 +0000 (11:01 +0200)]
mgr/cephadm: increase global scrape interval

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit b4a2afa8d2437e7c19cf33863e8db65047e02634)

5 years ago mgr/cephadm/nfs: Instead of CACHEINODE use MDCACHE
Varsha Rao [Fri, 15 May 2020 18:21:01 +0000 (23:51 +0530)]
 mgr/cephadm/nfs: Instead of CACHEINODE use MDCACHE

As CACHEINODE will be deprecated soon.

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

5 years agocephadm: enable logging to stderr in ceph-iscsi
Matthew Oliver [Tue, 12 May 2020 04:02:40 +0000 (14:02 +1000)]
cephadm: enable logging to stderr in ceph-iscsi

All the other ceph servies when deployed are deployed with:

  --default-log-to-stderr=true --default-log-stderr-prefix=debug
  --default-log-to-file=false

Ceph-iscsi doesn't have these as commandline params but once
https://github.com/ceph/ceph-iscsi/pull/186 lands it'll have something
similar as config options. This patch sets these options

Signed-off-by: Matthew Oliver <moliver@suse.com>
(cherry picked from commit f65584637f8ee44e79e0976dcecc086d2ba7fe45)

5 years agodoc/dev/cephadm: Note regarding network calls form CLI handlers
Sebastian Wagner [Mon, 11 May 2020 11:48:19 +0000 (13:48 +0200)]
doc/dev/cephadm: Note regarding network calls form CLI handlers

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

5 years agoIncorporating sebastian-philipp's suggestions.
Zac Dover [Tue, 12 May 2020 17:05:56 +0000 (03:05 +1000)]
Incorporating sebastian-philipp's suggestions.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 845b05419ae870f87c66dcef4858d68e2ec8dd5c)

5 years agoAdd ceph orch zap command
Zac Dover [Mon, 20 Apr 2020 20:57:18 +0000 (06:57 +1000)]
Add ceph orch zap command

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 0455c0e608a02266e8f98fef1643f03d9293ad0a)

5 years agomgr/cephadm: disable env_var passing until pr#34835 is merged
Joshua Schmid [Tue, 12 May 2020 10:10:43 +0000 (12:10 +0200)]
mgr/cephadm: disable env_var passing until pr#34835 is merged

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

5 years agomgr/cephadm: generate and pass env vars to cephadm
Joshua Schmid [Tue, 12 May 2020 10:09:55 +0000 (12:09 +0200)]
mgr/cephadm: generate and pass env vars to cephadm

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

5 years agopython-common: do not pass envs after entrypoint
Joshua Schmid [Tue, 12 May 2020 10:08:52 +0000 (12:08 +0200)]
python-common: do not pass envs after entrypoint

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

5 years agobin/cephadm: move --env-var handling to global argparser
Joshua Schmid [Tue, 12 May 2020 10:08:11 +0000 (12:08 +0200)]
bin/cephadm: move --env-var handling to global argparser

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

5 years agomgr/cephadm: adapt env_var handling
Joshua Schmid [Tue, 12 May 2020 10:07:45 +0000 (12:07 +0200)]
mgr/cephadm: adapt env_var handling

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

5 years agocephadm: return absolute path from pathify
Michael Fritch [Tue, 12 May 2020 19:12:15 +0000 (13:12 -0600)]
cephadm: return absolute path from pathify

normalizes the user defined paths a bit better to avoid inconsistent
results with os.path.basename(), os.path.join(), etc.

For example:
$ cephadm shell --mount ~/

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

5 years agoqa/workunits/cephadm/test_cephadm.sh: add shell mount test
Michael Fritch [Mon, 11 May 2020 22:41:28 +0000 (16:41 -0600)]
qa/workunits/cephadm/test_cephadm.sh: add shell mount test

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

5 years agocephadm: fix shell mount for special files
Michael Fritch [Mon, 11 May 2020 22:30:34 +0000 (16:30 -0600)]
cephadm: fix shell mount for special files

block/char devs, named pipes, sockets etc

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

5 years agomgr/cephadm: Remove AsyncCompletion
Sebastian Wagner [Tue, 12 May 2020 14:16:39 +0000 (16:16 +0200)]
mgr/cephadm: Remove AsyncCompletion

Simplyfy things a lot by not using multiprocessing.pool.

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

5 years agomgr/cephadm: Proper error for OSErrors
Sebastian Wagner [Tue, 12 May 2020 13:20:57 +0000 (15:20 +0200)]
mgr/cephadm: Proper error for OSErrors

Previsously, an OSError resulted in

    OSError: cannot send (already closed?)

which is not helpful.

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

5 years agocephadm: Fix error parsing <command> arguments
Juan Miguel Olmo Martínez [Mon, 4 May 2020 10:45:35 +0000 (12:45 +0200)]
cephadm: Fix error parsing <command> arguments

Optional arguments in the <command> parameter used in:
 <cephadm shell>
 <cephadm enter>
 <cephadm ceph-volume>
are not parsed properly. This fixes this problem.

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit ba07fa257cbdcb06037ccbab25f853cc3dfbb1e2)

5 years agomgr/cephadm: add some more type checks
Sebastian Wagner [Fri, 8 May 2020 09:09:08 +0000 (11:09 +0200)]
mgr/cephadm: add some more type checks

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

5 years agomgr/cephadm: cleanup async_map_completion etc.
Sebastian Wagner [Fri, 20 Mar 2020 16:39:08 +0000 (17:39 +0100)]
mgr/cephadm: cleanup async_map_completion etc.

This breaks the progress integration, but we haven't
used that anyway till now.

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

5 years agomgr/cephadm: replace async_completion with trivial_completion
Sebastian Wagner [Fri, 20 Mar 2020 16:18:48 +0000 (17:18 +0100)]
mgr/cephadm: replace async_completion with trivial_completion

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

5 years agomgr/cephadm: replace async_map_completion with a simple wrapper
Sebastian Wagner [Fri, 20 Mar 2020 16:17:39 +0000 (17:17 +0100)]
mgr/cephadm: replace async_map_completion with a simple wrapper

There is no need to wrap everything into completions.

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

5 years agomgr/cephadm: ceph_default_alerts.yml can be utf-8 encoded
Michael Fritch [Mon, 11 May 2020 00:43:21 +0000 (18:43 -0600)]
mgr/cephadm: ceph_default_alerts.yml can be utf-8 encoded

non-ascii chars introduced by 653c3f66823

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

5 years agocephadm: extend systemd stop timeout
Michael Fritch [Wed, 6 May 2020 21:26:49 +0000 (15:26 -0600)]
cephadm: extend systemd stop timeout

daemon stop + unit.poststop might take longer to complete

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

5 years agopybind/mgr: properly mock the mon store for pytest
Sebastian Wagner [Wed, 6 May 2020 13:52:36 +0000 (15:52 +0200)]
pybind/mgr: properly mock the mon store for pytest

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

5 years agomgr/cephadm: add extra function for the auth entity
Sebastian Wagner [Fri, 8 May 2020 11:00:36 +0000 (13:00 +0200)]
mgr/cephadm: add extra function for the auth entity

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

5 years agomgr/cephadm: node-exporter is not a ceph service
Sebastian Wagner [Fri, 8 May 2020 10:59:37 +0000 (12:59 +0200)]
mgr/cephadm: node-exporter is not a ceph service

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

5 years agomgr/cephadm: move HostAssignment to new module
Sebastian Wagner [Fri, 17 Apr 2020 13:24:44 +0000 (15:24 +0200)]
mgr/cephadm: move HostAssignment to new module

(speeds up my editor)

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

5 years agomgr/cephadm: move upgrade code to upgrade.py
Sebastian Wagner [Thu, 7 May 2020 12:40:08 +0000 (14:40 +0200)]
mgr/cephadm: move upgrade code to upgrade.py

Make it easier for everyone to read the upgrade algorithm.

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

5 years agomgr/cephadm: refresh osd config when mons change
Tim Serong [Wed, 6 May 2020 11:12:56 +0000 (21:12 +1000)]
mgr/cephadm: refresh osd config when mons change

OSDs don't have a service spec, so the previous implementation
was not reconfiguring them when the list of mons changed.

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

5 years agoqa/workunits/cephadm: test grafana adoption
Sebastian Wagner [Tue, 5 May 2020 12:50:14 +0000 (14:50 +0200)]
qa/workunits/cephadm: test grafana adoption

now includes https://github.com/ceph/cephadm-adoption-corpus/commit/af85d49307e1652cd0007bf3074030bf0a63c9b7

Fixes: https://github.com/ceph/cephadm-adoption-corpus/pull/3
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit b62dd11e3d92ec0770389aadd16b4fcb39832480)

5 years agomgr/orch: fix mypy errors
Michael Fritch [Mon, 4 May 2020 20:54:54 +0000 (14:54 -0600)]
mgr/orch: fix mypy errors

orchestrator/module.py: note: In member "_daemon_add_misc" of class "OrchestratorCli":
orchestrator/module.py:655: error: Incompatible types in assignment (expression has type "PlacementSpec", variable has type "Optional[str]")
orchestrator/module.py:656: error: Argument 1 to "ServiceSpec" has incompatible type "Optional[str]"; expected "str"
orchestrator/module.py:656: error: Argument "placement" to "ServiceSpec" has incompatible type "Optional[str]"; expected "Optional[PlacementSpec]"

orchestrator/module.py: note: In member "_apply_misc" of class "OrchestratorCli":
orchestrator/module.py:881: error: Incompatible types in assignment (expression has type "PlacementSpec", variable has type "Optional[str]")
orchestrator/module.py:882: error: Argument 1 to "ServiceSpec" has incompatible type "Optional[str]"; expected "str"
orchestrator/module.py:882: error: Argument "placement" to "ServiceSpec" has incompatible type "Optional[str]"; expected "Optional[PlacementSpec

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

5 years agomgr/orch: add missing `subcluster`, `port`, and `ssl`
Michael Fritch [Mon, 4 May 2020 19:18:19 +0000 (13:18 -0600)]
mgr/orch: add missing `subcluster`, `port`, and `ssl`

subcluster, port, and ssl arguments are missing for `orch apply rgw`

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

5 years agomgr/orch: add type checking for add/apply commands
Michael Fritch [Thu, 30 Apr 2020 23:32:17 +0000 (17:32 -0600)]
mgr/orch: add type checking for add/apply commands

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

5 years agomgr/orch: raise validation error for unexpected inbuf
Michael Fritch [Thu, 30 Apr 2020 22:08:51 +0000 (16:08 -0600)]
mgr/orch: raise validation error for unexpected inbuf

ceph orch apply mds x -i nfs.yaml
Error ENOENT: unrecognized command -i; -h or --help for usage

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

5 years agomgr/orch: remove inbuf logic during daemon add (rgw/iscsi)
Michael Fritch [Thu, 30 Apr 2020 00:40:53 +0000 (18:40 -0600)]
mgr/orch: remove inbuf logic during daemon add (rgw/iscsi)

Simplifies logic for handling the ServiceSpec

Allows for a ServiceSpec:
$ ceph orch daemon add -i iscsi.yaml

But not when combined with a service_type:
$ ceph orch daemon add iscsi <poolname> -i iscsi.yaml

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

5 years agomgr/orch: remove extraneous PlacementSpec.validate()
Michael Fritch [Thu, 30 Apr 2020 00:16:47 +0000 (18:16 -0600)]
mgr/orch: remove extraneous PlacementSpec.validate()

PlacementSpec is being validated during `__init__()`

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

5 years agomgr/orch: add mds, rgw, nfs daemon types
Michael Fritch [Wed, 29 Apr 2020 23:39:47 +0000 (17:39 -0600)]
mgr/orch: add mds, rgw, nfs daemon types

$ ceph orch add -i nfs.yaml
Error ENOENT: unknown daemon type `nfs`

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

5 years agomgr/orch: use `service_type` as the `daemon_type`
Michael Fritch [Wed, 29 Apr 2020 23:34:37 +0000 (17:34 -0600)]
mgr/orch: use `service_type` as the `daemon_type`

$ ceph orch add -i mon.yaml
Error ENOENT: unknown daemon type `None`

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

5 years agomgr/orch: pass `inbuf` to add/apply (mds, rgw, nfs)
Michael Fritch [Wed, 29 Apr 2020 21:02:34 +0000 (15:02 -0600)]
mgr/orch: pass `inbuf` to add/apply (mds, rgw, nfs)

$ ceph orch apply mds a -i mds.yaml
TypeError: _apply_mds() got an unexpected keyword argument 'inbuf'

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

5 years agomgr/orch: add misssing `raise_if_exception`
Michael Fritch [Wed, 29 Apr 2020 20:00:35 +0000 (14:00 -0600)]
mgr/orch: add misssing `raise_if_exception`

pickle exceptions during during `nfs apply`

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

5 years agodoc/cephadm: add section about setting config settings
Sebastian Wagner [Tue, 5 May 2020 14:38:49 +0000 (16:38 +0200)]
doc/cephadm: add section about setting config settings

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

5 years agomgr/cephadm: Add IscsiService
Sebastian Wagner [Mon, 4 May 2020 12:40:19 +0000 (14:40 +0200)]
mgr/cephadm: Add IscsiService

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

5 years agomgr/cephadm: Add CrashService
Sebastian Wagner [Mon, 4 May 2020 12:36:03 +0000 (14:36 +0200)]
mgr/cephadm: Add CrashService

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

5 years agomgr/cephadm: Add NodeExporterService
Sebastian Wagner [Mon, 4 May 2020 12:33:21 +0000 (14:33 +0200)]
mgr/cephadm: Add NodeExporterService

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

5 years agomgr/cephadm: Add PrometheusService
Sebastian Wagner [Mon, 4 May 2020 12:30:57 +0000 (14:30 +0200)]
mgr/cephadm: Add PrometheusService

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

5 years agomgr/cephadm: Add AlertmanagerService
Sebastian Wagner [Mon, 4 May 2020 12:26:31 +0000 (14:26 +0200)]
mgr/cephadm: Add AlertmanagerService

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

5 years agomgr/cephadm: Add GrafanaService
Sebastian Wagner [Mon, 4 May 2020 12:21:21 +0000 (14:21 +0200)]
mgr/cephadm: Add GrafanaService

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

5 years agomgr/cephadm: Add RbdMirrorService
Sebastian Wagner [Mon, 4 May 2020 12:11:24 +0000 (14:11 +0200)]
mgr/cephadm: Add RbdMirrorService

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

5 years agomgr/cephadm: Add RgwService
Sebastian Wagner [Mon, 4 May 2020 12:07:41 +0000 (14:07 +0200)]
mgr/cephadm: Add RgwService

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

5 years agomgr/cephadm: Add MdsService
Sebastian Wagner [Mon, 4 May 2020 12:01:13 +0000 (14:01 +0200)]
mgr/cephadm: Add MdsService

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

5 years agomgr/cephadm: Add MgrService
Sebastian Wagner [Mon, 4 May 2020 11:55:07 +0000 (13:55 +0200)]
mgr/cephadm: Add MgrService

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

5 years agomgr/cephadm: Add MonService
Sebastian Wagner [Mon, 4 May 2020 11:51:15 +0000 (13:51 +0200)]
mgr/cephadm: Add MonService

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

5 years agomgr/cephadm: Add NFSService
Sebastian Wagner [Mon, 4 May 2020 11:38:46 +0000 (13:38 +0200)]
mgr/cephadm: Add NFSService

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

5 years agomgr/cephadm: move OSD related code to OSDService
Sebastian Wagner [Mon, 4 May 2020 11:12:38 +0000 (13:12 +0200)]
mgr/cephadm: move OSD related code to OSDService

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

5 years agomgr/cephadm: move nfs and osd to services/
Sebastian Wagner [Mon, 4 May 2020 10:47:38 +0000 (12:47 +0200)]
mgr/cephadm: move nfs and osd to services/

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

5 years agodebian: fix typo in cephadm user gecos
Alexey Miasoedov [Tue, 14 Apr 2020 19:24:27 +0000 (22:24 +0300)]
debian: fix typo in cephadm user gecos

Signed-off-by: Alexey Miasoedov <alexey.miasoedov@gmail.com>
(cherry picked from commit 7577b6385dbc759896761522424f27f99872a383)

5 years agomgr/cephadm: move SpecStore and HostCache to inventoy.py
Sebastian Wagner [Thu, 30 Apr 2020 15:37:14 +0000 (17:37 +0200)]
mgr/cephadm: move SpecStore and HostCache to inventoy.py

Make module.py a bit smaller

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

5 years agocephadm: give ceph-iscsi permissions to configfs
Matthew Oliver [Tue, 5 May 2020 06:17:06 +0000 (16:17 +1000)]
cephadm: give ceph-iscsi permissions to configfs

The cephadm container mounts the configfs and then bind mounts (-v) it
into the container. Currently the container is not a priviliaged
container which leads to 2 problems:

 1. The container can't insert the iscsi_target_mod kernel module; and
 2. The container can't write to the configfs as that's only writeable
    by root.

We _can_ get around 1, by preloading the kernel module. I.E add it the
systemd unit file. But that doesn't help with 2.

I've tried mounting the configfs with uid and gid options, but configfs
doesn't use them.

If we make the container a priviliged container then magically both 1
and 2 are solved. We don't need to preload the module so that's one less
workaround. But more importantly, configfs can be written to so we can
create ISCSI targets etc.

So that's what this patch does, it makes iscsi containers privileged
containers by setting the CephContainer --priviliged while creating it.

Fixes: https://tracker.ceph.com/issues/45252
Signed-off-by: Matthew Oliver <moliver@suse.com>
(cherry picked from commit 9b7dcb894c370570bf1e16982508eadb8b0c6f32)

5 years agopython-common: do not pass affinity to ceph_volume when None
Joshua Schmid [Thu, 30 Apr 2020 13:27:49 +0000 (15:27 +0200)]
python-common: do not pass affinity to ceph_volume when None

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

5 years agomgr/cephadm: add support for proper osd daemon tracking
Joshua Schmid [Thu, 30 Apr 2020 09:47:22 +0000 (11:47 +0200)]
mgr/cephadm: add support for proper osd daemon tracking

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

5 years agocephadm: Add '--mount' option to mount host file or directory
Ricardo Marques [Mon, 27 Apr 2020 14:11:56 +0000 (15:11 +0100)]
cephadm: Add '--mount' option to mount host file or directory

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

5 years agocephadm: minor osd_type cleanup in OSD adopt
Tim Serong [Thu, 23 Apr 2020 07:00:16 +0000 (17:00 +1000)]
cephadm: minor osd_type cleanup in OSD adopt

This addresses a couple of the comments in
https://github.com/ceph/ceph/pull/34565

Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit df201823b5263502b727c5a056de006b796bc49a)

5 years agocephadm: Add `chown` to unit.run for adoped simple OSDs
Tim Serong [Thu, 23 Apr 2020 06:27:46 +0000 (16:27 +1000)]
cephadm: Add `chown` to unit.run for adoped simple OSDs

We're not using `ceph-volume simple activate` anymore, so need to
add `chown ceph:ceph` for each of block, block.db and block.wal
to ensure old-style simple OSDs are able to start.

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

5 years agomgr/orch: match last occurance of hostname in service_id
Michael Fritch [Mon, 27 Apr 2020 17:44:44 +0000 (11:44 -0600)]
mgr/orch: match last occurance of hostname in service_id

The RGW realm/zone might have a substr that matches the hostname

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

5 years agomgr/cephadm: use keyword instead of positional args
Michael Fritch [Mon, 27 Apr 2020 17:42:26 +0000 (11:42 -0600)]
mgr/cephadm: use keyword instead of positional args

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

5 years agomgr/cephadm: get service_name from DaemonDescription
Michael Fritch [Mon, 27 Apr 2020 17:42:11 +0000 (11:42 -0600)]
mgr/cephadm: get service_name from DaemonDescription

use the shared logic in the DaemonDescription class

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

5 years agomgr/orch: allow '.' chars in the service_id
Michael Fritch [Mon, 27 Apr 2020 17:41:50 +0000 (11:41 -0600)]
mgr/orch: allow '.' chars in the service_id

service_id can contain a '.' char (mds, nfs, iscsi)

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

5 years agodoc/mgr/orchestrator: update iscsi
Michael Fritch [Wed, 29 Apr 2020 00:03:35 +0000 (18:03 -0600)]
doc/mgr/orchestrator: update iscsi

`apply iscsi` and `add iscsi` are implemented in cephadm

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

5 years agomgr/orch: add iscsi apply cli
Michael Fritch [Tue, 28 Apr 2020 23:57:34 +0000 (17:57 -0600)]
mgr/orch: add iscsi apply cli

`$ ceph orch apply iscsi --pool <pool>`

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

5 years agomgr/cephadm: _apply_service: fix _create_iscsi invocation
Sebastian Wagner [Tue, 21 Apr 2020 11:02:57 +0000 (13:02 +0200)]
mgr/cephadm: _apply_service: fix _create_iscsi invocation

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

5 years agocephadm: Make ceph-iscsi SSL aware
Matthew Oliver [Tue, 21 Apr 2020 03:38:46 +0000 (13:38 +1000)]
cephadm: Make ceph-iscsi SSL aware

Ceph-iscsi's `rbd-target-api.py` supports listening over SSL if you
provide an SSL cert and key. Originally the script is opinionated and
requires these files to be named `/etc/ceph/iscsi-gateway.{crt,key}`.

When dealing with containers, having to place files inside a container to
enable SSL isn't very clean. To make things easier, like RGW, you can
now place the SSL cert and key data in the mon config-key store.

This will mean there are 2 ways to enable SSL in ceph-iscsi via orch/cephadm.

1. Push the SSL key and cert into the mon config-key under the keys, and
   then make sure api_secure is enabled (requires json):

  iscsi/{clientname}/iscsi-gateway.crt
  iscsi/{clientname}/iscsi-gateway.key

2. Provide the SSL key and cert in the json you pass the orchestrator and
   it'll push them up for you.

Also lockdown the caps so the container can only access iscsi ssl
key/certs.

Signed-off-by: Matthew Oliver <moliver@suse.com>
(cherry picked from commit 4c942d05949f0cb79963258b6f75093bb5d1d4d9)

5 years agocephadm: fix the hang-up of cryptsetup on creating encrypted OSD
Satoru Takeuchi [Fri, 24 Apr 2020 16:56:03 +0000 (16:56 +0000)]
cephadm: fix the hang-up of cryptsetup on creating encrypted OSD

Creating encrypted OSD fails due to the container's dedicated ipc
namespace. Sharing the ipc namespace with host resolve this problem.

Here is the log.

 ```
 host# cephadm shell
 ...
 # cat spec.yaml
 service_type: osd
 service_id: example_osd_spec
 placement:
   host_pattern: '*'
 data_devices:
   all: true
 encrypted: true
 # ceph orch apply osd -i spec.yaml
 NAME             HOST       DATA     DB WAL
 example_osd_spec ubuntu1804 /dev/sdb -  -
 # ceph osd tree
 ID  CLASS  WEIGHT  TYPE NAME     STATUS  REWEIGHT  PRI-AFF
 -1              0  root default
  0              0  osd.0           down         0  1.00000
 ```

It happens because cryptsetup wait some semaphore forever. This
semaphore is acquired in the host namespace.

 ```
 # exit              # log out from shell
 host# pstree -p
 ...
            |                  |-containerd-shim(11804)-+-ceph-volume(11821)---cryptsetup(12004)
 ...
 host# ps --pid 12004 -o pid,comm,args,wchan
   PID COMMAND         COMMAND                     WCHAN
 12004 cryptsetup      /usr/sbin/cryptsetup --key- semtimedop
 host#
 ```

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
(cherry picked from commit bcdabfc96c15c83afc01c155eb6b424a609271ae)

5 years agoMerge pull request #35120 from Vicente-Cheng/wip-45500-octopus
Yuri Weinstein [Wed, 20 May 2020 18:32:26 +0000 (11:32 -0700)]
Merge pull request #35120 from Vicente-Cheng/wip-45500-octopus

octopus: rgw: anonomous swift to obj that dont exist should 401

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34993 from smithfarm/wip-45492-octopus
Yuri Weinstein [Wed, 20 May 2020 18:31:57 +0000 (11:31 -0700)]
Merge pull request #34993 from smithfarm/wip-45492-octopus

octopus: rgw: fix bug where bucket listing end marker not always set correctly

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34989 from smithfarm/wip-45485-octopus
Yuri Weinstein [Wed, 20 May 2020 18:31:33 +0000 (11:31 -0700)]
Merge pull request #34989 from smithfarm/wip-45485-octopus

octopus: rgw: radosgw-admin: fix infinite loops in 'datalog list'

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34988 from smithfarm/wip-45484-octopus
Yuri Weinstein [Wed, 20 May 2020 18:31:08 +0000 (11:31 -0700)]
Merge pull request #34988 from smithfarm/wip-45484-octopus

octopus: rgw: fix rgw tries to fetch anonymous user

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #35126 from smithfarm/wip-45598-octopus
Yuri Weinstein [Wed, 20 May 2020 17:08:08 +0000 (10:08 -0700)]
Merge pull request #35126 from smithfarm/wip-45598-octopus

octopus: librbd: avoid completing mirror:DisableRequest while holding its lock

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
5 years agoMerge pull request #34994 from smithfarm/wip-45364-octopus
Yuri Weinstein [Wed, 20 May 2020 17:07:21 +0000 (10:07 -0700)]
Merge pull request #34994 from smithfarm/wip-45364-octopus

octopus: qa/workunits/rbd: fix list-mapped filter in unmap_device

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge pull request #34985 from smithfarm/wip-45498-octopus
Yuri Weinstein [Wed, 20 May 2020 17:06:21 +0000 (10:06 -0700)]
Merge pull request #34985 from smithfarm/wip-45498-octopus

octopus: rgw: fix some list buckets handle leak

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
5 years agoMerge pull request #34940 from Vicente-Cheng/wip-45366-octopus
Yuri Weinstein [Wed, 20 May 2020 17:05:11 +0000 (10:05 -0700)]
Merge pull request #34940 from Vicente-Cheng/wip-45366-octopus

octopus: rgw/notifications: fix zero size in notifications

Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
5 years agoMerge pull request #34992 from tspmelo/wip-45470-octopus
Laura Paduano [Wed, 20 May 2020 08:42:23 +0000 (10:42 +0200)]
Merge pull request #34992 from tspmelo/wip-45470-octopus

octopus: mgr/dashboard: Reduce requests in Mirroring page

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>