-
Notifications
You must be signed in to change notification settings - Fork 87
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
[openshift-base] statefulset pvc resize #2050
Conversation
StatefulSet PVC resizeThe “delete statefulset —cascade=orphaned and reapply statefulset with increased storage request”-strategy does not have any effect on the PVCs. The recreated StatefulSet just adopts existing Pods and existing PVCs and does not change them. The statefulset controller has some sort of volumeClaimTemplate conformance check for the pods owned by a statefulset but it does not incorporate sizing and access modes and instead checks only basic things like existence. It is strange, that the deletion of the PVC resize without Pod restartTL;DR; expansion of gp2 backed in-use PVCs works on Openshift 4.8 (I did not test on older versions) without Pod or Container restarts. Resizing of EBS volumes is only supported once every 6 hours though. The Experiment: Resize a PVC used by a Pod owned by a StatefulSet
And after 1 minute
No Pod restart was required even though the initial event indicated that.
Pod was not recreated and no containers within the pod have been restarted Not directly related to this but good to know: an EBS volume resize can only be done once every 6 hours (see https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyVolume.html). If a gp2 PVC resize is started before that,
But good news: after the required time has passed, the PVC resize operation reconciles automatically. SummaryIf we want to enable qontract-reconcile to take care of PVC resizes in StatefulSets, we need to take care of resizing the actual PVCs in our code - the “statefulset-dance” is not going to help. BUT: there is an ongoing KEP-0661 to enable StatefulSets to directly take care of PVC resizing. |
1a05bef
to
2f0bd4d
Compare
great investigation! implemented exactly what you have proposed. |
9920dc0
to
43c1797
Compare
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.
lgtm
as type hints are optional (and i am fulfilling my right to not use them), and the open comment is a nit, i'm going to merge this to get the functionality promoted. |
0eaaa21
to
4b35708
Compare
related to https://issues.redhat.com/browse/ASIC-145
during the incident, we noticed that pods were being picked up by the newly applied statefulset without being restarted, including picking up an updated storage size.
this needs to be validated through docs or an experiment.