openstack-k8s-operators / openstack-operator

Meta Operator for OpenStack
https://openstack-k8s-operators.github.io/openstack-operator/
Apache License 2.0
27 stars 76 forks source link

[OSPRH-9371] Fix VerifySecret so it requeues when necessary #1002

Closed abays closed 1 month ago

abays commented 1 month ago

We've come to realize three things recently:

  1. Returning an error to the reconciler along with a RequeueAfter will cause the reconciler to abandon the explicit requeue and only consider the error [1].
  2. The VerifySecret function in lib-common was returning an error along with a requeue, thus contributing to the problem listed in item 1. [2]
  3. Also, the error VerifySecret was returning was not a "not found" error, but a generic k8s error -- so it wouldn't be properly handled by callers looking for a "not found" error. [3]

Now VerifySecret only returns a non-empty ctrl.Result{} if the Secret is missing. [4]

Jira: https://issues.redhat.com/browse/OSPRH-9371

[1] https://github.com/openstack-k8s-operators/keystone-operator/pull/459 [2] https://github.com/openstack-k8s-operators/lib-common/blob/ad3edb6e67ab738cfdbf4e2e78ac403784a08ab7/modules/common/secret/secret.go#L423-L425 [3] https://github.com/openstack-k8s-operators/lib-common/blob/ad3edb6e67ab738cfdbf4e2e78ac403784a08ab7/modules/common/secret/secret.go#L425 [4] https://github.com/openstack-k8s-operators/lib-common/blob/579da98fa7a62b70b43cdba92e82d6497afe8835/modules/common/secret/secret.go#L425-L427

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, fao89

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: - ~~[OWNERS](https://github.com/openstack-k8s-operators/openstack-operator/blob/main/OWNERS)~~ [abays,fao89] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
abays commented 1 month ago

@abays: The following test 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/prow/openstack-operator-build-deploy-kuttl 74dcef6 link unknown /test openstack-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

error: build error: Failed to push image: trying to reuse blob sha256:247c2d03e9487628cb6754ff5385a670df160f7bba36af8fc1f2066e461dc36e at destination: pinging container registry quay.rdoproject.org: Get "https://quay.rdoproject.org/v2/": dial tcp 38.129.56.158:443: i/o timeout

/test openstack-operator-build-deploy-kuttl

abays commented 1 month ago

@abays: The following test 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/prow/openstack-operator-build-deploy-kuttl 74dcef6 link true /test openstack-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

error: build error: Failed to push image: trying to reuse blob sha256:247c2d03e9487628cb6754ff5385a670df160f7bba36af8fc1f2066e461dc36e at destination: pinging container registry quay.rdoproject.org: Get "https://quay.rdoproject.org/v2/": dial tcp 38.129.56.158:443: i/o timeout

/test openstack-operator-build-deploy-kuttl