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
test: test rgw multisite nightly #8931
Conversation
cced94f
to
37855ed
Compare
fb082d4
to
cb6992c
Compare
minikube version: 'v1.18.1' | ||
kubernetes version: 'v1.19.2' |
There was a problem hiding this comment.
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
minikube version: 'v1.18.1' | |
kubernetes version: 'v1.19.2' | |
minikube version: 'v1.23.2' | |
kubernetes version: 'v1.22.2' |
There was a problem hiding this comment.
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?
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@@ -0,0 +1,101 @@ | |||
name: RGW Multisite Test |
There was a problem hiding this comment.
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 :)
9b590c3
to
a0c2c58
Compare
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 |
Looks like #8911 has merged. @BlaineEXE any plan to resume? Thanks! |
6bb7e01
to
c4b6007
Compare
c4b6007
to
490e66b
Compare
@subhamkrai do you want to take a look and make sure my usage of the new |
e75ab73
to
99cdb03
Compare
- name: wait for ceph cluster 1 to be ready | ||
shell: bash --noprofile --norc -eo pipefail -x {0} | ||
run: | | ||
mkdir test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why create this dir?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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>
99cdb03
to
e803686
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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...
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:
make codegen
) has been run to update object specifications, if necessary.