-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
KEP-3762: graduate PersistentVolumeLastPhaseTransitionTime to beta in v1.29 #4125
KEP-3762: graduate PersistentVolumeLastPhaseTransitionTime to beta in v1.29 #4125
Conversation
/assign @jsafrane /sig storage |
d0cf36a
to
7df2bc2
Compare
Test rollout-rollback-rolloutPerform pre-upgrade tests (1.27.5)Create a PVC to provision a volume:
Verify the PV does not have
Upgrade cluster (1.27.5 -> 1.28.1)Check available versions: $ dnf search kubeadm --showduplicates --quiet | grep 1.28
kubeadm-1.28.0-0.x86_64 : Command-line utility for administering a Kubernetes cluster.
kubeadm-1.28.1-0.x86_64 : Command-line utility for administering a Kubernetes cluster. Upgrade kubeadm: $ sudo dnf install -y kubeadm-1.28.1-0 Prepare config file that enables FeatureGate:
Perform kubeadm upgrade: $ sudo kubeadm upgrade plan --config /tmp/config.yaml
$ sudo kubeadm upgrade apply --config /tmp/config.yaml v1.28.1 Perform kubelet upgrade: $ sudo dnf install -y kubelet-1.28.1-0
$ sudo systemctl daemon-reload
$ sudo systemctl restart kubelet Perform post-upgrade testsCreate a second PVC to provision a volume:
Verify it has
Change retain policy on the first PV to
Delete PVC for the first volume to release the PV:
Verify the first (pre-upgrade) PVC transitioned phase and transition timestamp is now set:
Downgrade cluster (1.28.1 -> 1.27.5)
Perform post-rollback tests
Verify new PV does not have
Verify
Verify
Upgrade cluster again (1.27.5 -> 1.28.1)Install/update kubeadm: $ sudo dnf install -y kubeadm-1.28.1-0 Perform kubeadm upgrade:
Perform post-upgrade tests againVerify timestamp is available again and unchanged on old PVs:
Change reclaim policy on exiting PV, release it and check
|
The above test is great (I will look at details later), but can you put it into the KEP itself? |
keps/sig-storage/3762-persistent-volume-last-phase-transition-time/README.md
Outdated
Show resolved
Hide resolved
aca086a
to
2ae551c
Compare
@wojtek-t Sure, moved. |
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.
Few but very minor comments - overall this looks reasonable.
| on | on | New behavior. | ||
Version skew is not applicable, KCM was not changed in scope of this enhancement. | ||
|
||
| API server | KCM | Behavior | |
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.
let's remove the KCM column from the table - it doesn't matter
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.
Removed.
timestamp field when a volume transitions to a different phase. Also, if the feature gate is disabled the value must be | ||
re-set to `nil` when updating or creating a volume. | ||
We need to update API server to support the newly proposed field and set a value of the new timestamp field when a volume | ||
transitions to a different phase. The timestamp field must be set to current time also for newly created volumes. |
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.
I like the change - thanks!
|
||
See "Upgrade / Downgrade Strategy" and "Notes/Constraints/Caveats" sections for more details. | ||
|
||
###### Are there any tests for feature enablement/disablement? | ||
|
||
Unit tests for enabling and disabling feature gate will be added when transitioning to beta. See "Graduation criteria" | ||
section. | ||
Unit tests for enabling and disabling feature gate will be added in alpha - see "Graduation criteria" section. |
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.
Were the tests added?
In fact this comment from the KEP template was introduced for exactly the cases like this:
Additionally, for features that are introducing a new API field, unit tests that
are exercising the `switch` of feature gate itself (what happens if I disable a
feature gate after having objects written with the new field) are also critical.
You can take a look at one potential example of such test in:
https://github.com/kubernetes/kubernetes/pull/97058/files#diff-7826f7adbc1996a05ab52e3f5f02429e94b68ce6bce0dc534d1be636154fded3R246-R282
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.
Yes, I've added a link to it.
@@ -676,13 +651,20 @@ rollout. Similarly, consider large clusters and how enablement/disablement | |||
will rollout across nodes. | |||
--> | |||
|
|||
Rollout should not fail and there should be no need for rollback as this enhancement only adds a new field. | |||
Also, rollback in terms of removal of this new field is not possible, once a PV is updated with the new field it can not | |||
be removed after disabling the feature. |
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.
The field won't be deleted automatically, but we can manually reset it, right?
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.
Exactly, I'm adding a better explanation with examples.
@@ -676,13 +651,20 @@ rollout. Similarly, consider large clusters and how enablement/disablement | |||
will rollout across nodes. | |||
--> | |||
|
|||
Rollout should not fail and there should be no need for rollback as this enhancement only adds a new field. |
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.
Well - not very likely, but one can imagine a some nil-pointer exception or sth like that (i.e. crashes of kube-apiserver when it tries to set it).
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.
Sure, rewording a bit.
$ date | ||
Tue Sep 12 12:05:24 PM UTC 2023 | ||
``` | ||
|
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.
This is great - thanks a lot for thorough testing!
- Other field: | ||
- [ ] Other (treat as last resort) | ||
- Details: | ||
- [X] API .status |
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.
line 944: please add something like:
N/A - no SLI defined here
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.
Added.
@@ -846,6 +1074,8 @@ Describe them, providing: | |||
- Estimated amount of new objects: (e.g., new Object X for every existing Pod) | |||
--> | |||
|
|||
Yes, all PV objects will have an entirely new field. |
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.
nit: please add that it's a timestamp, so together with the field name it will be < 50 bytes or so
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.
Added.
2ae551c
to
eb0d5ae
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.
Just two super minor comments - once applied this LGTM.
|-------------|-----------------------| | ||
| off | Existing Kubernetes behavior.| | ||
| on | New behavior. | | ||
| off | Existing Kubernetes behavior. | |
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.
nit: remove these two lines now - those are duplicates now :)
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.
Missed that, removing.
- Components exposing the metric: | ||
- [ ] Other (treat as last resort) | ||
- Details: | ||
N/A - no SLI defined |
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.
Sorry for confusion - I meant adding this for the question above (for SLO) - if we don't have SLIs, then SLO doesn't make sense.
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.
Thanks, moving.
eb0d5ae
to
58c40b9
Compare
/lgtm Thanks! @RomanBednar - you still need SIG approval for it |
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.
Please update the checklist at the beginning of the KEP.
Very well written KEP otherwise!
is enabled, and persisted if already set and feature gate is disabled. | ||
|
||
Feature enablement tests: | ||
https://github.com/RomanBednar/kubernetes/blob/294f5c9a42fead4a4cc75340a6b9171c9c657b3e/pkg/registry/core/persistentvolume/strategy_test.go#L45 |
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.
The link should lead to kubernetes/kubernetes, the commit is already merged there
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.
The link is wrong indeed - fixed. And checklist is updated too. Thank you for the review!
58c40b9
to
9b45d09
Compare
9b45d09
to
99a9d31
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, RomanBednar, wojtek-t 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 |
This is a followup for discussed changes: