-
Notifications
You must be signed in to change notification settings - Fork 146
[kustomize_deploy] Add retry for wait conditions #3634
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
c4ad46a to
cd9109c
Compare
| _wait_cmd_result.stderr is defined and | ||
| not (_wait_cmd_result.stderr is search('no matching resources found', ignorecase=True) or | ||
| _wait_cmd_result.stderr is search('NotFound') or | ||
| _wait_cmd_result.stderr is search('timed out.*condition.*clusterserviceversions/openstack-operator', ignorecase=True) or |
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.
Does this mean we'll treat all actual wait timeouts as errors still, except for if waiting for the OpenStack operator to install times-out?
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, a wait for csv, for example oc wait -n openstack-operators csv -l operators.coreos.com/openstack-operator.openstack-operators= --for jsonpath='{.status.phase}'=Succeeded --timeout=300s would end up having a retry on timeout.
I do however wonder if this is redundant here, because the operator's are installed via a separate tasks file roles/kustomize_deploy/tasks/install_operators.yml.
Let me update the patch, and remove that regex.
cd9109c to
eb3f393
Compare
Resources may not be immediately available in the API after `oc apply` completes, causing wait commands to fail with NotFound errors. This adds retry logic with 5 attempts and 3-second delays to handle transient errors during resource registration. Assisted-By: Claude Code/claude-4.5-sonnet Signed-off-by: Harald Jensås <hjensas@redhat.com>
eb3f393 to
1696e48
Compare
Resources may not be immediately available in the API after
oc applycompletes, causing wait commands to fail withNotFounderrors. This adds retry logic with 5 attempts and 3-second delays to handle transient errors during resource registration.Assisted-By: Claude Code/claude-4.5-sonnet