{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44370","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44370/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44370/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44370/events","html_url":"https://github.com/kubernetes/kubernetes/issues/44370","id":221114262,"number":44370,"title":"Unable to create a persistent volume with a default storage class","user":{"login":"avagin","id":1049830,"avatar_url":"https://avatars1.githubusercontent.com/u/1049830?v=4","gravatar_id":"","url":"https://api.github.com/users/avagin","html_url":"https://github.com/avagin","followers_url":"https://api.github.com/users/avagin/followers","following_url":"https://api.github.com/users/avagin/following{/other_user}","gists_url":"https://api.github.com/users/avagin/gists{/gist_id}","starred_url":"https://api.github.com/users/avagin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avagin/subscriptions","organizations_url":"https://api.github.com/users/avagin/orgs","repos_url":"https://api.github.com/users/avagin/repos","events_url":"https://api.github.com/users/avagin/events{/privacy}","received_events_url":"https://api.github.com/users/avagin/received_events","type":"User","site_admin":false},"labels":[{"id":169428334,"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":10,"created_at":"2017-04-12T00:01:58Z","updated_at":"2018-02-20T21:09:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Kubernetes version** (use `kubectl version`):\r\n\r\nClient Version: version.Info{Major:\"1\", Minor:\"6\", GitVersion:\"v1.6.1\", GitCommit:\"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e\", GitTreeState:\"clean\", BuildDate:\"2017-04-03T20:44:38Z\", GoVersion:\"go1.7.5\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"6\", GitVersion:\"v1.6.0\", GitCommit:\"fff5156092b56e6bd60fff75aad4dc9de6b6ef37\", GitTreeState:\"clean\", BuildDate:\"2017-03-28T16:24:30Z\", GoVersion:\"go1.7.5\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n\r\n**Environment**:\r\n- **Cloud provider or hardware configuration**:\r\nmodel name      : Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz\r\nMem:         144886        2581      137083          67        5222      141591\r\n\r\n- **OS** (e.g. from /etc/os-release):\r\nNAME=\"Virtuozzo Storage\"\r\nVERSION=\"2.0.0\"\r\nID=\"vstorage\"\r\nID_LIKE=\"rhel fedora\"\r\nVERSION_ID=\"7\"\r\nPRETTY_NAME=\"Virtuozzo Storage release 2.0.0 (6)\"\r\nANSI_COLOR=\"0;31\"\r\nCPE_NAME=\"cpe:/o:virtuozzoproject:vz:7\"\r\nHOME_URL=\"http://www.virtuozzo.com\"\r\nBUG_REPORT_URL=\"http://www.virtuozzo.com/support/\"\r\n\r\n- **Kernel** (e.g. `uname -a`):\r\nLinux s21.int 3.10.0-327.36.1.vz7.20.18.banner #1 SMP Fri Mar 10 16:12:31 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n- **Install tools**:\r\n- **Others**:\r\n\r\n**What happened**:\r\n\r\nI have a default storage class and a claim where a storage class isn't specified.\r\n\r\n[root@s21 vzstorage-pd]# kubectl describe storageclass default\r\nName:           default\r\nIsDefaultClass: Yes\r\nAnnotations:    storageclass.beta.kubernetes.io/is-default-class=true\r\nProvisioner:    kubernetes.io/virtuozzo-storage\r\nParameters:     volumePath=/mnt/vstorage/kube/\r\nEvents:         <none>\r\n\r\n[root@s21 vzstorage-pd]# cat claim-default.yaml \r\nkind: PersistentVolumeClaim\r\napiVersion: v1\r\nmetadata:\r\n  name: vz-test-claim\r\nspec:\r\n  accessModes:\r\n    - ReadWriteOnce\r\n    - ReadOnlyMany\r\n  resources:\r\n    requests:\r\n      storage: 1Gi\r\n\r\nWhen this claim is added to the cluster, the external-storage provisioner returns an error:\r\nE0411 16:44:58.442149  245309 controller.go:414] Claim \"default/vz-test-claim\": StorageClass \"\" not found\r\n\r\nhttps://github.com/kubernetes-incubator/external-storage/blob/master/lib/controller/controller.go#L445\r\n\r\n**What you expected to happen**:\r\n\r\nI expect that a provisioner will get the claim with the default storage class\r\n\r\n**How to reproduce it** (as minimally and precisely as possible):\r\n\r\nInstall one of external provisioners and try to use a default storage class\r\nhttps://github.com/kubernetes-incubator/external-storage\r\n\r\n**Anything else we need to know**:\r\nThe DefaultStorageClass pluging is enabled:\r\n```\r\n--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota,DefaultTolerationSeconds\r\n```\r\n\r\nI found that other people have the same problem and discussed about it on the sig-storage chanel.\r\n```\r\nmawong [3:39 PM] ￼\r\nhmm might be worth creating an issue since there are lot sof folks with this issue\r\n```\r\n\r\nCc: @jsafrane @wongma7 "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/367120100","html_url":"https://github.com/kubernetes/kubernetes/issues/44370#issuecomment-367120100","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44370","id":367120100,"user":{"login":"msau42","id":24448061,"avatar_url":"https://avatars3.githubusercontent.com/u/24448061?v=4","gravatar_id":"","url":"https://api.github.com/users/msau42","html_url":"https://github.com/msau42","followers_url":"https://api.github.com/users/msau42/followers","following_url":"https://api.github.com/users/msau42/following{/other_user}","gists_url":"https://api.github.com/users/msau42/gists{/gist_id}","starred_url":"https://api.github.com/users/msau42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msau42/subscriptions","organizations_url":"https://api.github.com/users/msau42/orgs","repos_url":"https://api.github.com/users/msau42/repos","events_url":"https://api.github.com/users/msau42/events{/privacy}","received_events_url":"https://api.github.com/users/msau42/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T21:09:24Z","updated_at":"2018-02-20T21:09:24Z","author_association":"MEMBER","body":"PVC with storageclass == nil is used to indicate the default, whereas storageclass == \"\" means no storageclass.   But the filling in of the default storageclass is done in the admission controller on PVC create, so if you create/set your default storageclass after creating the PVC, the storageclass field won't be updated afterwards.  I think we could possibly have a long running controller do the same thing as the admission controller, filling in the storageclass name with the default storageclass, however, we need to consider backwards compatibility scenarios.\r\n\r\nMaybe it's ok.  Who's going to have an existing pending PVC with nil storageclass from before the release (1.6?) that default storageclasses was introduced?"}}
{"actor":{"display_login":"msau42"}}