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

cnf ran: fix small post-provision automation issue #467

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

klaskosk
Copy link
Collaborator

@klaskosk klaskosk commented Feb 23, 2025

There are a few lingering automation issues caused by race conditions between the tests and the operator on the cluster. This PR addresses them in two ways:

  1. Adds a sleep to 77374. This is a bit of a workaround but for now the simplest way to ensure that we do not end up in the situation where a policy template is updated but its compliance state refers to the old template.
  2. Adds an additional step to waitForPolicies which ensures that the policy details in the ProvisioningRequest status match the desired policy version. Previously, we could end up in a situation where all the policies have propagated to the spoke but the ProvisioningRequest shows the old policies. This would then cause a 403 as the ProvisioningRequest turns pending after the policies have propagated and the state had been fulfilled.

A more permanent solution would likely be switching to watching resources instead of polling but the current solution requires the least changes for now.

@klaskosk klaskosk force-pushed the post-provision-fix branch 6 times, most recently from 936d545 to a63329f Compare February 25, 2025 20:31
There are a few lingering automation issues caused by race conditions between the tests and the operator on the cluster. This PR addresses them in two ways:

1. Adds a sleep to 77374. This is a bit of a workaround but for now the simplest way to ensure that we do not end up in the situation where a policy template is updated but its compliance state refers to the old template.
1. Adds an additional step to waitForPolicies which ensures that the policy details in the ProvisioningRequest status match the desired policy version. Previously, we could end up in a situation where all the policies have propagated to the spoke but the ProvisioningRequest shows the old policies. This would then cause a 403 as the ProvisioningRequest turns pending after the policies have propagated and the state had been fulfilled.

A more permanent solution would likely be switching to watching resources instead of polling but the current solution requires the least changes for now.
@klaskosk
Copy link
Collaborator Author

Tested

@klaskosk klaskosk requested review from dgonyier and yliu127 February 25, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants