Skip to content

Commit a781c49

Browse files
committed
update ephemeral storage quotas monitoring KEP for v1.24
1 parent dff0940 commit a781c49

File tree

3 files changed

+64
-57
lines changed

3 files changed

+64
-57
lines changed

keps/prod-readiness/sig-node/1029.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ kep-number: 1029
22
alpha:
33
approver: "@deads2k"
44
beta:
5-
approver: "@deads2k"
5+
approver: "@deads2k"

keps/sig-node/1029-ephemeral-storage-quotas/README.md

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
- [Risks and Mitigations](#risks-and-mitigations)
2929
- [Graduation Criteria](#graduation-criteria)
3030
- [Phase 1: Alpha (1.15)](#phase-1-alpha-115)
31-
- [Phase 2: Beta (target 1.22)](#phase-2-beta-target-122)
31+
- [Phase 2: Beta (target 1.25)](#phase-2-beta-target-125)
3232
- [Phase 3: GA](#phase-3-ga)
3333
- [Performance Benchmarks](#performance-benchmarks)
3434
- [Elapsed Time](#elapsed-time)
@@ -633,7 +633,7 @@ The following criteria applies to
633633
- Unit test coverage
634634
- Node e2e test
635635

636-
### Phase 2: Beta (target 1.22)
636+
### Phase 2: Beta (target 1.25)
637637

638638
- User feedback
639639
- Benchmarks to determine latency and overhead of using quotas
@@ -734,24 +734,6 @@ and are not reported here.
734734

735735
## Production Readiness Review Questionnaire
736736

737-
<!--
738-
Production readiness reviews are intended to ensure that features merging into
739-
Kubernetes are observable, scalable and supportable; can be safely operated in
740-
production environments, and can be disabled or rolled back in the event they
741-
cause increased failures in production. See more in the PRR KEP at
742-
https://git.k8s.io/enhancements/keps/sig-architecture/1194-prod-readiness.
743-
The production readiness review questionnaire must be completed and approved
744-
for the KEP to move to `implementable` status and be included in the release.
745-
In some cases, the questions below should also have answers in `kep.yaml`. This
746-
is to enable automation to verify the presence of the review, and to reduce review
747-
burden and latency.
748-
The KEP must have a approver from the
749-
[`prod-readiness-approvers`](http://git.k8s.io/enhancements/OWNERS_ALIASES)
750-
team. Please reach out on the
751-
[#prod-readiness](https://kubernetes.slack.com/archives/CPNHUMN74) channel if
752-
you need any help or guidance.
753-
-->
754-
755737
### Feature Enablement and Rollback
756738

757739
###### How can this feature be enabled / disabled in a live cluster?
@@ -760,65 +742,88 @@ you need any help or guidance.
760742
- Feature gate name: LocalStorageCapacityIsolationFSQuotaMonitoring
761743
- Components depending on the feature gate: kubelet
762744

763-
###### Does enabling the feature change any default behavior?
745+
This feature uses project quotas to monitor emptyDir volume storage consumption
746+
rather than filesystem walk for better performance and accuracy.
764747

765-
None. Behavior will not change.
766-
When LocalStorageCapacityIsolation is enabled for local ephemeral storage and the backing filesystem for emptyDir volumes supports project quotas and they are enabled, use project quotas to monitor emptyDir volume storage consumption rather than filesystem walk for better performance and accuracy.
748+
###### Does enabling the feature change any default behavior?
767749

750+
None. Behavior will not change. The change is the way to monitoring the volume
751+
like ephemeral storage volumes and emptyDirs.
752+
When LocalStorageCapacityIsolation is enabled for local ephemeral storage and the
753+
backing filesystem for emptyDir volumes supports project quotas and they are enabled,
754+
use project quotas to monitor emptyDir volume storage consumption rather than
755+
filesystem walk for better performance and accuracy.
768756

769757
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
770758

771-
Yes. If the pod was created with enforcing quota, disable the feature gate will not change the running pod.
772-
After setting the feature gate to false, the newly created pod will not use the enforcing quota.
759+
Yes, but only for newly created pods.
760+
- Existed Pods: If the pod was created with enforcing quota, disable the feature gate
761+
will not change the running pod.
762+
- Newly Created Pods: After setting the feature gate to false, the newly created pod
763+
will not use the enforcing quota.
773764

774765
###### What happens if we reenable the feature if it was previously rolled back?
775766

776-
Performance changes. This feature uses project quotas to monitor emptyDir volume storage consumption rather than filesystem walk for better performance and accuracy.
767+
Like above, after we reenable the feature, newly created pod will use this feature.
768+
If a pod was created before rolling back, the pod will benifit from this feature as well.
777769

778770
###### Are there any tests for feature enablement/disablement?
779771

780-
Yes, test/e2e_node/quota_lsci_test.go
772+
Yes, in `test/e2e_node/quota_lsci_test.go`
781773

782774
### Rollout, Upgrade and Rollback Planning
783775

784-
785776
###### How can a rollout or rollback fail? Can it impact already running workloads?
786777

787-
None. The rollout/rollback will not impact running workloads.
778+
No. The rollout/rollback will not impact running workloads.
788779

789780
###### What specific metrics should inform a rollback?
790781

791-
None. To see its status, read kubelet log for eviction related logs or using xfs_quota to check the quota settings.
782+
`kubelet_volume_metric_collection_duration_seconds` was added since v1.24 for duration in
783+
seconds to calculate volume stats. This metric can help to compare between fsquota
784+
monitoring and `du` for disk usage.
792785

793786
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
794787

795-
Yes.
788+
Yes. I tested it locally and fixed [a bug after restarting kubelet](https://github.com/kubernetes/kubernetes/pull/107302)
796789

797790
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
798791

799-
LocalStorageCapacityIsolationFSQuotaMonitoring should be turned on only if LocalStorageCapacityIsolation is enabled as well.
792+
LocalStorageCapacityIsolationFSQuotaMonitoring should be turned on only if LocalStorageCapacityIsolationis enabled as well.
800793
If LocalStorageCapacityIsolationFSQuotaMonitoring is turned on but LocalStorageCapacityIsolation is false, the check will be skipped.
801794

802795
### Monitoring Requirements
803796

804797
* **How can an operator determine if the feature is in use by workloads?**
798+
805799
- A cluster-admin can set kubelet on each node. If the feature gate is disabled, workloads on that node will not use it.
806800
For example, run `xfs_quota -x -c 'report -h' /dev/sdc` to check quota settings in the device.
807801
Check `spec.containers[].resources.limits.ephemeral-storage` of each container.
808802

803+
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
804+
805+
- 99.9% of volume stats calculation will cost less than 1s or even 500ms.
806+
It can be calculated by `kubelet_volume_metric_collection_duration_seconds` metrics.
807+
809808
* **What are the SLIs (Service Level Indicators) an operator can use to determine
810809
the health of the service?**
811-
- Set a quota for the specified volume and try to write to the volume to check if there is a limitation.
812810

813-
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
814-
- N/A.
811+
- [x] Metrics
812+
- Metric name: `kubelet_volume_metric_collection_duration_seconds`
813+
- Aggregation method: histogram
814+
- Components exposing the metric: kubelet
815815

816816
* **Are there any missing metrics that would be useful to have to improve observability of this feature? **
817-
- Yes, there is a kubelet metrics `kubelet_evictions{eviction_signal="ephemeralpodfs.limit"}`([ALPHA] Cumulative number of pod evictions by eviction signal).
817+
818+
- Yes, there are no histogram metrics for each volume. The above metric was grouped by volume types because
819+
the cost for every volume is too expensive.
818820

819821
### Dependencies
820822
* **Does this feature depend on any specific services running in the cluster? **
821-
- No.
823+
824+
- Yes, the feature depneds on project quotas. Once quotas are enabled, the xfs_quota tool can be used to
825+
set limits and report on disk usage.
826+
822827

823828
### Scalability
824829
* **Will enabling / using this feature result in any new API calls?**
@@ -856,31 +861,32 @@ details). For now, we leave it here.
856861

857862
###### What are other known failure modes?
858863

859-
If the ephemeral storage limitation is reached, the pod will be evicted by kubelet.
864+
1. If the ephemeral storage limitation is reached, the pod will be evicted by kubelet.
860865

861-
It should skip when the image is not configured correctly (unsupported FS or quota not enabled).
866+
2. It should skip when the image is not configured correctly (unsupported FS or quota not enabled).
867+
868+
3. For "out of space" failure, kublet eviction should be triggered.
862869

863-
<!--
864-
For each of them, fill in the following information by copying the below template:
865-
- [Failure mode brief description]
866-
- Detection: How can it be detected via metrics? Stated another way:
867-
how can an operator troubleshoot without logging into a master or worker node?
868-
- Mitigations: What can be done to stop the bleeding, especially for already
869-
running user workloads?
870-
- Diagnostics: What are the useful log messages and their required logging
871-
levels that could help debug the issue?
872-
Not required until feature graduated to beta.
873-
- Testing: Are there any tests for failure mode? If not, describe why.
874-
-->
875870

876871
###### What steps should be taken if SLOs are not being met to determine the problem?
877872

873+
- Restart kubelet and wait for 1 minute to make the SLOs clear.(The volume stats checking interval is determined by kubelet flag `volumeStatsAggPeriod`(default 1m).)
874+
878875

879876
## Implementation History
880877

881878
### Version 1.15
882879

883-
` LocalStorageCapacityIsolationFSMonitoring` implemented at Alpha
880+
- `LocalStorageCapacityIsolationFSMonitoring` implemented at Alpha
881+
882+
### Version 1.24
883+
884+
- `kubelet_volume_metric_collection_duration_seconds` metrics was added
885+
- A bug that quota cannot work after kubelet restarted, was fixed
886+
887+
### Version 1.25
888+
889+
- Plan to promote `LocalStorageCapacityIsolationFSMonitoring` to Beta
884890

885891
## Drawbacks [optional]
886892

keps/sig-node/1029-ephemeral-storage-quotas/kep.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ title: Quotas for Ephemeral Storage
22
kep-number: 1029
33
authors:
44
- "@RobertKrawitz"
5+
- "@pacoxu"
56
owning-sig: sig-node
67
participating-sigs:
78
- sig-node
@@ -13,11 +14,11 @@ approvers:
1314
- "@derekwaynecarr"
1415
editor: TBD
1516
creation-date: 2018-09-06
16-
last-updated: 2021-05-08
17-
status: implementable
17+
last-updated: 2022-03-01
18+
status: implemented
1819

19-
latest-milestone: "1.22"
20+
latest-milestone: "1.25"
2021
stage: "alpha"
2122
milestone:
2223
alpha: "1.15"
23-
beta: "1.22"
24+
beta: "1.25"

0 commit comments

Comments
 (0)