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

WINC-950: WMCO bundle upgrade testing #39585

Merged
merged 1 commit into from Jul 19, 2023

Conversation

sebsoto
Copy link
Contributor

@sebsoto sebsoto commented May 22, 2023

Adds a job that upgrades from the WMCO released for the previous
OpenShift minor version, to the WMCO being tested. This is being marked
as not required. Once the job is fully functional, after changes to the
WMCO repo, this job will be made required and the already existing
upgrade job will be removed.

This job is split into 4 test steps

  1. Install WMCO built for the previous OCP minor version.
  2. Run initial tests against that WMCO using the
    upgrade-test-setup make target, creating Windows Nodes.
  3. Upgrade WMCO to the version which is built from the code this job is
    testing, this causes those Windows nodes to be upgraded from the
    previous version to the current version.
  4. Run tests using the upgrade-test make target, testing that the Node
    upgrade was successful.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 22, 2023
@sebsoto
Copy link
Contributor Author

sebsoto commented May 22, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 22, 2023
@sebsoto
Copy link
Contributor Author

sebsoto commented May 22, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 23, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

2 similar comments
@sebsoto
Copy link
Contributor Author

sebsoto commented May 23, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 23, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 24, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

2 similar comments
@sebsoto
Copy link
Contributor Author

sebsoto commented May 24, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 25, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 25, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

1 similar comment
@sebsoto
Copy link
Contributor Author

sebsoto commented May 25, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 25, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

1 similar comment
@sebsoto
Copy link
Contributor Author

sebsoto commented May 26, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 26, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 26, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 28, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented May 30, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@openshift-bot
Copy link
Contributor

Issues in openshift/release go stale after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 15d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@sebsoto
Copy link
Contributor Author

sebsoto commented Jul 18, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

pod-security.kubernetes.io/enforce=privileged
# Deploy the bundle which will fail to come up due to it using the operator image via a tag that is not able to
# be made public. The csv needs to be patched to point the image via the tag that is pullable by the job.
operator-sdk run bundle --timeout=10m --security-context-config restricted -n $WMCO_NS "$PREVIOUS_BUNDLE" \
Copy link
Contributor

Choose a reason for hiding this comment

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

will this hit the 10 min timeout every time?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can't you patch the CSV first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The timeout will not be hit as there is an issue in operator-sdk which will not respect the timeout parameter correctly. operator-framework/operator-sdk#6440

operator-sdk run bundle --timeout=10m --security-context-config restricted -n $WMCO_NS "$OLD_BUNDLE" \
|| oc get csv -n $WMCO_NS |awk {'print $1'} | tail -n1 | xargs oc patch csv -n $WMCO_NS --type='json' -p="[{\"op\": \"replace\", \"path\": \"/spec/install/spec/deployments/0/spec/template/spec/containers/0/image\", \"value\": \"$OLD_OPERATOR\"}]"
sleep 10
oc delete deployment -n $WMCO_NS windows-machine-config-operator
Copy link
Contributor

Choose a reason for hiding this comment

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

I though the deployment automatically gets deleted + re-created by olm after patching the csv? Or is this done to speed up the process

pod-security.kubernetes.io/enforce=privileged
# Deploy the bundle which will fail to come up due to it using the operator image via a tag that is not able to
# be made public. The csv needs to be patched to point the image via the tag that is pullable by the job.
operator-sdk run bundle --timeout=10m --security-context-config restricted -n $WMCO_NS "$PREVIOUS_BUNDLE" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't you patch the CSV first?

sleep 10
# Delete the deployment which will then be recreated by the subscription controller with the correct image
oc delete deployment -n $WMCO_NS windows-machine-config-operator
sleep 5m
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need the sleep given the wait below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I dont remember and don't think its actually required. Removing and hoping it works in the pj-rehearse

# be made public. The csv needs to be patched to point the image via the tag that is pullable by the job.
operator-sdk run bundle --timeout=10m --security-context-config restricted -n $WMCO_NS "$PREVIOUS_BUNDLE" \
|| oc get csv -n $WMCO_NS |awk {'print $1'} | tail -n1 | xargs oc patch csv -n $WMCO_NS --type='json' \
-p="[{\"op\": \"replace\", \"path\": \"/spec/install/spec/deployments/0/spec/template/spec/containers/0/image\", \"value\": \"$PREVIOUS_OPERATOR\"}]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does $PREVIOUS_BUNDLE and $PREVIOUS_OPERATOR get set?

@sebsoto
Copy link
Contributor Author

sebsoto commented Jul 18, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

export WMCO_NS=openshift-windows-machine-config-operator
operator-sdk run bundle-upgrade --timeout=10m --security-context-config restricted -n $WMCO_NS "$OO_BUNDLE"
sleep 5m
oc wait --timeout=5m --for condition=Available -n openshift-windows-machine-config-operator deployment windows-machine-config-operator
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
oc wait --timeout=5m --for condition=Available -n openshift-windows-machine-config-operator deployment windows-machine-config-operator
oc wait --timeout=5m --for condition=Available -n $WMCO_NS deployment windows-machine-config-operator

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 18, 2023
@sebsoto
Copy link
Contributor Author

sebsoto commented Jul 19, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
Adds a job that upgrades from the WMCO released for the previous
OpenShift minor version, to the WMCO being tested. This is being marked
as not required. Once the job is fully functional, after changes to the
WMCO repo, this job will be made required and the already existing
upgrade job will be removed.

This job is following this documented workflow:
https://docs.ci.openshift.org/docs/how-tos/testing-operator-sdk-operators/#operator-upgrade-testing

Because of undocumented limitations of the ci-operator the "old-bundle"
needs to be patched to use the proper image. The "old bundle" points to
an operator image via a tag that is not able to be made public. This is
why both old-bundle and old-wmco need to be imported through the
base-images section of the config.

The job file was generated from the config file through `make update`.

This job is split into 4 test steps
1) Install WMCO built for the previous OCP minor version.
2) Run initial tests against that WMCO using the
   `upgrade-test-setup` make target, creating Windows Nodes.
3) Upgrade WMCO to the version which is built from the code this job is
   testing, this causes those Windows nodes to be upgraded from the
   previous version to the current version.
4) Run tests using the `upgrade-test` make target, testing that the Node
   upgrade was successful.
@openshift-ci-robot
Copy link
Contributor

[REHEARSALNOTIFIER]
@sebsoto: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade openshift/windows-machine-config-operator presubmit Presubmit changed
pull-ci-openshift-windows-machine-config-operator-master-aws-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-aws-e2e-upgrade openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-azure-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-build openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-ci-index-wmco-bundle openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-gcp-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-images openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-lint openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-nutanix-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-platform-none-vsphere-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-unit openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-vsphere-proxy-e2e-operator openshift/windows-machine-config-operator presubmit Ci-operator config changed
pull-ci-openshift-windows-machine-config-operator-master-wicd-unit-vsphere openshift/windows-machine-config-operator presubmit Ci-operator config changed
periodic-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-ccm-install N/A periodic Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 10 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 20 rehearsals
Comment: /pj-rehearse max to run up to 35 rehearsals
Comment: /pj-rehearse auto-ack to run up to 10 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@sebsoto
Copy link
Contributor Author

sebsoto commented Jul 19, 2023

/pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

@sebsoto
Copy link
Contributor Author

sebsoto commented Jul 19, 2023

/pj-rehearse ack

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 19, 2023
@saifshaikh48
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aravindhp, saifshaikh48

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2023

@sebsoto: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/build-farm/build04-dry c55a405cdb71cb634ad07d2f68d66df2dcea26fe link true /test build04-dry
ci/rehearse/openshift/windows-machine-config-operator/master/vsphere-e2e-upgrade 88c62a9 link unknown /pj-rehearse pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-upgrade

Full PR test history. Your PR dashboard.

Instructions 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.

@openshift-merge-robot openshift-merge-robot merged commit 429f829 into openshift:master Jul 19, 2023
18 of 19 checks passed
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2023

@sebsoto: Updated the following 2 configmaps:

  • ci-operator-master-configs configmap in namespace ci at cluster app.ci using the following files:
    • key openshift-windows-machine-config-operator-master.yaml using file ci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-master.yaml
  • job-config-master-presubmits configmap in namespace ci at cluster app.ci using the following files:
    • key openshift-windows-machine-config-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-master-presubmits.yaml

In response to this:

Adds a job that upgrades from the WMCO released for the previous
OpenShift minor version, to the WMCO being tested. This is being marked
as not required. Once the job is fully functional, after changes to the
WMCO repo, this job will be made required and the already existing
upgrade job will be removed.

This job is split into 4 test steps

  1. Install WMCO built for the previous OCP minor version.
  2. Run initial tests against that WMCO using the
    upgrade-test-setup make target, creating Windows Nodes.
  3. Upgrade WMCO to the version which is built from the code this job is
    testing, this causes those Windows nodes to be upgraded from the
    previous version to the current version.
  4. Run tests using the upgrade-test make target, testing that the Node
    upgrade was successful.

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged
Projects
None yet
6 participants