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

Add openstack_crds_cleanup and openstack_patch_version target #964

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Dec 4, 2024

  • The openstack_crds_cleanup target allows to remove all openstack related CRDs from an environment. All deployments need to be deleted before.

  • The openstack_patch_version target patches the OpenstackVersion target version to be the avaliable version to trigger an update.

With this an operator update (reinstall) and a deployment update can be tested using this procedure:

make openstack_crds_cleanup
OPENSTACK_IMG=quay.io/openstack-k8s-operators/openstack-operator-index:123 make openstack_wait
TIMEOUT=600s make openstack_wait_deploy
make openstack_cleanup
make openstack_wait
make openstack_patch_version

TODO:
add targets to perform edpm deploy/update (ovn controller and final service update)

Depends-On: openstack-k8s-operators/openstack-operator#1217

* The openstack_crds_cleanup target allows to remove all openstack
related CRDs from an environment. All deployments need to be
deleted before.

* The openstack_patch_version target patches the OpenstackVersion
target version to be the avaliable version to trigger an update.

With this an operator update (reinstall) and a deployment update
can be tested using this procedure:

~~~
make openstack_crds_cleanup
OPENSTACK_IMG=quay.io/openstack-k8s-operators/openstack-operator-index:123 make openstack_wait
TIMEOUT=600s make openstack_wait_deploy
make openstack_cleanup
make openstack_wait
make openstack_patch_version
~~~

TODO:
add targets to perform edpm deploy/update (ovn controller update
and final service update)

Depends-On: openstack-k8s-operators/openstack-operator#1217

Signed-off-by: Martin Schuppert <[email protected]>
Copy link

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1217 is needed.

.PHONY: openstack_patch_version
openstack_patch_version: ## patches the openstackversion target version to the available version, if there is an update available
$(eval $(call vars,$@,openstack))
oc wait -n ${NAMESPACE} ${OV} --for=condition=MinorUpdateAvailable --timeout=${TIMEOUT} && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we strictly need this new condition to implement upgrade testing. If we add it we'll have it on main, but not on the FR1 maintenance branch so we won't be able to use the job there.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is enough to just check that the new catalog/index is deployed and that OpenStackVersion is in a ReadyCondition True state. Then if targetVersion != availableVersion you'd know there is an update (and this is shown clearly on the CLI too)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as mentioned in the other PR, it just makes it a lot easier and it we can backport it. I'd say its a simple change and could be useful for any automation (also done by customers)

@stuggi
Copy link
Contributor Author

stuggi commented Dec 5, 2024

recheck

Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprince, stuggi

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-merge-bot openshift-merge-bot bot merged commit 8a13398 into openstack-k8s-operators:main Dec 10, 2024
5 checks passed
@stuggi
Copy link
Contributor Author

stuggi commented Dec 21, 2024

/cherry-pick 18.0-fr1

@openshift-cherrypick-robot

@stuggi: new pull request created: #992

In response to this:

/cherry-pick 18.0-fr1

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants