summaryrefslogtreecommitdiffstats
path: root/qa/suites/orch/cephadm/workunits
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /qa/suites/orch/cephadm/workunits
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/suites/orch/cephadm/workunits')
-rw-r--r--qa/suites/orch/cephadm/workunits/%0
l---------qa/suites/orch/cephadm/workunits/.qa1
l---------qa/suites/orch/cephadm/workunits/0-distro1
l---------qa/suites/orch/cephadm/workunits/agent1
l---------qa/suites/orch/cephadm/workunits/mon_election1
l---------qa/suites/orch/cephadm/workunits/task/.qa1
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_adoption.yaml11
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_ca_signed_key.yaml31
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_cephadm.yaml11
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_cephadm_repos.yaml8
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_iscsi_container/+0
l---------qa/suites/orch/cephadm/workunits/task/test_iscsi_container/.qa1
l---------qa/suites/orch/cephadm/workunits/task/test_iscsi_container/centos_8.stream_container_tools.yaml1
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_iscsi_container/test_iscsi_container.yaml21
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_orch_cli.yaml17
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_orch_cli_mon.yaml45
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml40
-rw-r--r--qa/suites/orch/cephadm/workunits/task/test_set_mon_crush_locations.yaml62
18 files changed, 253 insertions, 0 deletions
diff --git a/qa/suites/orch/cephadm/workunits/% b/qa/suites/orch/cephadm/workunits/%
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/%
diff --git a/qa/suites/orch/cephadm/workunits/.qa b/qa/suites/orch/cephadm/workunits/.qa
new file mode 120000
index 000000000..a602a0353
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/.qa
@@ -0,0 +1 @@
+../.qa/ \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/0-distro b/qa/suites/orch/cephadm/workunits/0-distro
new file mode 120000
index 000000000..4b341719d
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/0-distro
@@ -0,0 +1 @@
+.qa/distros/container-hosts \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/agent b/qa/suites/orch/cephadm/workunits/agent
new file mode 120000
index 000000000..154924209
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/agent
@@ -0,0 +1 @@
+../smoke/agent \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/mon_election b/qa/suites/orch/cephadm/workunits/mon_election
new file mode 120000
index 000000000..3f331e621
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/mon_election
@@ -0,0 +1 @@
+.qa/mon_election \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/task/.qa b/qa/suites/orch/cephadm/workunits/task/.qa
new file mode 120000
index 000000000..a602a0353
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/.qa
@@ -0,0 +1 @@
+../.qa/ \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/task/test_adoption.yaml b/qa/suites/orch/cephadm/workunits/task/test_adoption.yaml
new file mode 100644
index 000000000..e04fc1eea
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_adoption.yaml
@@ -0,0 +1,11 @@
+roles:
+- [mon.a, mgr.x, osd.0, client.0]
+tasks:
+- install:
+- exec:
+ mon.a:
+ - yum install -y python3 || apt install -y python3
+- workunit:
+ clients:
+ client.0:
+ - cephadm/test_adoption.sh
diff --git a/qa/suites/orch/cephadm/workunits/task/test_ca_signed_key.yaml b/qa/suites/orch/cephadm/workunits/task/test_ca_signed_key.yaml
new file mode 100644
index 000000000..7bf51f719
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_ca_signed_key.yaml
@@ -0,0 +1,31 @@
+roles:
+- - host.a
+ - mon.a
+ - mgr.a
+ - osd.0
+ - client.0
+- - host.b
+ - mon.b
+ - mgr.b
+ - osd.1
+ - client.1
+overrides:
+ cephadm:
+ use-ca-signed-key: True
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - |
+ set -ex
+ HOSTNAMES=$(ceph orch host ls --format json | jq -r '.[] | .hostname')
+ for host in $HOSTNAMES; do
+ # do a check-host on each host to make sure it's reachable
+ ceph cephadm check-host ${host} 2> ${host}-ok.txt
+ HOST_OK=$(cat ${host}-ok.txt)
+ if ! grep -q "Host looks OK" <<< "$HOST_OK"; then
+ printf "Failed host check:\n\n$HOST_OK"
+ exit 1
+ fi
+ done
diff --git a/qa/suites/orch/cephadm/workunits/task/test_cephadm.yaml b/qa/suites/orch/cephadm/workunits/task/test_cephadm.yaml
new file mode 100644
index 000000000..4d253517c
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_cephadm.yaml
@@ -0,0 +1,11 @@
+roles:
+- [mon.a, mgr.x, osd.0, client.0]
+tasks:
+- install:
+- exec:
+ mon.a:
+ - yum install -y python3 || apt install -y python3
+- workunit:
+ clients:
+ client.0:
+ - cephadm/test_cephadm.sh
diff --git a/qa/suites/orch/cephadm/workunits/task/test_cephadm_repos.yaml b/qa/suites/orch/cephadm/workunits/task/test_cephadm_repos.yaml
new file mode 100644
index 000000000..4a1ac88de
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_cephadm_repos.yaml
@@ -0,0 +1,8 @@
+roles:
+- [mon.a, mgr.x, osd.0, client.0]
+tasks:
+- workunit:
+ no_coverage_and_limits: true
+ clients:
+ client.0:
+ - cephadm/test_repos.sh
diff --git a/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/+ b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/+
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/+
diff --git a/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/.qa b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/.qa
new file mode 120000
index 000000000..a602a0353
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/.qa
@@ -0,0 +1 @@
+../.qa/ \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/centos_8.stream_container_tools.yaml b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/centos_8.stream_container_tools.yaml
new file mode 120000
index 000000000..7a86f967f
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/centos_8.stream_container_tools.yaml
@@ -0,0 +1 @@
+.qa/distros/podman/centos_8.stream_container_tools.yaml \ No newline at end of file
diff --git a/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/test_iscsi_container.yaml b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/test_iscsi_container.yaml
new file mode 100644
index 000000000..19d302c87
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_iscsi_container/test_iscsi_container.yaml
@@ -0,0 +1,21 @@
+roles:
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - mon.a
+ - mgr.a
+ - client.0
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - ceph osd pool create foo
+ - rbd pool init foo
+ - ceph orch apply iscsi foo u p
+- workunit:
+ clients:
+ client.0:
+ - cephadm/test_iscsi_pids_limit.sh
+ - cephadm/test_iscsi_etc_hosts.sh
diff --git a/qa/suites/orch/cephadm/workunits/task/test_orch_cli.yaml b/qa/suites/orch/cephadm/workunits/task/test_orch_cli.yaml
new file mode 100644
index 000000000..ec65fb116
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_orch_cli.yaml
@@ -0,0 +1,17 @@
+roles:
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - mon.a
+ - mgr.a
+ - client.0
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - ceph orch apply mds a
+- cephfs_test_runner:
+ modules:
+ - tasks.cephadm_cases.test_cli
diff --git a/qa/suites/orch/cephadm/workunits/task/test_orch_cli_mon.yaml b/qa/suites/orch/cephadm/workunits/task/test_orch_cli_mon.yaml
new file mode 100644
index 000000000..2a33dc839
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_orch_cli_mon.yaml
@@ -0,0 +1,45 @@
+roles:
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - mon.a
+ - mgr.a
+ - client.0
+- - host.b
+ - osd.3
+ - osd.4
+ - osd.5
+ - mon.b
+ - mgr.b
+ - client.1
+- - host.c
+ - osd.6
+ - osd.7
+ - osd.8
+ - mon.c
+ - mgr.c
+ - client.2
+- - host.d
+ - osd.9
+ - osd.10
+ - osd.11
+ - mon.d
+ - mgr.d
+ - client.3
+- - host.e
+ - osd.12
+ - osd.13
+ - osd.14
+ - mon.e
+ - mgr.e
+ - client.4
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - ceph orch apply mds a
+- cephfs_test_runner:
+ modules:
+ - tasks.cephadm_cases.test_cli_mon
diff --git a/qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml b/qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml
new file mode 100644
index 000000000..976e3730c
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml
@@ -0,0 +1,40 @@
+roles:
+- - host.a
+ - mon.a
+ - mgr.a
+ - osd.0
+- - host.b
+ - mon.b
+ - mgr.b
+ - osd.1
+- - host.c
+ - mon.c
+ - osd.2
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - ceph mgr module enable rgw
+- rgw_module.apply:
+ specs:
+ - rgw_realm: myrealm1
+ rgw_zonegroup: myzonegroup1
+ rgw_zone: myzone1
+ spec:
+ rgw_frontend_port: 5500
+- cephadm.shell:
+ host.a:
+ - |
+ set -e
+ set -x
+ while true; do TOKEN=$(ceph rgw realm tokens | jq -r '.[0].token'); echo $TOKEN; if [ "$TOKEN" != "master zone has no endpoint" ]; then break; fi; sleep 5; done
+ TOKENS=$(ceph rgw realm tokens)
+ echo $TOKENS | jq --exit-status '.[0].realm == "myrealm1"'
+ echo $TOKENS | jq --exit-status '.[0].token'
+ TOKEN_JSON=$(ceph rgw realm tokens | jq -r '.[0].token' | base64 --decode)
+ echo $TOKEN_JSON | jq --exit-status '.realm_name == "myrealm1"'
+ echo $TOKEN_JSON | jq --exit-status '.endpoint | test("http://.+:\\d+")'
+ echo $TOKEN_JSON | jq --exit-status '.realm_id | test("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")'
+ echo $TOKEN_JSON | jq --exit-status '.access_key'
+ echo $TOKEN_JSON | jq --exit-status '.secret'
diff --git a/qa/suites/orch/cephadm/workunits/task/test_set_mon_crush_locations.yaml b/qa/suites/orch/cephadm/workunits/task/test_set_mon_crush_locations.yaml
new file mode 100644
index 000000000..6d9bd1525
--- /dev/null
+++ b/qa/suites/orch/cephadm/workunits/task/test_set_mon_crush_locations.yaml
@@ -0,0 +1,62 @@
+roles:
+- - host.a
+ - osd.0
+ - mon.a
+ - mgr.a
+- - host.b
+ - osd.1
+ - mon.b
+ - mgr.b
+- - host.c
+ - osd.2
+ - mon.c
+tasks:
+- install:
+- cephadm:
+- cephadm.apply:
+ specs:
+ - service_type: mon
+ service_id: foo
+ placement:
+ count: 3
+ spec:
+ crush_locations:
+ host.a:
+ - datacenter=a
+ host.b:
+ - datacenter=b
+ - rack=2
+ host.c:
+ - datacenter=a
+ - rack=3
+- cephadm.shell:
+ host.a:
+ - |
+ set -ex
+ # since we don't know the real hostnames before the test, the next
+ # bit is in order to replace the fake hostnames "host.a/b/c" with
+ # the actual names cephadm knows the host by within the mon spec
+ ceph orch host ls --format json | jq -r '.[] | .hostname' > realnames
+ echo $'host.a\nhost.b\nhost.c' > fakenames
+ echo $'a\nb\nc' > mon_ids
+ echo $'{datacenter=a}\n{datacenter=b,rack=2}\n{datacenter=a,rack=3}' > crush_locs
+ ceph orch ls --service-name mon --export > mon.yaml
+ MONSPEC=`cat mon.yaml`
+ echo "$MONSPEC"
+ while read realname <&3 && read fakename <&4; do
+ MONSPEC="${MONSPEC//$fakename/$realname}"
+ done 3<realnames 4<fakenames
+ echo "$MONSPEC" > mon.yaml
+ cat mon.yaml
+ # now the spec should have the real hostnames, so let's re-apply
+ ceph orch apply -i mon.yaml
+ sleep 90
+ ceph orch ps --refresh
+ ceph orch ls --service-name mon --export > mon.yaml; ceph orch apply -i mon.yaml
+ sleep 90
+ ceph mon dump
+ ceph mon dump --format json
+ # verify all the crush locations got set from "ceph mon dump" output
+ while read monid <&3 && read crushloc <&4; do
+ ceph mon dump --format json | jq --arg monid "$monid" --arg crushloc "$crushloc" -e '.mons | .[] | select(.name == $monid) | .crush_location == $crushloc'
+ done 3<mon_ids 4<crush_locs