-
Notifications
You must be signed in to change notification settings - Fork 63
Update cleanup job node affinity logic #1455
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
Conversation
Signed-off-by: David Kwon <[email protected]>
@dkwon17 : Thanks for fixing this! Would you mind adding some unit tests to cover the changed behavior? |
@dkwon17 Tried with rosa 4.18 and oc 4.18.9. Step 2 failed with next error:
Tried to separate to two commands:
and
passed. Results. After workaround for step 2 everything works as expected. |
@olkornii : It seems that webhook pod is not running. Could you please check if you have devworkspace-manager
|
I tested this PR with the abovementioned steps and it seems to be working ✔️ . Thanks a lot 👍 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dkwon17, ibuziuk, rohanKanojia 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 |
But as I said, entering those commands one by one works well. |
Thank you for checking, @olkornii this error:
is because the |
Signed-off-by: David Kwon <[email protected]>
New changes are detected. LGTM label has been removed. |
@rohanKanojia I'm still working on the unit tests, I will create a new PR for them. |
Signed-off-by: David Kwon <[email protected]>
Signed-off-by: David Kwon <[email protected]>
Signed-off-by: David Kwon <[email protected]>
Signed-off-by: David Kwon <[email protected]>
What does this PR do?
Update the cleanup job node affinity logic.
Old logic:
claim-devworkspace
PVC'svolume.kubernetes.io/selected-node
annotation (if the annotation exists)This logic can still cause the multi-attach error since there is no guarantee the PVC is mounted to a pod on the same node as what's specified in
volume.kubernetes.io/selected-node
.New logic:
claim-devworkspace
PVCnodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution
rule onto the cleanup job podWhat issues does this PR fix or reference?
Fix #1453
Is it tested? How?
To follow these steps, a multi node cluster (where there is more than 1 worker node) is required.
quay.io/dkwon17/devworkspace-controller:fix-pvc-node
:openshift-operators
namespace and create a workspace:oc get dw
to check), terminate the first workspace:volume.kubernetes.io/selected-node
annotation from theclaim-devworkspace
PVC:code-latest
:With changes in the PR, the deletion should be successful after about 10 seconds.
The deletion should be successful after about 10 seconds.
PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che