Update cleanup job node affinity logic#1455
Conversation
Signed-off-by: David Kwon <dakwon@redhat.com>
|
@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 DetailsNeeds 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 <dakwon@redhat.com>
|
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 <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
What does this PR do?
Update the cleanup job node affinity logic.
Old logic:
claim-devworkspacePVC'svolume.kubernetes.io/selected-nodeannotation (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-devworkspacePVCnodeAffinity.RequiredDuringSchedulingIgnoredDuringExecutionrule 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-operatorsnamespace and create a workspace:oc get dwto check), terminate the first workspace:volume.kubernetes.io/selected-nodeannotation from theclaim-devworkspacePVC: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-pathto trigger)v8-devworkspace-operator-e2e: DevWorkspace e2e testv8-che-happy-path: Happy path for verification integration with Che