{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65044","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65044/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65044/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65044/events","html_url":"https://github.com/kubernetes/kubernetes/issues/65044","id":331841641,"node_id":"MDU6SXNzdWUzMzE4NDE2NDE=","number":65044,"title":"PVC jsonpath={.status.capacity.storage} isn't update after expand (resize) pvc.","user":{"login":"napat1412","id":20594593,"node_id":"MDQ6VXNlcjIwNTk0NTkz","avatar_url":"https://avatars1.githubusercontent.com/u/20594593?v=4","gravatar_id":"","url":"https://api.github.com/users/napat1412","html_url":"https://github.com/napat1412","followers_url":"https://api.github.com/users/napat1412/followers","following_url":"https://api.github.com/users/napat1412/following{/other_user}","gists_url":"https://api.github.com/users/napat1412/gists{/gist_id}","starred_url":"https://api.github.com/users/napat1412/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/napat1412/subscriptions","organizations_url":"https://api.github.com/users/napat1412/orgs","repos_url":"https://api.github.com/users/napat1412/repos","events_url":"https://api.github.com/users/napat1412/events{/privacy}","received_events_url":"https://api.github.com/users/napat1412/received_events","type":"User","site_admin":false},"labels":[{"id":105146071,"node_id":"MDU6TGFiZWwxMDUxNDYwNzE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":169428334,"node_id":"MDU6TGFiZWwxNjk0MjgzMzQ=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/storage","name":"sig/storage","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-13T04:56:15Z","updated_at":"2018-06-13T05:59:23Z","closed_at":null,"author_association":"NONE","body":"<!-- This form is for bug reports and feature requests ONLY!\r\n\r\nIf you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).\r\n\r\nIf the matter is security related, please disclose it privately via https://kubernetes.io/security/.\r\n-->\r\n\r\n**Is this a BUG REPORT or FEATURE REQUEST?**:\r\n\r\n> Uncomment only one, leave it on its own line:\r\n>\r\n\r\n/kind bug\r\n> /kind feature\r\n\r\n/sig storage\r\n\r\n\r\n**What happened**:\r\npvc jsonpath={.status.capacity.storage} isn't update after expand (resize) pvc.\r\n\r\n\r\n\r\n\r\n**What you expected to happen**:\r\nAfter pvc is expended, pvc jsonpath={.status.capacity.storage} must equal to jsonpath={.spec.resources.requests.storage}.\r\n\r\n**How to reproduce it (as minimally and precisely as possible)**:\r\nI create storageclass to use rbd volume. This is ceph-sc.yaml\r\n```\r\napiVersion: storage.k8s.io/v1\r\nkind: StorageClass\r\nmetadata:\r\n  name: default\r\nprovisioner: kubernetes.io/rbd\r\nparameters:\r\n  monitors: 172.16.0.181:6789, 172.16.0.182:6789, 172.16.0.183:6789\r\n  adminId: admin\r\n  adminSecretName: ceph-secret\r\n  adminSecretNamespace: default\r\n  pool: rbd\r\n  userId: admin\r\n  userSecretName: ceph-secret\r\n  userSecretNamespace: default\r\n  fsType: ext4\r\n  imageFormat: \"2\"\r\n  imageFeatures: layering\r\nallowVolumeExpansion: true\r\n```\r\n\r\nI create pvc myclaim.yaml (pvc size 3Gb).\r\n```\r\n$ kubectl get pv,pvc\r\nNAME                                                        CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS    CLAIM             STORAGECLASS   REASON    AGE\r\npersistentvolume/pvc-f8d80182-6ebb-11e8-805c-000c29fa6222   3Gi        RWO            Delete           Bound     default/myclaim   default                  3s\r\nNAME                            STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE\r\npersistentvolumeclaim/myclaim   Bound     pvc-f8d80182-6ebb-11e8-805c-000c29fa6222   3Gi        RWO            default        10s\r\n```\r\n\r\n$ kubectl get pvc myclaim -oyaml\r\n```\r\napiVersion: v1\r\nkind: PersistentVolumeClaim\r\nmetadata:\r\n  annotations:\r\n    pv.kubernetes.io/bind-completed: \"yes\"\r\n    pv.kubernetes.io/bound-by-controller: \"yes\"\r\n    volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/rbd\r\n  creationTimestamp: 2018-06-13T03:43:44Z\r\n  finalizers:\r\n  - kubernetes.io/pvc-protection\r\n  name: myclaim\r\n  namespace: default\r\n  resourceVersion: \"177461\"\r\n  selfLink: /api/v1/namespaces/default/persistentvolumeclaims/myclaim\r\n  uid: f8d80182-6ebb-11e8-805c-000c29fa6222\r\nspec:\r\n  accessModes:\r\n  - ReadWriteOnce\r\n  resources:\r\n    requests:\r\n      storage: 3Gi\r\n  storageClassName: default\r\n  volumeName: pvc-f8d80182-6ebb-11e8-805c-000c29fa6222\r\nstatus:\r\n  accessModes:\r\n  - ReadWriteOnce\r\n  capacity:\r\n    storage: 3Gi\r\n  phase: Bound\r\n```\r\n\r\nThen, i expand pvc from 3Gi to 5Gi.\r\n$ kubectl edit pvc myclaim\r\npersistentvolumeclaim \"myclaim\" edited\r\n\r\n$ kubectl create -f mycliam-pod.yaml\r\n$ kubectl exec myclaim df\r\n```\r\nFilesystem           1K-blocks      Used Available Use% Mounted on\r\noverlay               47081000  10253992  36827008  22% /\r\ntmpfs                  1940248         0   1940248   0% /dev\r\ntmpfs                  1940248         0   1940248   0% /sys/fs/cgroup\r\n/dev/rbd0              5029504     20472   4730504   0% /mnt\r\n/dev/mapper/cl-root   47081000  10253992  36827008  22% /dev/termination-log\r\n/dev/mapper/cl-root   47081000  10253992  36827008  22% /etc/resolv.conf\r\n/dev/mapper/cl-root   47081000  10253992  36827008  22% /etc/hostname\r\n/dev/mapper/cl-root   47081000  10253992  36827008  22% /etc/hosts\r\nshm                      65536         0     65536   0% /dev/shm\r\n/dev/mapper/cl-root   47081000  10253992  36827008  22% /run/secrets\r\ntmpfs                  1940248        12   1940236   0% /var/run/secrets/kubernetes.io/serviceaccount\r\ntmpfs                  1940248         0   1940248   0% /proc/kcore\r\ntmpfs                  1940248         0   1940248   0% /proc/timer_list\r\ntmpfs                  1940248         0   1940248   0% /proc/timer_stats\r\ntmpfs                  1940248         0   1940248   0% /proc/sched_debug\r\ntmpfs                  1940248         0   1940248   0% /proc/scsi\r\ntmpfs                  1940248         0   1940248   0% /sys/firmware\r\n```\r\nAt this point, my storage in pvc is expanded to new size (5Gi)\r\n\r\n$ kubectl get pv,pvc\r\n```\r\nNAME                                                        CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS    CLAIM             STORAGECLASS   REASON    AGE\r\npersistentvolume/pvc-f8d80182-6ebb-11e8-805c-000c29fa6222   5Gi        RWO            Delete           Bound     default/myclaim   default                  49m\r\n\r\nNAME                            STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE\r\npersistentvolumeclaim/myclaim   Bound     pvc-f8d80182-6ebb-11e8-805c-000c29fa6222   3Gi        RWO            default        50m\r\n```\r\nThe pv is expand to new size (5Gi) but pvc still is 3Gi.\r\n\r\n$ kubectl get pvc myclaim -oyaml\r\n```\r\napiVersion: v1\r\nkind: PersistentVolumeClaim\r\nmetadata:\r\n  annotations:\r\n    pv.kubernetes.io/bind-completed: \"yes\"\r\n    pv.kubernetes.io/bound-by-controller: \"yes\"\r\n    volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/rbd\r\n  creationTimestamp: 2018-06-13T03:43:44Z\r\n  finalizers:\r\n  - kubernetes.io/pvc-protection\r\n  name: myclaim\r\n  namespace: default\r\n  resourceVersion: \"177660\"\r\n  selfLink: /api/v1/namespaces/default/persistentvolumeclaims/myclaim\r\n  uid: f8d80182-6ebb-11e8-805c-000c29fa6222\r\nspec:\r\n  accessModes:\r\n  - ReadWriteOnce\r\n  resources:\r\n    requests:\r\n      storage: 5Gi\r\n  storageClassName: default\r\n  volumeName: pvc-f8d80182-6ebb-11e8-805c-000c29fa6222\r\nstatus:\r\n  accessModes:\r\n  - ReadWriteOnce\r\n  capacity:\r\n    storage: 3Gi\r\n  conditions:\r\n  - lastProbeTime: null\r\n    lastTransitionTime: 2018-06-13T03:46:20Z\r\n    message: Waiting for user to (re-)start a pod to finish file system resize of\r\n      volume on node.\r\n    status: \"True\"\r\n    type: FileSystemResizePending\r\n  phase: Bound\r\n```\r\n$ kubectl get pvc myclaim --output jsonpath={.spec.resources.requests.storage}\r\n5Gi\r\n$ kubectl get pvc myclaim --output jsonpath={.status.capacity.storage}\r\n3Gi\r\n\r\n**I get yaml of pvc myclaim again & I found new jsonpath={.status.conditions}.\r\nI think kubernetes update pvc jsonpath={.status.conditions}. But kubernetes not update pvc jsonpath={.spec.capacity.storage}. Why? or I do some think wrong.**\r\n\r\n\r\n**Anything else we need to know?**:\r\nI build kube-controller-manager that install ceph-common package.\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`): kubectl v1.10.4\r\n- Cloud provider or hardware configuration: bare metal (kubeadm)\r\n- OS (e.g. from /etc/os-release): \r\n```\r\nNAME=\"CentOS Linux\"\r\nVERSION=\"7 (Core)\"\r\nID=\"centos\"\r\nID_LIKE=\"rhel fedora\"\r\nVERSION_ID=\"7\"\r\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\r\nANSI_COLOR=\"0;31\"\r\nCPE_NAME=\"cpe:/o:centos:centos:7\"\r\nHOME_URL=\"https://www.centos.org/\"\r\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\r\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\r\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\r\nREDHAT_SUPPORT_PRODUCT=\"centos\"\r\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\r\n```\r\n\r\n- Kernel (e.g. `uname -a`): Linux m1.service.local 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\r\n- Install tools: kubeadm v1.10.4\r\n- Others: ceph luminous 12.2.5 for rbd storageclass\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/396822846","html_url":"https://github.com/kubernetes/kubernetes/issues/65044#issuecomment-396822846","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65044","id":396822846,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjgyMjg0Ng==","user":{"login":"napat1412","id":20594593,"node_id":"MDQ6VXNlcjIwNTk0NTkz","avatar_url":"https://avatars1.githubusercontent.com/u/20594593?v=4","gravatar_id":"","url":"https://api.github.com/users/napat1412","html_url":"https://github.com/napat1412","followers_url":"https://api.github.com/users/napat1412/followers","following_url":"https://api.github.com/users/napat1412/following{/other_user}","gists_url":"https://api.github.com/users/napat1412/gists{/gist_id}","starred_url":"https://api.github.com/users/napat1412/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/napat1412/subscriptions","organizations_url":"https://api.github.com/users/napat1412/orgs","repos_url":"https://api.github.com/users/napat1412/repos","events_url":"https://api.github.com/users/napat1412/events{/privacy}","received_events_url":"https://api.github.com/users/napat1412/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T05:59:23Z","updated_at":"2018-06-13T05:59:23Z","author_association":"NONE","body":"This comment explain how to clean status of Persistent Volume Claim(PVC).\r\nhttps://github.com/kubernetes/kubernetes/issues/35941#issuecomment-328028093 (In appendixes)\r\nDo i manual clean status of every pvc with etcd?"}}
{"actor":{"display_login":"napat1412"}}