-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
deploy: update validation for deploymentconfigs #9193
deploy: update validation for deploymentconfigs #9193
Conversation
What are the implications if existing DCs suddenly stop validating because of this? |
@liggitt those DCs are already broken because the same validation underpins replication controllers: |
so they would have failed when actually deploying, but do we have any automated controllers that will try to update the now-invalid DC (to report status, bump versions to trigger deployments, etc), that will behave in a way we don't want (hot-looping, clogging workqueues, etc)? |
We are gating retries in both the deployment config and config change controller. I believe that for 1.3 we will switch to using caches and the ratelimiting queue so I think we are covered. |
what about client calls to trigger deployments? would they get a validation error now? |
Yes. Much better than silently starting an invalid deployment. |
depends. it makes sense when creating the DC. it makes sense if updating the DC from a valid selector to an invalid selector. if you are not changing the selector, and are making an unrelated API call, a validation error about the selector is somewhat nonsensical |
If it was any other field, I would probably agree but isn't it also nonsensical to allow updates on a DC when it is not working? If I run an update on my (invalid) DC and it succeeded I would expect it to work. But it wouldn't... |
No... different updates do different things, and if data was previously allowed in, it's not clear we should disallow unrelated updates in order to tighten validation. I'm not 100% opposed, but the bar needs to be very high for tightening validation like this, and we need to think through all the automated and manual update cases to make sure we're not going to cause bigger problems. |
It's not about tightening validation, it's about not letting people break themselves or at the very least, letting them know where are they broken, if they are already broken. Disallowing updates like scaling or other template changes that never worked doesn't sound that bad. Plus if someone had hit this already, we would probably know about it. |
Yes, by tightening validation :)
Depends how that is being done. If a script or automated system is scaling and is not equipped to understand validation errors (because validation errors were not possible before), this isn't helpful. Like I said, I'm not 100% opposed, but we have to be super careful when tightening validation, because it introduces the potential to make unrelated operations fail. |
I can't think of such a system that wouldn't be already broken. Two cases: 1) scaling events (either by an autoscaler or another automated system or script) = already broken. 2) Updates to the deployment config that will cause[1] a redeployment (either automatic or manual) = already broken. [1] most if not all of the time you want to redeploy your latest config. Not sure if there is any value in having an updated deployment config that is not working. And I don't think there is an automated system out there that will fix the validation issue for the deployment config to work:) |
It would mean, for instance, that an If there is no case where a DC can exist today that fails this validation, but isn't broken, then this is ok. If there is a DC today that would be working but when we add this validation it breaks (can't trigger redeployment on image?) then I would be concerned. Can we conclusively prove that there is scenario where the DC covered by this new validation would be broken? |
DCs that will break by this change are already broken. From the server logs
|
Then I'm ok with the change - Jordan, do yo need more convincing? |
@liggitt ping |
Validate that the deployment config selector is matching the pod template labels.
@liggitt ping - better get this in for 1.3 than not? |
yeah, I think this is ok |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8386/) (Image: devenv-rhel7_4917) |
quota [merge] |
[test] |
Evaluated for origin test up to 7ade0ff |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8386/) |
[merge] |
#8427 [merge] |
Evaluated for origin merge up to 7ade0ff |
Validate that the deployment config selector is matching the pod
template labels.
cc: @ironcladlou @smarterclayton @mfojtik