Commit Graph

52 Commits

Author SHA1 Message Date
Michael Fritch
90cb2feec3
qa/workunits/cephadm/test_cephadm.sh: fix mon.b failure
and is_available check to ensure quorum

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-03-19 14:16:01 -06:00
Sage Weil
acbda9d19d qa/workunits/cephadm/test_cephadm: mark services unmanaged for test
We are deploying containers manually.  Mark them unmanaged so that we
do not fight against mgr/cephadm cleaning up orphan daemons.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-18 10:44:42 -05:00
Sage Weil
ee108d4395 qa/workunits/cephadm/test_cephadm: output file for pub key
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-18 08:44:10 -05:00
Sage Weil
1e25680552 Merge PR #34013 into octopus
* refs/pull/34013/head:
	qa/workunits/cephadm/test_cephadm: --skip-monitoring-stack

Reviewed-by: Michael Fritch <mfritch@suse.com>
2020-03-18 08:13:56 -05:00
Sage Weil
8630b1a814 qa/workunits/cephadm/test_cephadm: --skip-monitoring-stack
We're deploying these things manually later, and they use fixed ports.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-17 14:53:58 -05:00
Sage Weil
a9b15c7e1a update default container images
- For tests, use bleeding-edge octopus branch
- For production defaults, use ceph/ceph:v15.2 tag
- For bootstrap, grab cephadm script from latest octopus branch

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-16 20:53:57 -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
8ab7a91615 qa/workunits/cephadm: --skip-mon-network when using 127.0.0.1
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-16 14:38:22 -05:00
Sage Weil
f979dd1ebf cephadm: implement 'install' command
This was present, but a no-op.

By default, install cephadm.

Optionally take a list of packages to install instead (e.g., ceph-common).

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-16 08:24:36 -05:00
Joshua Schmid
dcc76d36ff mgr/cephadm: adapt qa->test_cephadm.sh
Signed-off-by: Joshua Schmid <jschmid@suse.de>
2020-03-13 09:52:13 +01:00
Michael Fritch
8543e2e50b
qa/workunits/cephadm/test_cephadm.sh: systemctl stop nfs-server
stop any running nfs servers before attempting a deploy of nfs-ganesha

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-03-12 08:08:59 -06:00
Michael Fritch
606b79b19f
qa/workunits/cephadm/test_cephadm.sh: make pgs available
allow rados obj. create to succeed during a single node test

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-03-12 08:08:59 -06:00
Michael Fritch
71ee086368
qa/workunits/cephadm/test_cephadm.sh: add nfs-ganesha test
Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-03-12 08:03:18 -06:00
Michael Fritch
5bdcf00e87
qa/workunits/cephadm/test_cephadm.sh: dump logs on exit
dumps the last few lines from each of the surviving daemon logs

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-02-28 15:26:56 -07:00
Michael Fritch
3cc2fc9f5f
qa/workunits/cephadm/test_cephadm.sh: add cleanup function
moves logic for clean-up during `trap EXIT` into a function

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-02-28 14:45:42 -07:00
Michael Fritch
2d46185c20
qa/workunits/cephadm/test_cephadm.sh: remove image param non-ceph tests
non-ceph components have a default image
as of 97def7cb60

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-02-25 20:49:58 -07:00
Michael Fritch
ea5f639485
qa/workunits/cephadm/test_cephadm.sh: consolidate wait loop logic
into an `is_available` function

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-02-25 20:49:23 -07:00
Sage Weil
d1893df0e1 qa/workunits/cephadm/test_adoption: run as root
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-23 11:58:25 -06:00
Sage Weil
12fe1a1c17 qa/workunits/cephadm: separate out test_adoption.sh; fix
- fix adoption test to handle different legacy fsids
- separate it out into a different script

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-21 07:17:47 -06:00
Sage Weil
77246cb0a4 cephadm: include docker.io in image name
This removes a configuration dependency on the container environment.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-19 07:10:59 -06:00
Sage Weil
92b49094e7 cephadm: avoid trigger old podman bug
This ticket seems to suggest that (1) the root cause is related to an
exec that is orphaned and screws up the container state (due to, e.g., ssh
dropping, or a timeout), (2) -f may be needed, sometimes, to recover, and
(3) newer versions fix it.

  https://github.com/containers/libpod/issues/3226

Way back in 26f9fe54cb we found that using
-f the first time around was a Bad Idea, so we'd rather avoid this.

Instead, just avoid triggering the bug.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 13:59:23 -06:00
Sage Weil
1f5e59d294 qa/workunits/cephadm/test_cephadm.sh: wait longer for grafana
Sometimes it is very slow to start (only on 18.04, strangely?).

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 13:59:23 -06:00
Sage Weil
d466f6f2d9 Merge PR #33191 into master
* refs/pull/33191/head:
	cephadm: shell: allow -e

Reviewed-by: Michael Fritch <mfritch@suse.com>
2020-02-11 17:25:21 -06:00
Sage Weil
3346765dd0 cephadm: shell: allow -e
Set environment variables for shell commands.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-11 15:52:07 -06:00
Sage Weil
9243a502c8 Merge PR #33181 into master
* refs/pull/33181/head:
	qa/workunits/cephadm/test_cephadm: fix typo

Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-02-10 13:29:08 -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
Sage Weil
132b5a09b6 qa/workunits/cephadm/test_cephadm: fix typo
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-09 15:38:48 -06:00
Sage Weil
ceff81c9a5 Merge PR #33136 into master
* refs/pull/33136/head:
	cephadm: fix ceph version probe

Reviewed-by: Michael Fritch <mfritch@suse.com>
2020-02-09 15:34:59 -06:00
Sage Weil
a7d5d5cc8c cephadm: fix ceph version probe
docker returns '<no value>' if the label isn't present, in which case we
still need to run ceph -v.

Also, don't probe non-ceph (e.g., monitoring) containers.

Also, only probe each image id once.

Add a simple test.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-09 14:00:50 -06:00
Sage Weil
9dba764c02 Merge PR #33133 into master
* refs/pull/33133/head:
	qa/workunits/cephadm/test_cephadm.sh: make monitoring tests faster
	qa/workunits/cephadm/test_cephadm: 2 OSDs is enough
	cephadm: disable node-exporter cpu/memory limits for the time being

Reviewed-by: Michael Fritch <mfritch@suse.com>
2020-02-09 13:55:27 -06:00
Sage Weil
36daf1cc29 qa/workunits/cephadm/test_cephadm.sh: make monitoring tests faster
The sleep 90 was way overkill.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-08 18:00:37 -06:00
Sage Weil
0594526393 qa/workunits/cephadm/test_cephadm: 2 OSDs is enough
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-08 18:00:37 -06:00
Sage Weil
8cdbc8e8e6 qa/workunits/cephadm/test_repos: don't try to use the refspec
This is usually a sha1, and we can't reliably find packages based on
that.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-08 07:33:47 -06:00
Sage Weil
fd17368e9c qa/workunits/cephadm/test_repos: apt update
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-07 22:16:29 -06:00
Sage Weil
883f82aee6 qa/workunits/cephadm/test_repos: fix subst
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-07 21:26:03 -06:00
Sage Weil
a98855ecf5 qa/workunits/cephadm/test_repos: add test for the repo commands
This isn't a great test, but it is something.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-07 11:14:47 -06:00
Kefu Chai
22da7813ef
Merge pull request #33018 from mgfritch/cephadm-docker-disabled
qa/workunits/cephadm/test_cephadm.sh: skip docker when service is disabled

Reviewed-by: Sage Weil <sage@redhat.com>
2020-02-05 20:46:16 +08:00
Michael Fritch
4535216267
qa/workunits/cephadm/test_cephadm.sh: add missing monitoring tests
add tests for node-exporter, prometheus, and grafana

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-02-02 21:08:02 -07:00
Michael Fritch
386a9eb89c
qa/workunits/cephadm/test_cephadm.sh: skip docker when service is disabled
Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-01-31 10:27:07 -07:00
Michael Fritch
0d331fccdc
cephadm: remove logs command
Fixes: https://tracker.ceph.com/issues/43618
Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-01-27 07:22:11 -07:00
Sebastian Wagner
bbd18f1986
Merge pull request #32049 from mgfritch/wip-cd-timeout
cephadm: add ability to specify a timeout

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-01-17 08:32:06 +01:00
Kefu Chai
d8a3c605cb
Merge pull request #32625 from mgfritch/cephadm-workunit-test-cleanup
qa/workunits/cephadm/test_cephadm: workunit test cleanup

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-01-15 12:33:52 +08:00
Michael Fritch
19e20c2e89
qa/workunits/cephadm/test_cephadm: add SUDO to vgchange
2020-01-13T10:48:14.235 INFO:tasks.workunit.client.0.smithi177.stderr:+ vgchange -an test_cephadm
2020-01-13T10:48:14.239 INFO:tasks.workunit.client.0.smithi177.stderr:  WARNING: Running as a non-root user. Functionality may be unavailable.
2020-01-13T10:48:14.239 INFO:tasks.workunit.client.0.smithi177.stderr:  /run/lvm/lvmetad.socket: access failed: Permission denied
2020-01-13T10:48:14.240 INFO:tasks.workunit.client.0.smithi177.stderr:  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
2020-01-13T10:48:14.260 INFO:tasks.workunit.client.0.smithi177.stderr:  /dev/mapper/control: open failed: Permission denied
2020-01-13T10:48:14.261 INFO:tasks.workunit.client.0.smithi177.stderr:  Failure to communicate with kernel device-mapper driver.
2020-01-13T10:48:14.261 INFO:tasks.workunit.client.0.smithi177.stderr:  Incompatible libdevmapper 1.02.145 (2017-11-03) and kernel driver (unknown version).
2020-01-13T10:48:14.301 INFO:tasks.workunit.client.0.smithi177.stderr:  /run/lock/lvm/V_test_cephadm:aux: open failed: Permission denied
2020-01-13T10:48:14.301 INFO:tasks.workunit.client.0.smithi177.stderr:  Can't get lock for test_cephadm
2020-01-13T10:48:14.301 INFO:tasks.workunit.client.0.smithi177.stderr:  Cannot process volume group test_cephadm

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-01-13 15:18:24 -07:00
Michael Fritch
57f3dc87b1
qa/workunits/cephadm/test_cephadm: need to add quotes for PYTHONS var
2020-01-13T10:48:13.374 INFO:tasks.workunit.client.0.smithi177.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/cephadm/test_cephadm.sh: line 46: [: python3: binary operator expected

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-01-13 15:18:24 -07:00
Sage Weil
fe8f423345 qa/workunits/cephadm/test_cephadm: drop stray 'exit 0'
Introduced in 40b70c632d

Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-13 14:40:51 -06:00
Michael Fritch
906bfb3251
cephadm: add timeout for run, shell, enter, logs
Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-01-09 07:59:40 -07:00
Sage Weil
40b70c632d cephadm: move mon creation config bits into mgr/cephadm
There's no need for mgr/cephadm to pass --mon-* arguments to
/usr/bin/cephadm just so it can add bits to the config file when the
config file is also being passed in from mgr/cephadm.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-22 10:50:23 -06:00
Sage Weil
e43c7cd6dd qa/workunits/cephadm/test_cephadm.sh: detect python3 and python2
Only test on whichever pythons are available on the host.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-21 09:03:55 -06:00
Michael Fritch
34a2bb4495
qa/workunits/cephadm/test_cephadm.sh: re-enable adopt tests
Signed-off-by: Michael Fritch <mfritch@suse.com>
2019-12-13 07:44:34 -07:00
Sage Weil
feaa79f902 qa/workunits/cephadm/test_cephadm.sh: need --fsid always
Otherwise the test breaks if there are other cluster(s) on the host (like
there normally are in my dev environment).

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-12 10:46:15 -06:00