-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Test metal ipi upgrade #13120
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 metal ipi upgrade #13120
Changes from all commits
47ff7d3
88efe33
4caa842
3f46851
e56263a
d951049
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
| set -x | ||
|
|
||
| echo "************ baremetalds test command ************" | ||
|
|
||
|
|
@@ -28,25 +29,64 @@ IP=$(cat "${SHARED_DIR}/server-ip") | |
|
|
||
| SSHOPTS=(-o 'ConnectTimeout=5' -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -o 'ServerAliveInterval=90' -i "${CLUSTER_PROFILE_DIR}/.packet-kni-ssh-privatekey") | ||
|
|
||
| collect_artifacts() { | ||
| echo "### Fetching results" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" tar -czf - /tmp/artifacts | tar -C "${ARTIFACT_DIR}" -xzf - | ||
| } | ||
| trap collect_artifacts EXIT | ||
|
|
||
| # Copy test binaries on packet server | ||
| echo "### Copying test binaries" | ||
| scp "${SSHOPTS[@]}" /usr/bin/openshift-tests /usr/bin/kubectl "root@${IP}:/usr/local/bin" | ||
|
|
||
| # Tests execution | ||
| set +e | ||
| if [[ -s "${SHARED_DIR}/test-list" ]]; then | ||
| echo "### Copying test-list file" | ||
| scp "${SSHOPTS[@]}" "${SHARED_DIR}/test-list" "root@${IP}:/tmp/test-list" | ||
| echo "### Running tests" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" openshift-tests run "openshift/conformance/parallel" --dry-run \| grep -Ff /tmp/test-list \|openshift-tests run -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit -f - | ||
|
|
||
| # Test upgrade for workflows that requested it | ||
| if [[ "$RUN_UPGRADE_TEST" == true ]]; then | ||
| echo "### Running Upgrade tests" | ||
| timeout \ | ||
| --kill-after 10m \ | ||
| 120m \ | ||
| ssh \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If not required anymore, could this timeout be removed (there will be also the CI default one for the job)?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to keep it just in case other issues will cause the code to get stuck. In this case, it would be good to have the logs. |
||
| "${SSHOPTS[@]}" \ | ||
| "root@${IP}" \ | ||
| openshift-tests \ | ||
| run-upgrade \ | ||
| --to-image "$OPENSHIFT_UPGRADE_RELEASE_IMAGE" \ | ||
| -o /tmp/artifacts/e2e-upgrade.log \ | ||
| --junit-dir /tmp/artifacts/junit-upgrade \ | ||
| platform | ||
| else | ||
| echo "### Running tests" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" openshift-tests run "openshift/conformance/parallel" --dry-run \| grep 'Feature:ProjectAPI' \| openshift-tests run -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit -f - | ||
| if [[ -s "${SHARED_DIR}/test-list" ]]; then | ||
| echo "### Copying test-list file" | ||
| scp \ | ||
| "${SSHOPTS[@]}" \ | ||
| "${SHARED_DIR}/test-list" \ | ||
| "root@${IP}:/tmp/test-list" | ||
| echo "### Running tests" | ||
| ssh \ | ||
| "${SSHOPTS[@]}" \ | ||
| "root@${IP}" \ | ||
| openshift-tests \ | ||
| run \ | ||
| "openshift/conformance/parallel" \ | ||
| --dry-run \ | ||
| \| grep -Ff /tmp/test-list \|openshift-tests run -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit -f - | ||
| else | ||
| echo "### Running tests" | ||
| ssh \ | ||
| "${SSHOPTS[@]}" \ | ||
| "root@${IP}" \ | ||
| openshift-tests \ | ||
| run \ | ||
| "openshift/conformance/parallel" \ | ||
| --dry-run \ | ||
| \| grep 'Feature:ProjectAPI' \| openshift-tests run -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit -f - | ||
| fi | ||
| fi | ||
| rv=$? | ||
|
|
||
| echo "### Fetching results" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" tar -czf - /tmp/artifacts | tar -C "${ARTIFACT_DIR}" -xzf - | ||
| rv=$? | ||
|
|
||
| set -e | ||
| echo "### Done! (${rv})" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| approvers: | ||
| - eisraeli | ||
| - andfasano | ||
| - akiselev1 | ||
| - derekhiggins | ||
| - honza | ||
| - stbenjam |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "path": "baremetalds/e2e/upgrade/baremetalds-e2e-upgrade-workflow.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "eisraeli", | ||
| "andfasano", | ||
| "akiselev1", | ||
| "derekhiggins", | ||
| "honza", | ||
| "stbenjam" | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| workflow: | ||
| as: baremetalds-e2e-upgrade | ||
| steps: | ||
| allow_skip_on_success: true | ||
| pre: | ||
| - ref: baremetalds-packet-setup | ||
| - ref: ipi-install-rbac | ||
| - ref: baremetalds-devscripts-setup | ||
| test: | ||
| - ref: baremetalds-e2e-conf | ||
| - ref: baremetalds-e2e-test | ||
| post: | ||
| - ref: baremetalds-devscripts-gather | ||
| - ref: baremetalds-packet-teardown | ||
| env: | ||
| RUN_UPGRADE_TEST: "true" | ||
| dependencies: | ||
| OPENSHIFT_INSTALL_RELEASE_IMAGE: release:initial | ||
| documentation: |- | ||
| This workflow executes the common end-to-end upgrade test suite on a cluster provisioned by running dev-scripts on a packet server. |
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.
The check it's ok, anyhow I'd suggest to follow an approach similar to the one in #12959 (to be as much as possible similar to the ones adopted by the other profiles) where possible, ie making a check directly against
OPENSHIFT_UPGRADE_RELEASE_IMAGEas in https://github.com/openshift/release/blob/d4f03b5848e88d409f6b0cac7ec205f47530e07b/ci-operator/step-registry/openshift/e2e/test/openshift-e2e-test-commands.sh#L75 (we'll save one var)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 thought about this approach, the problem is that
OPENSHIFT_UPGRADE_RELEASE_IMAGEwill always be non-empty since the step specifies it as a dependency, so I've needed a new variable.From where the
TEST_COMMANDvariable comes from? I didn't see it in any of the templates.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.
Yes, I think that's a sanity check (always expected to be not empty). They've defined
TEST_COMMANDas a normal env var in the openshift-e2e-test.In our case we've the additional requirement to filter our some of the conformance tests (in the case of installation test), checking the current value of
TEST_COMMANDcould help in crafting properly the various pieces required byopenshift-tests(the command itself, additional options such as--to-imageand the filter list)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.
Currently, https://github.com/openshift/release/pull/13120/files#diff-7b4946fc316154f2f0fe2beac2371cf82bc14d8071298890e8a014417e88159f doesn't use the
TEST_COMMANDvariable. If we want to use it, I would request to do it in a different PR.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'd prefer to adopt it if possible in the current PR, so that also the code duplication will be removed. If not, it's ok to address it in another PR.