-
Notifications
You must be signed in to change notification settings - Fork 2.1k
WIP: Add baremetalds-e2e-upgrade-workflow #11436
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
Conversation
Signed-off-by: Eran Israeli <eisraeli@redhat.com>
|
Skipping CI for Draft Pull Request. |
ci-operator/step-registry/baremetalds/e2e/upgrade/baremetalds-e2e-upgrade-workflow.yaml
Show resolved
Hide resolved
Fork update
https://issues.redhat.com/browse/KNIECO-2257 Signed-off-by: Eran Israeli <eisraeli@redhat.com>
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| echo "************ baremetalds e2e upgrade test command ************" No newline at end of file |
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 step is no needed, openshift-e2e-test has it
| - ref: baremetalds-devscripts-gather | ||
| # - ref: baremetalds-packet-teardown | ||
| env: | ||
| TEST_SUITE: "all" |
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 would override openshift-e2e-test TEST_SUITE, its not required
| @@ -0,0 +1,50 @@ | |||
| #!/bin/bash | |||
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 file is not required - openshift-e2e-test handles that
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.
It is not possible to use the openshift-e2e-test in the current workflow since we're using a different cluster profile (packet) and dev-scripts to setup remotely the cluster (see baremetalds-devscript-setup step). @eisraeli I think anyhow that it could be worth reusing the same approach in baremetalds-e2e-test step, ie running upgrade tests if a variable is set, in order to have a single test step for the baremetal workflow.
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.
openshift-e2e-tests reads KUBECONFIG and doesn't need direct access to the cluster
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.
It appears that the current implementation support packet profile (see
release/ci-operator/step-registry/openshift/e2e/test/openshift-e2e-test-commands.sh
Line 51 in 1d793ed
| *) echo >&2 "Unsupported cluster type '${CLUSTER_TYPE}'"; exit 1;; |
dev-scripts in the remote packet instance (Line 99 in 1d793ed
| echo 'export KUBECONFIG=/root/dev-scripts/ocp/ostest/auth/kubeconfig' >> /root/.bashrc |
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'd have to add support for it then. I don't think it has any specific flags, you'd need to reuse existing legacy templates.
currently our KUBECONFIG points to a file generated by dev-scripts in the remote packet instance
Copy it to ${SHARED_DIR} - AWS install does that:
cp \
-t "${SHARED_DIR}" \
"${dir}/auth/kubeconfig" \
"${dir}/metadata.json"
Moreover, I would not recommend such refactoring within the scope of the current PR.
This is necessary for this PR to land and be approved by OTA team
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 API server is not accessible remotely
I'm not seeing any tricks to access it in this commit. If packet requires any I suppose we can fork the upgrade test step, but that is very undesirable and goes against the whole purpose of multistep testing.
What is the OTA team?
Team taking care of upgrades, including CI upgrade tests.
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 API server is not accessible remotely
I'm not seeing any tricks to access it in this commit. If packet requires any I suppose we can fork the upgrade test step, but that is very undesirable and goes against the whole purpose of multistep testing.
What do you mean? It's not about Packet. It's because we save significant amounts of money by running baremetal clusters through emulated baremetal with libvirt + vbmc/sushy-tools. The cluster is contained within the libvirt networks on the host, therefore the API is not exposed on the public IP. Maybe we could do it with some iptables/xinetd trickery, but we haven't looked into that yet.
The entire purpose of baremetalds-e2e-upgrade-test-commands is that it runs the e2e-tests suites by SSH'ing to the host. I agree about mulisteps tests should be useful for everyone, and in fact the baremetalds workflows existed long before any other platforms did, and when it came time to create the ipi, upgrade, etc steps our specific use cases weren't considered so most of our steps remained special.
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 cluster is contained within the libvirt networks on the host, therefore the API is not exposed on the public IP
This workflow would create pods on api.ci / build01 / build02 CI cluster. How would they reach the created cluster?
This should should not hardcode the release, it should not use oc adm upgrade or any other home-grown way to upgrade the cluster. It should use openshift-tests run-upgrade --to-image=${OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE}
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.
- They do not reach directly the cluster, all the operations are ssh'ed to the target Packet host that is currently containing the newly spawned cluster
- We are in sync to not hardcode the release: when Eran started the activity the feature was not yet available for the multistage tests (the PR is still a draft)
- The goal is to run an
oc adm upgrade- or any other standard test command that will perform the upgrade on the target cluster (ie like theopenshift-tests run-upgradeyou suggested I suppose)
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.
Ah, okay, that was my concern - upgrade should happen via openshift-tests run-upgrade. This test should be able to reach the target host via ssh (iiuc its already implemented in templates)
Signed-off-by: Eran Israeli <eisraeli@redhat.com>
Update fork
| openshift-tests "${TEST_COMMAND}" "${TEST_SUITE}" ${TEST_ARGS:-} \ | ||
| # --provider "${TEST_PROVIDER}" \ | ||
| -o /tmp/artifacts/e2e.log \ | ||
| --junit-dir /tmp/artifacts/junit |
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.
It seems that such logic should be merged within the existing baremetalds-e2e-test command, which already performs some work for filtering and reporting results (probably just reusing ${TEST_COMMAND} could be enough).
In this way, during the upgrade workflow, only the upgrade tests will be executed by the workflow test step, without the need of an additional dedicated step.
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.
Yeah, it definitely should be merged with the existing openshift-e2e-test command at some point.
As you indicated before here:
https://github.com/openshift/release/pull/11436/files#r489434008
baremetal-e2e-test command currently does not support packet ATM.
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 in that comment https://github.com/openshift/release/pull/11436/files#r489434008 I was referring another step (openshift-e2e-test) defined outside the baremetalds workflow.
The baremetads-e2e-test instead it's the step currently being executed by the baremetalds workflow, and it's one that will require to be modified to accommodate upgrade tests execution
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.
Sorry. I guess I misread that.
For some reason I was thinking of openshift-e2e-test while you referring to baremetalds-e2e-test
|
|
||
| echo "Finished upgrading from version $original_version to version $upgrade_version_label !" | ||
|
|
||
| END |
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 entire command could be removed
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.
Are you referring to the commented out section which used 'oc adm upgrade' ? - I removed it.
baremetalds-e2e-upgrade-upgrade-commands.sh now contains only the 'openshift-tests run-upgrade' command.
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.
See my previous comment, about reusing the baremetalds-e2e-test step for executing upgrade tests (and reporting correctly back the results). This will align our execution model also with the ones of the other cluster profiles.
ci-operator/step-registry/baremetalds/e2e/upgrade/upgrade/OWNERS
Outdated
Show resolved
Hide resolved
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eisraeli The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| Name of the CSI driver manifest file to use. Used by the `openshift-tests` | ||
| program as TEST_CSI_DRIVER_FILES env. var., see its documentation for | ||
| details. The file must be present in ${SHARED_DIR}. | ||
| 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.
| resources: | |
| dependencies: | |
| - name: "release:latest" | |
| env: OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE | |
| resources: |
See https://github.com/openshift/release/blob/master/ci-operator/step-registry/openshift/e2e/test/openshift-e2e-test-ref.yaml#L27-L29 - this sets env var with the release used to upgrade. In the periodic job external script would create release:latest and release:initial
| echo "${TESTS}" | grep "${TEST_SKIPS}" | ||
| TEST_ARGS="${TEST_ARGS:-} --file /tmp/tests" | ||
| fi | ||
|
|
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.
| if -n "${OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE}" ]]; then | |
| # OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE is a pullspec of release:latest imagestreamtag | |
| TEST_ARGS="${TEST_ARGS:-} --to-image=${OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE}" | |
| fi | |
Signed-off-by: Eran Israeli <eisraeli@redhat.com>
|
@eisraeli: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@eisraeli: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Did some cleanup on this draft and decided to submit a fresh PR |
https://issues.redhat.com/browse/KNIECO-2257
Signed-off-by: Eran Israeli eisraeli@redhat.com