diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /qa/suites/orch/cephadm/upgrade | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.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/upgrade')
15 files changed, 257 insertions, 0 deletions
diff --git a/qa/suites/orch/cephadm/upgrade/% b/qa/suites/orch/cephadm/upgrade/% new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/% diff --git a/qa/suites/orch/cephadm/upgrade/.qa b/qa/suites/orch/cephadm/upgrade/.qa new file mode 120000 index 000000000..a602a0353 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/.qa @@ -0,0 +1 @@ +../.qa/
\ No newline at end of file diff --git a/qa/suites/orch/cephadm/upgrade/1-start-distro/.qa b/qa/suites/orch/cephadm/upgrade/1-start-distro/.qa new file mode 120000 index 000000000..a602a0353 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/1-start-distro/.qa @@ -0,0 +1 @@ +../.qa/
\ No newline at end of file diff --git a/qa/suites/orch/cephadm/upgrade/1-start-distro/1-start-centos_8.stream_container-tools.yaml b/qa/suites/orch/cephadm/upgrade/1-start-distro/1-start-centos_8.stream_container-tools.yaml new file mode 100644 index 000000000..bb9a220e6 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/1-start-distro/1-start-centos_8.stream_container-tools.yaml @@ -0,0 +1,39 @@ +os_type: centos +os_version: "8.stream" + +tasks: +- pexec: + all: + - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup + - sudo dnf -y module reset container-tools + - sudo dnf -y module install container-tools + - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf +- cephadm: + image: quay.io/ceph/ceph:v16.2.0 + cephadm_branch: v16.2.0 + cephadm_git_url: https://github.com/ceph/ceph + # avoid --cap-add=PTRACE + --privileged for older cephadm versions + allow_ptrace: false + avoid_pacific_features: true + +roles: +- - mon.a + - mon.c + - mgr.y + - osd.0 + - osd.1 + - osd.2 + - osd.3 + - client.0 + - node-exporter.a + - alertmanager.a +- - mon.b + - mgr.x + - osd.4 + - osd.5 + - osd.6 + - osd.7 + - client.1 + - prometheus.a + - grafana.a + - node-exporter.b diff --git a/qa/suites/orch/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml b/qa/suites/orch/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml new file mode 100644 index 000000000..d3d9de83e --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml @@ -0,0 +1,33 @@ +os_type: ubuntu +os_version: "20.04" + +tasks: +- cephadm: + image: quay.io/ceph/ceph:v16.2.0 + cephadm_branch: v16.2.0 + cephadm_git_url: https://github.com/ceph/ceph + # avoid --cap-add=PTRACE + --privileged for older cephadm versions + allow_ptrace: false + avoid_pacific_features: true + +roles: +- - mon.a + - mon.c + - mgr.y + - osd.0 + - osd.1 + - osd.2 + - osd.3 + - client.0 + - node-exporter.a + - alertmanager.a +- - mon.b + - mgr.x + - osd.4 + - osd.5 + - osd.6 + - osd.7 + - client.1 + - prometheus.a + - grafana.a + - node-exporter.b diff --git a/qa/suites/orch/cephadm/upgrade/2-repo_digest/.qa b/qa/suites/orch/cephadm/upgrade/2-repo_digest/.qa new file mode 120000 index 000000000..a602a0353 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/2-repo_digest/.qa @@ -0,0 +1 @@ +../.qa/
\ No newline at end of file diff --git a/qa/suites/orch/cephadm/upgrade/2-repo_digest/defaut.yaml b/qa/suites/orch/cephadm/upgrade/2-repo_digest/defaut.yaml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/2-repo_digest/defaut.yaml diff --git a/qa/suites/orch/cephadm/upgrade/2-repo_digest/repo_digest.yaml b/qa/suites/orch/cephadm/upgrade/2-repo_digest/repo_digest.yaml new file mode 100644 index 000000000..2e6bbfd92 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/2-repo_digest/repo_digest.yaml @@ -0,0 +1,4 @@ +tasks: +- cephadm.shell: + mon.a: + - ceph config set mgr mgr/cephadm/use_repo_digest false --force diff --git a/qa/suites/orch/cephadm/upgrade/3-upgrade/.qa b/qa/suites/orch/cephadm/upgrade/3-upgrade/.qa new file mode 120000 index 000000000..a602a0353 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/3-upgrade/.qa @@ -0,0 +1 @@ +../.qa/
\ No newline at end of file diff --git a/qa/suites/orch/cephadm/upgrade/3-upgrade/simple.yaml b/qa/suites/orch/cephadm/upgrade/3-upgrade/simple.yaml new file mode 100644 index 000000000..f10a49bea --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/3-upgrade/simple.yaml @@ -0,0 +1,21 @@ +tasks: +- cephadm.shell: + env: [sha1] + mon.a: + # setup rgw + - radosgw-admin realm create --rgw-realm=r --default + - radosgw-admin zonegroup create --rgw-zonegroup=default --master --default + - radosgw-admin zone create --rgw-zonegroup=default --rgw-zone=z --master --default + - radosgw-admin period update --rgw-realm=r --commit + - ceph orch apply rgw foo --realm r --zone z --placement=2 --port=8000 + # simple rgw spec (will have no "spec" field) to make sure that works with rgw spec migration + - ceph orch apply rgw smpl + # setup iscsi + - ceph osd pool create foo + - rbd pool init foo + - ceph orch apply iscsi foo u p + - sleep 120 + - ceph config set mon mon_warn_on_insecure_global_id_reclaim false --force + - ceph config set mon mon_warn_on_insecure_global_id_reclaim_allowed false --force + - ceph config set global log_to_journald false --force + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 diff --git a/qa/suites/orch/cephadm/upgrade/3-upgrade/staggered.yaml b/qa/suites/orch/cephadm/upgrade/3-upgrade/staggered.yaml new file mode 100644 index 000000000..280714e4e --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/3-upgrade/staggered.yaml @@ -0,0 +1,132 @@ +tasks: +- cephadm.shell: + env: [sha1] + mon.a: + # setup rgw + - radosgw-admin realm create --rgw-realm=r --default + - radosgw-admin zonegroup create --rgw-zonegroup=default --master --default + - radosgw-admin zone create --rgw-zonegroup=default --rgw-zone=z --master --default + - radosgw-admin period update --rgw-realm=r --commit + - ceph orch apply rgw foo --realm r --zone z --placement=2 --port=8000 + # setup iscsi + - ceph osd pool create foo + - rbd pool init foo + - ceph orch apply iscsi foo u p + - sleep 180 + - ceph config set mon mon_warn_on_insecure_global_id_reclaim false --force + - ceph config set mon mon_warn_on_insecure_global_id_reclaim_allowed false --force + - ceph config set global log_to_journald false --force + # get some good info on the state of things pre-upgrade. Useful for debugging + - ceph orch ps + - ceph versions + - ceph -s + - ceph orch ls + # doing staggered upgrade requires mgr daemons being on a version that contains the staggered upgrade code + # until there is a stable version that contains it, we can test by manually upgrading a mgr daemon + - ceph orch daemon redeploy "mgr.$(ceph mgr dump -f json | jq .standbys | jq .[] | jq -r .name)" --image quay.ceph.io/ceph-ci/ceph:$sha1 + - ceph orch ps --refresh + - sleep 180 + # gather more possible debugging info + - ceph orch ps + - ceph versions + - ceph -s + - ceph health detail + # check that there are two different versions found for mgr daemon (which implies we upgraded one) + - ceph versions | jq -e '.mgr | length == 2' + - ceph mgr fail + - sleep 180 + # now try upgrading the other mgr + - ceph orch daemon redeploy "mgr.$(ceph mgr dump -f json | jq .standbys | jq .[] | jq -r .name)" --image quay.ceph.io/ceph-ci/ceph:$sha1 + - ceph orch ps --refresh + - sleep 180 + # gather more possible debugging info + - ceph orch ps + - ceph versions + - ceph health detail + - ceph -s + - ceph mgr fail + - sleep 180 + # gather more debugging info + - ceph orch ps + - ceph versions + - ceph -s + - ceph health detail + # now that both mgrs should have been redeployed with the new version, we should be back on only 1 version for the mgrs + - ceph versions | jq -e '.mgr | length == 1' + - ceph mgr fail + - sleep 180 + # debugging info + - ceph orch ps + - ceph orch ls + - ceph versions + # to make sure mgr daemons upgrade is fully completed, including being deployed by a mgr on a new version + # also serves as an early failure if manually upgrading the mgrs failed as --daemon-types won't be recognized + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --daemon-types mgr + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + # verify only one version found for mgrs and that their version hash matches what we are upgrading to + - ceph versions | jq -e '.mgr | length == 1' + - ceph versions | jq -e '.mgr | keys' | grep $sha1 + # verify overall we still see two versions, basically to make sure --daemon-types wasn't ignored and all daemons upgraded + - ceph versions | jq -e '.overall | length == 2' + # check that exactly two daemons have been upgraded to the new image (our 2 mgr daemons) + - ceph orch upgrade check quay.ceph.io/ceph-ci/ceph:$sha1 | jq -e '.up_to_date | length == 2' + - ceph orch upgrade status + - ceph health detail + # upgrade only the mons on one of the two hosts + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --daemon-types mon --hosts $(ceph orch ps | grep mgr.x | awk '{print $2}') + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + - ceph orch ps + # verify two different version seen for mons + - ceph versions | jq -e '.mon | length == 2' + - ceph orch upgrade status + - ceph health detail + # upgrade mons on the other hosts + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --daemon-types mon --hosts $(ceph orch ps | grep mgr.y | awk '{print $2}') + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + - ceph orch ps + # verify all mons now on same version and version hash matches what we are upgrading to + - ceph versions | jq -e '.mon | length == 1' + - ceph versions | jq -e '.mon | keys' | grep $sha1 + # verify exactly 5 daemons are now upgraded (2 mgrs, 3 mons) + - ceph orch upgrade check quay.ceph.io/ceph-ci/ceph:$sha1 | jq -e '.up_to_date | length == 5' + - ceph orch upgrade status + - ceph health detail + # upgrade exactly 2 osd daemons + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --daemon-types osd --limit 2 + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + - ceph orch ps + # verify two different versions now seen for osds + - ceph versions | jq -e '.osd | length == 2' + # verify exactly 7 daemons have been upgraded (2 mgrs, 3 mons, 2 osds) + - ceph orch upgrade check quay.ceph.io/ceph-ci/ceph:$sha1 | jq -e '.up_to_date | length == 7' + - ceph orch upgrade status + - ceph health detail + # upgrade one more osd + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --daemon-types crash,osd --limit 1 + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + - ceph orch ps + - ceph versions | jq -e '.osd | length == 2' + # verify now 8 daemons have been upgraded + - ceph orch upgrade check quay.ceph.io/ceph-ci/ceph:$sha1 | jq -e '.up_to_date | length == 8' + # upgrade the rest of the osds + - ceph orch upgrade status + - ceph health detail + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --daemon-types crash,osd + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + - ceph orch ps + # verify all osds are now on same version and version hash matches what we are upgrading to + - ceph versions | jq -e '.osd | length == 1' + - ceph versions | jq -e '.osd | keys' | grep $sha1 + - ceph orch upgrade status + - ceph health detail + # upgrade the rgw daemons using --services + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 --services rgw.foo + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; sleep 30 ; done + - ceph orch ps + # verify all rgw daemons on same version and version hash matches what we are upgrading to + - ceph versions | jq -e '.rgw | length == 1' + - ceph versions | jq -e '.rgw | keys' | grep $sha1 + - ceph orch upgrade status + - ceph health detail + # run upgrade one more time with no filter parameters to make sure anything left gets upgraded + - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1 diff --git a/qa/suites/orch/cephadm/upgrade/4-wait.yaml b/qa/suites/orch/cephadm/upgrade/4-wait.yaml new file mode 100644 index 000000000..4010c58ed --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/4-wait.yaml @@ -0,0 +1,16 @@ +tasks: +- cephadm.shell: + env: [sha1] + mon.a: + - while ceph orch upgrade status | jq '.in_progress' | grep true && ! ceph orch upgrade status | jq '.message' | grep Error ; do ceph orch ps ; ceph versions ; ceph orch upgrade status ; ceph health detail ; sleep 30 ; done + - ceph orch ps + - ceph versions + - echo "wait for servicemap items w/ changing names to refresh" + - sleep 60 + - ceph orch ps + - ceph versions + - ceph orch upgrade status + - ceph health detail + - ceph versions | jq -e '.overall | length == 1' + - ceph versions | jq -e '.overall | keys' | grep $sha1 + - ceph orch ls | grep '^osd ' diff --git a/qa/suites/orch/cephadm/upgrade/5-upgrade-ls.yaml b/qa/suites/orch/cephadm/upgrade/5-upgrade-ls.yaml new file mode 100644 index 000000000..799458bc5 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/5-upgrade-ls.yaml @@ -0,0 +1,6 @@ +tasks: +- cephadm.shell: + mon.a: + - ceph orch upgrade ls + - ceph orch upgrade ls --image quay.io/ceph/ceph --show-all-versions | grep 16.2.0 + - ceph orch upgrade ls --image quay.io/ceph/ceph --tags | grep v16.2.2 diff --git a/qa/suites/orch/cephadm/upgrade/agent b/qa/suites/orch/cephadm/upgrade/agent new file mode 120000 index 000000000..154924209 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/agent @@ -0,0 +1 @@ +../smoke/agent
\ No newline at end of file diff --git a/qa/suites/orch/cephadm/upgrade/mon_election b/qa/suites/orch/cephadm/upgrade/mon_election new file mode 120000 index 000000000..3f331e621 --- /dev/null +++ b/qa/suites/orch/cephadm/upgrade/mon_election @@ -0,0 +1 @@ +.qa/mon_election
\ No newline at end of file |