-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Disable Affinity Assistant by default #3161
Conversation
/kind misc |
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.
@imjasonh thanks for opening this for discussion. Indeed, we did disable this by default on openshift-pipelines
because it gets more in the way to our current users that it helps them at least (given their current use of pipeline).
One thing we should try to keep in mind in the long run is, when we push a new feature that can have this impact, we may want to start by having an opt-in
behavior at first (and later switch to opt-out
). Doing the opposite (as this PR does), feels a bit backward 😛
/approve
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
Yeah I completely agree, it's not ideal. I was thinking it might be worth adding to the TEP template some prompt to discuss how we'd release the newly proposed feature, and use that to encourage people to think about opt-in vs opt-out (and just having feature flags for everything in general!) |
My opinion is probably known :) Without the AA:
With the AA:
|
This seems like a pretty big constraint to me :S We designed Tasks to be able to handle more than one workspace intentionally. |
This is the core of the problem for me. I do see value on this but I think in an ideal world
Not all cluster are regional. Depending on the users, for some, they don't have this problem, at all. |
In my experience, not all k8s clusters I have encountered work well with the Affinity Assistant because of non-standard configurations. Not all installations allow access to the K8s nodes or they have non-standard labels on the nodes. Since this feature configures the core experience rather than extends it, I personally tend to prefer opt-in semantics. Said another way, the default should work with the majority of cases possible but that is just my 2 cents. |
Yeah I think the central issue is that the tradeoff is not clearly laid out in documentation (that comment is a great distillation though!), and it introduces a serious limitation for many users. And it was enabled by default in the last release. Ideally we'd have made it opt-in then, and now that it's opt-out, rolling it back to opt-in is not necessarily a safe change. 😞 |
It was introduced to avoid the problems with deadlocks and parallelism-problems rather than add a feature.
+1. I had the same reasoning when this was added - to solve the assumed most common cases: #2630 (comment)
The Affinity Assistant was introduced in v0.13.0
That is true. But it was also motivated to allow for parallel task execution. But not all clusters have more than one Node either. But it happened that "Node Affinity" solved both origin problems.
The constraint is for PVCs, not strictly for workspaces since a workspace can be backed by other things than a PVC, and a Task can use multiple workspaces backed by the same PVC (using subPath). A Custom Scheduler is a better solution than the Affinity Assistant for this problem - it should schedule the Pods based on the same "constraints" as the Affinity Assistant, but it does not mount the PVC itself, as the AA had to do - so it has a bit friendlier behavior. |
There's been some discussion around this in WGs now and I think the consensus was:
@tektoncd/core-maintainers or anyone else on this thread: does anyone have anything further to add? Is there a purpose in keeping this PR open any longer? |
This is an excellent summary. I don't think there's anything else for this PR. |
There's been some confusion among users about the benefits/limitations of AA, in particular that it limits TaskRuns from mounting two persistent workspaces.
See:
We've heard that some Tekton installation providers disable this feature by default to avoid this confusion, and this PR is intended to start a conversation about disabling it in the official Tekton release config until the limitations/confusion can be reduced or eliminated.
/cc @jlpettersson
/cc @bobcatfish
/cc @vdemeester
NB: If this is included in the next Tekton release, users who upgrade to that release with
kubectl apply
will see AA disabled, perhaps unexpectedly.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes