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
In kubernetes V1.27.1, Image not rolling back to older version for pod with ordinal number 0, in case of upgrade failure. #119684
Comments
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/SIG Apps |
kind/bug |
Some steps to reproduce it would be great. |
sts.zip 1 - Deploy STS using attached yaml where replica count is 2 and updatingstrategy.rolling.partition as 1. 2 - Edit STS and update the image to 1.15. At this stage pod-1 will be updated with image 1.15. 3 - Now delete the pod pod-0 and check the image tag for POD-0 came up with new image which is not expected [behavio] |
/sig apps |
Any work around for this issue? |
what do you mean by "POD-0 came up with new image" , the Pod-0 has to have image 1.15 that is the one you have updated to |
Yes, it is has new image 1.15. |
I'm interested in this, let me check it out. /assign |
HI liangyuanpeng, |
oh, I missed that part, indeed sounds like a bug and we should have an e2e test verifying that behavior, it seems a simple e2e test to add, @liangyuanpeng please add the e2e test reproducing the issue if you are going to work on this /cc @soltysh https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#rolling-updates
|
Hi @liangyuanpeng, |
@ankushhifi007 ghcr.io/liangyuanpeng/kube-controller-manager-amd64:v1.27-patch I will try to test again with your files. |
@liangyuanpeng |
@liangyuanpeng |
@aleksandra-malinowska Can #119096 this be potential cause for this issue which is seen only in 1.27.1 but not in 1.26. |
@liangyuanpeng, But now upgrade procedure is breaking. same upgrade procedure is working with v1.27.0 but after applying the patch it is not working. |
@liangyuanpeng, |
Maybe it is as designed, other replicas will keep old version utill the first upgraded one finished upgring. |
Yes you are right other replicas keeping the older version till first one is upgraded, but when I am upgrading other pod after |
I think you can check the real partition value in yaml. k8s will update pod with index from kubernetes/pkg/controller/statefulset/stateful_set_control.go Lines 682 to 711 in 2979242
|
I am checking and setting partition values as per my upgrade requirement but my my point is with @liangyuanpeng 's patch Helm upgrade is not working as per helm design now that is the issue. apart from original reported issue. |
@liangyuanpeng |
#119096 was cherry-picked to 1.27.4, it's not in 1.27.1 |
@ankushhifi007 I believe that it's fixed by #120731 /unassign |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
closing this because it is fixed in #120731 and backported to 1.27 and 1.28 |
@adilGhaffarDev: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I am using statefulset for my application with 2 replicas, and updating pods with rolling update partition with following detail using helm.
updateStrategy:
rollingUpdate:
partition: 1
type: RollingUpdate
upgrade is starting from 1 to 0.
in 1 scenario, pod-0 upgrade fails, and i tried to do rollback using helm rollback 1 by 1 but image did not update on any pod.
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Fri Jul 28 12:25:31 2023 superseded 1.7.2+65 app 5.0 Install complete
2 Fri Jul 28 13:14:43 2023 superseded 1.8.0-203 app 5.0 Upgrade complete
3 Fri Jul 28 13:36:35 2023 superseded 1.8.0-203 app 5.0 Upgrade complete
4 Fri Jul 28 14:12:20 2023 superseded 1.7.2+65 app 5.0 Rollback to 2
Same procedure working till V1.26.1.
The text was updated successfully, but these errors were encountered: