Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: test rgw multisite nightly #8931

Merged
merged 1 commit into from Nov 25, 2021

Conversation

BlaineEXE
Copy link
Member

@BlaineEXE BlaineEXE commented Oct 6, 2021

Description of your changes:

In the nightly job, run the test with the latest Ceph version so we can
detect if there are RGW changes in Ceph that might break multisite. Use
a reusable GitHub action workflow to duplicate as little code as
possible.

Which issue is resolved by this Pull Request:
Resolves #

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

@BlaineEXE BlaineEXE changed the title Test rgw multisite in nightly tests WIP: test: test rgw multisite nightly Oct 6, 2021
@BlaineEXE BlaineEXE added the do-not-merge DO NOT MERGE :) label Oct 6, 2021
@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch 18 times, most recently from cced94f to 37855ed Compare October 6, 2021 22:47
@BlaineEXE BlaineEXE changed the title WIP: test: test rgw multisite nightly test: test rgw multisite nightly Oct 6, 2021
@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch 5 times, most recently from fb082d4 to cb6992c Compare October 6, 2021 23:45
@BlaineEXE BlaineEXE marked this pull request as ready for review October 6, 2021 23:45
@BlaineEXE BlaineEXE requested review from travisn and leseb and removed request for travisn October 6, 2021 23:45
@BlaineEXE BlaineEXE requested a review from travisn October 6, 2021 23:46
@BlaineEXE BlaineEXE added test unit or integration testing and removed do-not-merge DO NOT MERGE :) labels Oct 6, 2021
Comment on lines 28 to 29
minikube version: 'v1.18.1'
kubernetes version: 'v1.19.2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use latest version

Suggested change
minikube version: 'v1.18.1'
kubernetes version: 'v1.19.2'
minikube version: 'v1.23.2'
kubernetes version: 'v1.22.2'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the versions as copied from the canary.yml test. Should these really be changed?

Comment on lines 62 to 68
cd cluster/examples/kubernetes/ceph/
IP_ADDR=$(kubectl -n rook-ceph get svc rook-ceph-rgw-multisite-store -o jsonpath="{.spec.clusterIP}")
yq w -i -d1 object-multisite-pull-realm-test.yaml spec.pull.endpoint http://${IP_ADDR}:80
BASE64_ACCESS_KEY=$(kubectl -n rook-ceph get secrets realm-a-keys -o jsonpath="{.data.access-key}")
BASE64_SECRET_KEY=$(kubectl -n rook-ceph get secrets realm-a-keys -o jsonpath="{.data.secret-key}")
sed -i 's/VzFjNFltMVdWRTFJWWxZelZWQT0=/'"$BASE64_ACCESS_KEY"'/g' object-multisite-pull-realm-test.yaml
sed -i 's/WVY1MFIxeExkbG84U3pKdlRseEZXVGR3T3k1U1dUSS9KaTFoUVE9PQ==/'"$BASE64_SECRET_KEY"'/g' object-multisite-pull-realm-test.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we write a new helper function and use it here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code isn't reused anywhere else, so I think it's fine here.

Comment on lines 93 to 101
ns_name_primary='"rook-ceph/multisite-store"' # double quotes intended
ns_name_secondary='"rook-ceph-secondary/zone-b-multisite-store"' # double quotes intended
committed_msg="committing changes to RGW configuration period for CephObjectStore"
tests/scripts/github-action-helper.sh verify_operator_log_message "${committed_msg} ${ns_name_primary}"
tests/scripts/github-action-helper.sh verify_operator_log_message "${committed_msg} ${ns_name_secondary}"
tests/scripts/github-action-helper.sh restart_operator
not_committed_msg="there are no changes to commit for RGW configuration period for CephObjectStore"
tests/scripts/github-action-helper.sh wait_for_operator_log_message "${not_committed_msg} ${ns_name_primary}" 120
tests/scripts/github-action-helper.sh wait_for_operator_log_message "${not_committed_msg} ${ns_name_secondary}" 90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we write a new helper function and use it here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not reused, so I think it's fine. The things that do get reused and would be useful outside of this (verify_operator_log_message and wait_for_operator_log_message) are already helpers.

.github/workflows/daily-nightly-canary.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,101 @@
name: RGW Multisite Test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see we start using composite :)

@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch 2 times, most recently from 9b590c3 to a0c2c58 Compare October 7, 2021 18:00
@mergify
Copy link

mergify bot commented Oct 12, 2021

This pull request has merge conflicts that must be resolved before it can be merged. @BlaineEXE please rebase it. https://rook.io/docs/rook/latest/development-flow.html#updating-your-fork

@leseb
Copy link
Member

leseb commented Nov 8, 2021

Looks like #8911 has merged. @BlaineEXE any plan to resume? Thanks!

@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch 3 times, most recently from 6bb7e01 to c4b6007 Compare November 11, 2021 00:59
@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch from c4b6007 to 490e66b Compare November 11, 2021 01:02
@BlaineEXE
Copy link
Member Author

@subhamkrai do you want to take a look and make sure my usage of the new setup-cluster-resources is correct?

@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch 5 times, most recently from e75ab73 to 99cdb03 Compare November 15, 2021 18:37
- name: wait for ceph cluster 1 to be ready
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
mkdir test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why create this dir?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think validate_cluster.sh used to write data into test/. That's probably a carryover from then that I can remove.

using: "composite"
steps:
- name: setup cluster resources
uses: ./.github/workflows/setup-cluster-resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this look good to me

In the nightly job, run the test with the latest Ceph version so we can
detect if there are RGW changes in Ceph that might break multisite. Use
a reusable GitHub action workflow to duplicate as little code as
possible.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
@BlaineEXE BlaineEXE force-pushed the test-rgw-multisite-in-nightly-tests branch from 99cdb03 to e803686 Compare November 19, 2021 16:56
Copy link
Contributor

@subhamkrai subhamkrai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some nits if you want to address them...

function replace_ceph_image() {
local file="$1" # parameter 1: the file in which to replace the ceph image
local ceph_image="${2:-}" # parameter 2: the new ceph image to use
if [[ -z ${ceph_image} ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need double brackets when calling -z which is an argument from the test command.

local ceph_image="${2:-}" # parameter 2: the new ceph image to use
if [[ -z ${ceph_image} ]]; then
echo "No Ceph image given. Not adjusting manifests."
return 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is implied but it doesn't hurt to explicitly have it...

@leseb leseb merged commit ad2c3c2 into rook:master Nov 25, 2021
@BlaineEXE BlaineEXE deleted the test-rgw-multisite-in-nightly-tests branch November 30, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ceph-rgw test unit or integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants