Bug 1758434

Summary: Could not specify Statefulset.emptyDir.sizeLimit
Product: OpenShift Container Platform Reporter: mchoma
Component: NodeAssignee: Ryan Phillips <rphillips>
Status: CLOSED ERRATA QA Contact: Sunil Choudhary <schoudha>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: aos-bugs, gblomqui, jokerman, mburke, mfojtik, pkremens, rphillips
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
Cause: The LocalStorageCapacityIsolation feature was disabled in a previous version. Consequence: The use could not set the `Statefulset.emptyDir.sizeLimit` parameter. Fix: The LocalStorageCapacityIsolation feature was re-enabled. Result: The user can set the `Statefulset.emptyDir.sizeLimit` parameter.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-13 21:26:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mchoma 2019-10-04 06:59:54 UTC
Version-Release number of selected component (if applicable):
3.11
4.1

Steps to Reproduce:
1. Create SS with emptyDir.sizeLimit

ss.yaml:
apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  ports:
    - port: 80
      name: web
  clusterIP: None
  selector:
    app: nginx
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
spec:
  serviceName: "nginx"
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: k8s.gcr.io/nginx-slim:0.8
          ports:
            - containerPort: 80
              name: web
          volumeMounts:
            - name: www
              mountPath: /usr/share/nginx/html
      volumes:
        - emptyDir:
            medium: Memory
            sizeLimit: 1Mi

2. oc apply -f ss.yaml
3. oc get statefulset/web -o yaml --export | grep sizeLimit
sizeLimit is not persisted
4. when I edit from GUI I get "No changes were applied to stateful set web.Make sure any new fields you may have added are supported API fields."

Comment 1 mchoma 2019-10-04 07:06:38 UTC
sizeLimit is mentioned in doc I can see sizeLimit mentioned in doc https://docs.openshift.com/container-platform/3.11/rest_api/apis-apps/v1beta1.StatefulSet.html#object-schema

Comment 3 Michal Fojtik 2019-10-09 10:53:28 UTC
This option only works if the LocalStorageCapacityIsolation feature is turned on.

Comment 5 Ryan Phillips 2019-10-09 13:56:17 UTC
We can re-enable this feature. I have opened a pull request to do that with this BZ.

Comment 9 errata-xmlrpc 2020-05-13 21:26:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0062