Commit Graph

56 Commits

Author SHA1 Message Date
Sebastian Wagner
9310b6e278 qa/cephadm: Docker doesn't ship a registries.conf
I guess not using the mirror for docker based tests is ok for now.

For adding docker support, we need to:

1. change the docker config
2. restart the docker daemon

Note that Docker's config only supports to mirror the docker.io registry.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-05-27 13:17:58 +02:00
Sebastian Wagner
d6edd8199f qa/cephadm: Add local registry mirror
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-05-26 17:38:39 +02:00
Kefu Chai
fdb2d1e62c
Merge pull request #35104 from varshar16/wip-fix-roleless-mon-issue
qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Georgios Kyratsas <gkyratsas@suse.com>
2020-05-22 12:44:09 +08:00
Kefu Chai
d67b0f1e3a 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>
2020-05-19 19:10:56 +08:00
Varsha Rao
58eaeb53e4 qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict
Fixes: https://tracker.ceph.com/issues/45584
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-05-19 09:57:27 +00:00
Georgios Kyratsas
35e158605e 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>
2020-05-14 16:54:57 +02:00
Georgios Kyratsas
a002b28bc1 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>
2020-05-14 16:54:30 +02:00
Kefu Chai
6eb57a2a4f qa/tasks/cephadm.py: decode data returned by teuthology.get_file()
it's used as part of the command line sent to shell, so we need to
decode it first.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 23:06:20 +08:00
Kefu Chai
8bfe977854 qa/tasks: use StringIO for capturing string output
see d8d44ed156

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:22 +08:00
Sage Weil
9e609c9ed7 qa/tasks/cephadm: add 'roleless' mode
Allow cephadm to start up with roles like:

roles:
- - host.a
  - client.0
  - osd.0
  - osd.1
- - host.b
  - osd.2
  - osd.3

Cephadm will pick the mon names (based on host) and provision all
services by default.

The cephadm task can still provision other daemons, but it may
fight with mgr/cephadm.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-02 23:16:42 +00:00
Sage Weil
65ad142d59 qa/tasks/cephadm: no need to explicitly reconfig
cephadm does this magically now.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-27 11:49:29 -05:00
Sage Weil
29d2d7d64b qa/tasks/cephadm: fetch final ceph.conf
Otherwise we'll distribute the initial ceph.conf, which only has the
bootstrap mon in it.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-27 11:49:29 -05:00
Sage Weil
4c78dfe26f qa/tasks/cephadm: distribute ceph.conf and admin keyring to all nodes
Revert part of 96220c0c05 so that we still
distribute a *final* ceph.conf and admin keyring to all nodes, right after
all of the mons are up.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-27 10:43:18 -05:00
Kefu Chai
947a74349d qa: import with full path
to be py3 compatible

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-24 18:27:55 +08:00
Sage Weil
d7de2abc2f cephadm: add allow_ptrace option to enable SYS_PTRACE
In any environments it is helpful to have SYS_PTRACE so that you can
gdb attach or strace a daemon.

Leave this off by default so that the container is more secure.

Enable this in teuthology and vstart.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-16 21:04:22 -05:00
Sage Weil
ccf85a1fef Merge PR #33952 into octopus
* refs/pull/33952/head:
	qa/workunits/cephadm: --skip-mon-network when using 127.0.0.1
	cephadm: add tests
	qa/tasks/cephadm: pass -v to bootstrap
	mgr/cephadm: only try to place mons on hosts matching public_network
	mgr/cephadm: keep track of host networks, ips
	cephadm: automatically infer mon public_network, if we can
	cephadm: add list-networks command

Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-03-16 17:36:43 -05:00
Sage Weil
1a54da0b01 qa/tasks/cephadm: pass -v to bootstrap
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-16 14:38:22 -05:00
Sage Weil
7957655227 cephadm: bootstrap: deploy monitoring stack by default
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-16 12:39:44 -05:00
Sage Weil
d62955bcba qa/tasks/cephadm: use 'orch daemon osd add'
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-13 09:52:13 +01:00
Sage Weil
6885cbc94b qa/tasks/cephadm: no default mon|mgr|crash service specs
The service wants to create daemons manually and explicitly.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-10 15:38:52 -05:00
Sage Weil
96220c0c05 qa/tasks/cephadm: put bootstrap config etc directly in /etc/ceph
This puts the conf and keyring in /etc/ceph earlier rather than later,
making them useful for debugging a live system *during* bootstrap.  It's
also less code.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-07 15:18:45 -06:00
Sage Weil
6e764e1a36 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>
2020-03-06 21:27:48 -06:00
Sage Weil
6fbd5d21e8 qa/tasks/cephadm: deploy other monitoring components
Grafana and alertmanager.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-06 13:32:57 +00:00
Kyr Shatskyy
145ba3e100 qa/tasks/cephadm: get rid of cStringIO for py3
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-04 13:09:17 +08:00
Sage Weil
a29a78e4e9 mgr/cephadm: remove apply_mon support
Our apply method doesn't support removing mons at this point.  And using
it for adding mons is just an awkward version of 'daemon add'.

Update docs and cephadm.py task accordingly.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-24 10:46:10 -06:00
Sebastian Wagner
32295039d7 qa/tasks/cephadm: orch host ls now returns hostnames
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-21 10:24:31 +01:00
Nathan Cutler
652243e71e qa/cephadm: "ls -l" cephadm after downloading it
For better debugging when the download goes awry.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-02-20 17:26:07 +01:00
Nathan Cutler
a0dd01bc5e qa/cephadm.py: better check for cephadm download success
When the URL passed to "curl --silent ..." does not exist, the
resulting file will be populated with the string:

    404: Not Found

If that (or something similar) happens, the file size will be
suspiciously low, like < 1000 bytes. Fail the test immediately in this
case.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-02-20 17:22:20 +01:00
Nathan Cutler
dcbdb28317 qa/tasks/cephadm.py: lop off .git more robustly
The line

    rest.replace('.git/', '/')

was added to accommodate weird folks who run teuthology-suite
with an option like this:

    --suite-repo https://github.com/ceph/ceph.git/

but they might just as well give the option like this:

    --suite-repo https://github.com/ceph/ceph.git

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-02-20 17:22:17 +01:00
Sage Weil
e8520eba52 qa/tasks/cephadm: deploy node-exporter
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-19 15:24:52 +01:00
Sage Weil
d329dc85e1 qa/tasks/cephadm: fix prometheus shutdown
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-16 20:23:27 -06:00
Sage Weil
b650e75838 Merge PR #33289 into master
* refs/pull/33289/head:
	qa/tasks/cephadm: deploy rgw daemons too

Reviewed-by: Michael Fritch <mfritch@suse.com>
2020-02-15 08:42:10 -06:00
Sage Weil
32b2ded8dc qa/tasks/cephadm: deploy rgw daemons too
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-14 19:52:34 -06:00
Sage Weil
f24b90c78c qa/tasks/cephadm: improve shell subcommand
- pass teuth job params through environment
- run commands via bash -c

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-14 21:10:36 +00:00
Sage Weil
29c5cce968 qa/suites/rados/cephadm: deploy prometheus.a
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-13 13:59:36 -06:00
Sage Weil
0d689250d1 qa/tasks/cephadm: adapt to new cli
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-13 09:43:38 -06:00
Sage Weil
95ecaad0d5 mgr/orch: split out daemon_action from service_action
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 11:14:17 -06:00
Sage Weil
20205e70c4 mgr/orch: 'ceph orchestrator ...' -> 'ceph orch ...'
Less typing for all!

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-09 15:39:57 -06:00
Kefu Chai
edca34ea67 qa/tasks/cephadm: test "orchestrator host ls"
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-06 09:53:17 +08:00
Sage Weil
f026a1c9f6 qa/tasks/cephadm: pass short dev name to osd prepare
Zap needs a full path, but create/prepare needs the VG/LV
only if it is an existing LV.

We'll make c-v more friendly later.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-28 14:21:53 -06:00
Sage Weil
1ebe7950ed qa/tasks/cephadm: work around .git suffix on ceph_repo
githubusercontent.com doesn't like the .git suffix

Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-23 08:25:34 -06:00
Sage Weil
317c78cf46 qa/tasks/cephadm: learn to pull cephadm from github
Fixes: https://tracker.ceph.com/issues/43755
Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-22 08:47:03 -06:00
Sage Weil
299eb6aad8 qa/tasks/cephadm: start watching initial daemons before bootstrap
This lets us see output while bootstrap is happening.

(Depends on the teuthology change to use journalctl, see
teuthology commit 4fa83040b05b604280789459f095d6f2ad1b0d01.)

Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-17 23:01:09 +00:00
Sage Weil
2cc9fffc8e qa/tasks/cephadm: create /etc/ceph if it doesn't exist
Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-17 22:59:57 +00:00
Sage Weil
2681985983 qa/tasks/cephadm: fix log whitelist when there is no whitelist
Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-17 22:59:43 +00:00
Sage Weil
eba385b715 qa/tasks/cephadm: support crush_tunables config option
Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-13 19:49:57 -06:00
Sage Weil
5d8635d0d3 Merge PR #32377 into master
* refs/pull/32377/head:
	qa/suites/rados/thrash-old-clients: configure mons in terms of addrvecs
	qa/suites/rados/thrash-old-clients: hammer: fix package list
	qa/tasks/cephadm: set .conf to cluster config object
	qa/tasks/cephadm: archive /var/log/ceph logs too (not just cluster dir)
	qa/tasks/cephadm: client keyring
	qa/tasks/cephadm: setup thrashers ctx item
	qa/tasks/ceph_manager: asok commands via cephadm shell
	qa/suites/rados/thrash-old-clients: stick to el7
	qa/tasks/cephadm: check cluster log; support log-whitelist
	qa/suites/rados/thrash-old-clienets: python-foo to python3-foo
	qa/suites/rados/thrash-old-clients: add new exclude_packages
	qa/suites/rados/thrash-old-clients: use cephadm
	mon/ConfigMonitor: make legacy mon addr/port parseable by legacy code

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2019-12-23 17:54:30 -06:00
Sage Weil
31ba596a63 qa/tasks/cephadm: set .conf to cluster config object
ceph.py does this and ceph_manager.py kill_osd relies on it.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-23 16:35:09 -06:00
Sage Weil
272225c4be qa/tasks/cephadm: archive /var/log/ceph logs too (not just cluster dir)
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-23 16:35:09 -06:00
Sage Weil
62806d4df2 qa/tasks/cephadm: client keyring
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-23 16:35:09 -06:00