{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44146","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44146/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44146/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44146/events","html_url":"https://github.com/kubernetes/kubernetes/issues/44146","id":219846571,"number":44146,"title":"PVC does not work correctly when deploy is installed on Azure ACS agent that runs Windows","user":{"login":"minherz","id":3994488,"avatar_url":"https://avatars1.githubusercontent.com/u/3994488?v=3","gravatar_id":"","url":"https://api.github.com/users/minherz","html_url":"https://github.com/minherz","followers_url":"https://api.github.com/users/minherz/followers","following_url":"https://api.github.com/users/minherz/following{/other_user}","gists_url":"https://api.github.com/users/minherz/gists{/gist_id}","starred_url":"https://api.github.com/users/minherz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minherz/subscriptions","organizations_url":"https://api.github.com/users/minherz/orgs","repos_url":"https://api.github.com/users/minherz/repos","events_url":"https://api.github.com/users/minherz/events{/privacy}","received_events_url":"https://api.github.com/users/minherz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-06T10:00:43Z","updated_at":"2017-04-07T17:23:51Z","closed_at":null,"body":"**What keywords did you search in Kubernetes issues before filing this one?** `windows` `azure`\r\n\r\n---\r\n\r\n**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): BUG REPORT\r\n\r\n**Kubernetes version** (use `kubectl version`):\r\n```\r\nClient Version: version.Info{Major:\"1\", Minor:\"5\", GitVersion:\"v1.5.4\", GitCommit:\"7243c69eb523aa4377bce883e7c0dd76b84709a1\", GitTreeState:\"clean\", BuildDate:\"2017-03-07T23:53:09Z\", GoVersion:\"go1.7.4\", Compiler:\"gc\", Platform:\"windows/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"5\", GitVersion:\"v1.5.3\", GitCommit:\"029c3a408176b55c30846f0faedf56aae5992e9b\", GitTreeState:\"clean\", BuildDate:\"2017-02-15T06:34:56Z\", GoVersion:\"go1.7.4\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\n**Environment**:\r\n- **Cloud provider or hardware configuration**: Azure\r\n- **OS** (e.g. from /etc/os-release):\r\n```\r\nNAME=\"Ubuntu\"\r\nVERSION=\"16.04 LTS (Xenial Xerus)\"\r\nID=ubuntu\r\nID_LIKE=debian\r\nPRETTY_NAME=\"Ubuntu 16.04 LTS\"\r\nVERSION_ID=\"16.04\"\r\nHOME_URL=\"http://www.ubuntu.com/\"\r\nSUPPORT_URL=\"http://help.ubuntu.com/\"\r\nBUG_REPORT_URL=\"http://bugs.launchpad.net/ubuntu/\"\r\nUBUNTU_CODENAME=xenial\r\n```\r\n- **Kernel** (e.g. `uname -a`): `Linux k8s-master-E95B113C-0 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux`\r\n- **Install tools**: Azure portal\r\n- **Others**: Configuration includes 1 master and 2 agents that run Windows (preview).\r\n\r\n**What happened**: \r\nWhen installing a deployment that use volume from PVC the deployment fails. The K8S dashboard shows the following errors:\r\nNode Details Events:\r\n `invalid capacity 0 on device \"\" at mount point \"\"`\r\n\r\nReplicaSet Events:\r\n `Failed to create docker container \"windowswebserver\" of pod \"win-webserver-3479639405-r8tvb_default(2d9821b4-1abe-11e7-a9a9-000d3a14200c)\" with error: Error response from daemon: {\"message\":\"invalid bind mount spec \\\"c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume\\\": invalid volume specification: 'c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume': invalid mount config for type \\\"bind\\\": bind source path does not exist\"}`\r\n\r\n `Error syncing pod, skipping: failed to \"StartContainer\" for \"windowswebserver\" with RunContainerError: \"runContainer: Error response from daemon: {\\\"message\\\":\\\"invalid bind mount spec \\\\\\\"c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume\\\\\\\": invalid volume specification: 'c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume': invalid mount config for type \\\\\\\"bind\\\\\\\": bind source path does not exist\\\"}\"`\r\n\r\nPod Created by Error:\r\n `Failed to create docker container \"windowswebserver\" of pod \"win-webserver-3479639405-r8tvb_default(2d9821b4-1abe-11e7-a9a9-000d3a14200c)\" with error: Error response from daemon: {\"message\":\"invalid bind mount spec \\\"c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume\\\": invalid volume specification: 'c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume': invalid mount config for type \\\"bind\\\": bind source path does not exist\"}\r\nError syncing pod, skipping: failed to \"StartContainer\" for \"windowswebserver\" with RunContainerError: \"runContainer: Error response from daemon: {\\\"message\\\":\\\"invalid bind mount spec \\\\\\\"c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume\\\\\\\": invalid volume specification: 'c:/var/lib/kubelet/pods/2d9821b4-1abe-11e7-a9a9-000d3a14200c/volumes/kubernetes.io~azure-disk/pvc-e5f7a9ef-1abd-11e7-a9a9-000d3a14200c:c:/volume': invalid mount config for type \\\\\\\"bind\\\\\\\": bind source path does not exist\\\"}\"`\r\n\r\n**What you expected to happen**:\r\nThe deployment succeed\r\n\r\n**How to reproduce it** (as minimally and precisely as possible):\r\n\r\n1. Install azure storage class by executing\r\n```\r\nkind: StorageClass\r\napiVersion: storage.k8s.io/v1beta1\r\nmetadata:\r\n  name: azure-slow\r\nprovisioner: kubernetes.io/azure-disk\r\nparameters:\r\n  skuname: Standard_LRS\r\n```\r\n 2. Setup PVC\r\n```\r\napiVersion: v1\r\nkind: PersistentVolumeClaim\r\nmetadata:\r\n  name: pvc1\r\n  annotations:\r\n    volume.alpha.kubernetes.io/storage-class: azure-slow\r\nspec:\r\n  accessModes:\r\n  - ReadWriteOnce\r\n  resources:\r\n    requests:\r\n      storage: 20Gi\r\n```\r\n3. Setup deployment (taken from Kubernetes on Windows example and updated just with a volume)\r\n```\r\napiVersion: v1\r\nkind: Service\r\nmetadata:\r\n name: win-webserver\r\n labels:\r\n   app: win-webserver\r\nspec:\r\n ports:\r\n   # the port that this service should serve on\r\n - port: 80\r\n   targetPort: 80\r\n selector:\r\n   app: win-webserver\r\n type: LoadBalancer\r\n---\r\napiVersion: extensions/v1beta1\r\nkind: Deployment\r\nmetadata:\r\n labels:\r\n   app: win-webserver\r\n name: win-webserver\r\nspec:\r\n replicas: 1\r\n template:\r\n   metadata:\r\n     labels:\r\n       app: win-webserver\r\n     name: win-webserver\r\n   spec:\r\n     containers:\r\n     - name: windowswebserver\r\n       image: microsoft/windowsservercore\r\n       command:\r\n       - powershell.exe\r\n       - -command\r\n       - \"<#code used from https://gist.github.com/wagnerandrade/5424431#> ; $$listener = New-Object System.Net.HttpListener; $$listener.Prefixes.Add('http://*:80/'); $$listener.Start() ; $$callerCounts = @{} ; Write-Host('Listening on port 80 at all interfaces{0}...') ; while ($$listener.IsListening) { ;$$context = $$listener.GetContext() ;$$requestUrl = $$context.Request.Url ;$$clientIP = $$context.Request.RemoteEndPoint.Address ;$$response = $$context.Response ;Write-Host '' ;Write-Host('> {0}' -f $$requestUrl) ;  ;$$count = 1 ;$$k=$$callerCounts.Get_Item($$clientIP) ;if ($$k -ne $$null) { $$count += $$k } ;$$callerCounts.Set_Item($$clientIP, $$count) ;$$header='<html><body><H1>Windows Container Web Server</H1>' ;$$callerCountsString='' ;$$callerCounts.Keys | % { $$callerCountsString+='<p>IP {0} callerCount {1} ' -f $$_,$$callerCounts.Item($$_) } ;$$footer='</body></html>' ;$$content='{0}{1}{2}' -f $$header,$$callerCountsString,$$footer ;Write-Output $$content ;$$buffer = [System.Text.Encoding]::UTF8.GetBytes($$content) ;$$response.ContentLength64 = $$buffer.Length ;$$response.OutputStream.Write($$buffer, 0, $$buffer.Length) ;$$response.Close() ;$$responseStatus = $$response.StatusCode ;Write-Host('< {0}' -f $$responseStatus)  } ; \"\r\n       volumeMounts:\r\n       - mountPath: \"c:/volume\"\r\n         name: blobdisk01\r\n     volumes:\r\n     - name: blobdisk01\r\n       persistentVolumeClaim:\r\n         claimName: pvc1\r\n     nodeSelector:\r\n       beta.kubernetes.io/os: windows\r\n```\r\n\r\n**Anything else we need to know**:\r\nDo not assemble all above configurations into a single YAML file since it takes a time to Azure to execute the configuration which seems not happening when all configurations are deployed as a single file.\r\nGive 0,5 - 1 minute delays between the scripts.\r\n\r\nI had communicated the issue to Microsoft support and they turned me here and advised to engage @brendandburns on the matter."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/292599061","html_url":"https://github.com/kubernetes/kubernetes/issues/44146#issuecomment-292599061","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/44146","id":292599061,"user":{"login":"minherz","id":3994488,"avatar_url":"https://avatars1.githubusercontent.com/u/3994488?v=3","gravatar_id":"","url":"https://api.github.com/users/minherz","html_url":"https://github.com/minherz","followers_url":"https://api.github.com/users/minherz/followers","following_url":"https://api.github.com/users/minherz/following{/other_user}","gists_url":"https://api.github.com/users/minherz/gists{/gist_id}","starred_url":"https://api.github.com/users/minherz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minherz/subscriptions","organizations_url":"https://api.github.com/users/minherz/orgs","repos_url":"https://api.github.com/users/minherz/repos","events_url":"https://api.github.com/users/minherz/events{/privacy}","received_events_url":"https://api.github.com/users/minherz/received_events","type":"User","site_admin":false},"created_at":"2017-04-07T17:23:51Z","updated_at":"2017-04-07T17:23:51Z","body":"> > There is no reason to release Kubernetes for agents that run on Windows without support for volumes.\r\n\r\n> Where is this rule documented?\r\n\r\nAre you for real? If it was a joke, better place emoji. The \"rule\" is called common sense. You are welcome to suggest a way to use containerized application without external database services when you cannot persist the result of your work or otherwise, provide predefined set of data."}}
{"actor":{"display_login":"minherz"}}