{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67142","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67142/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67142/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67142/events","html_url":"https://github.com/kubernetes/kubernetes/issues/67142","id":348800529,"node_id":"MDU6SXNzdWUzNDg4MDA1Mjk=","number":67142,"title":"Running pod and CronJob pod with shared iSCSI PVC not scheduled on same node","user":{"login":"GrantKlassy","id":28637437,"node_id":"MDQ6VXNlcjI4NjM3NDM3","avatar_url":"https://avatars0.githubusercontent.com/u/28637437?v=4","gravatar_id":"","url":"https://api.github.com/users/GrantKlassy","html_url":"https://github.com/GrantKlassy","followers_url":"https://api.github.com/users/GrantKlassy/followers","following_url":"https://api.github.com/users/GrantKlassy/following{/other_user}","gists_url":"https://api.github.com/users/GrantKlassy/gists{/gist_id}","starred_url":"https://api.github.com/users/GrantKlassy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrantKlassy/subscriptions","organizations_url":"https://api.github.com/users/GrantKlassy/orgs","repos_url":"https://api.github.com/users/GrantKlassy/repos","events_url":"https://api.github.com/users/GrantKlassy/events{/privacy}","received_events_url":"https://api.github.com/users/GrantKlassy/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":1,"created_at":"2018-08-08T16:28:14Z","updated_at":"2018-09-05T11:03:43Z","closed_at":null,"author_association":"NONE","body":"/kind bug\r\n\r\n### **What happened**:\r\n\r\nA pod created by a cronjob and an existing pod which shared the same iSCSI pvc did not get scheduled on the same worker node. Because iSCSI can only be mounted read/write to one worker node, the pod scheduled by the cronjob became stuck in ContainerCreating.\r\n\r\n### **What you expected to happen**:\r\n\r\nBecause the two pods shared the same iSCSI pvc, the scheduler should have scheduled them on the same worker node to avoid conflicts. From [Oracle's documentation...](https://docs.oracle.com/cd/E52668_01/E88884/html/kubernetes-gsg-persistentvolume-iscsi.html)\r\n\r\n> Note that with iSCSI, support for both read and write operations limit you to hosting all of your pods on a single node. **The scheduler automatically ensures that pods with the same PersistentVolumeClaim run on the same worker node.**\r\n\r\n### **How to reproduce it (as minimally and precisely as possible)**:\r\n>Before\r\n```\r\n$ kubectl get pods -n debian-mirror -o wide\r\nNAME      READY     STATUS    RESTARTS   AGE       IP          NODE\r\nweb-pod   1/1       Running   0          12d       10.2.0.86   kwork1.<REDACTED>\r\n\r\n$ kubectl get cronjobs -n debian-mirror\r\nNAME                    SCHEDULE       SUSPEND   ACTIVE    LAST SCHEDULE   AGE\r\ndebian-mirror-updater   */15 * * * *   False     0         <none>          59s\r\n```\r\n>After (pods on different nodes, stuck in ContainerCreating)\r\n```\r\n$ kubectl get pods -n debian-mirror -o wide\r\nNAME                                     READY     STATUS              RESTARTS   AGE       IP          NODE\r\ndebian-mirror-updater-1533744000-8qqj4   0/1       ContainerCreating   0          1m        <none>      kwork3.<REDACTED>\r\nweb-pod                                  1/1       Running             0          12d       10.2.0.86   kwork1.<REDACTED>\r\n```\r\n>Sharing the same pvc\r\n```\r\n$ kubectl describe pod/web-pod -n debian-mirror | grep Volumes -A 4\r\nVolumes:\r\n  debian-mirror-data:\r\n    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)\r\n    ClaimName:  debian-mirror-pvc\r\n    ReadOnly:   false\r\n$ kubectl describe pod/debian-mirror-updater-1533744000-8qqj4 -n debian-mirror | grep Volumes -A 4\r\nVolumes:\r\n  debian-mirror-data:\r\n    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)\r\n    ClaimName:  debian-mirror-pvc\r\n    ReadOnly:   false\r\n$ kubectl get pvc -n debian-mirror\r\nNAME                STATUS    VOLUME            CAPACITY   ACCESS MODES   STORAGECLASS   AGE\r\ndebian-mirror-pvc   Bound     large-storage-2   1500Gi     RWO                           21d\r\n```\r\n\r\n### **Anything else we need to know?**:\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`):\r\n```\r\n$ kubectl version\r\nClient Version: version.Info{Major:\"1\", Minor:\"11\", GitVersion:\"v1.11.1\", GitCommit:\"b1b29978270dc22fecc592ac55d903350454310a\", GitTreeState:\"clean\", BuildDate:\"2018-07-17T18:53:20Z\", GoVersion:\"go1.10.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.3\", GitCommit:\"2bba0127d85d5a46ab4b778548be28623b32d0b0\", GitTreeState:\"clean\", BuildDate:\"2018-05-21T09:05:37Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n- Cloud provider or hardware configuration:\r\n[Bare-metal Typhoon kubernetes](https://typhoon.psdn.io/cl/bare-metal/), 3 controller nodes and 4 worker nodes\r\n```\r\n$ kubectl get nodes\r\nNAME           STATUS    ROLES               AGE       VERSION\r\n<REDACTED>     Ready     controller,master   60d       v1.10.3\r\n<REDACTED>     Ready     controller,master   60d       v1.10.3\r\n<REDACTED>     Ready     controller,master   60d       v1.10.3\r\n<REDACTED>     Ready     node                60d       v1.10.3\r\n<REDACTED>     Ready     node                60d       v1.10.3\r\n<REDACTED>     Ready     node                60d       v1.10.3\r\n<REDACTED>     Ready     node                60d       v1.10.3\r\n```\r\n- Install tools:\r\n[Typhoon bare-metal installation guide (terraform)](https://typhoon.psdn.io/cl/bare-metal/)\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/418690639","html_url":"https://github.com/kubernetes/kubernetes/issues/67142#issuecomment-418690639","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67142","id":418690639,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODY5MDYzOQ==","user":{"login":"ronakpandya7","id":31622425,"node_id":"MDQ6VXNlcjMxNjIyNDI1","avatar_url":"https://avatars0.githubusercontent.com/u/31622425?v=4","gravatar_id":"","url":"https://api.github.com/users/ronakpandya7","html_url":"https://github.com/ronakpandya7","followers_url":"https://api.github.com/users/ronakpandya7/followers","following_url":"https://api.github.com/users/ronakpandya7/following{/other_user}","gists_url":"https://api.github.com/users/ronakpandya7/gists{/gist_id}","starred_url":"https://api.github.com/users/ronakpandya7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronakpandya7/subscriptions","organizations_url":"https://api.github.com/users/ronakpandya7/orgs","repos_url":"https://api.github.com/users/ronakpandya7/repos","events_url":"https://api.github.com/users/ronakpandya7/events{/privacy}","received_events_url":"https://api.github.com/users/ronakpandya7/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T11:03:43Z","updated_at":"2018-09-05T11:03:43Z","author_association":"NONE","body":"any update?"}}
{"actor":{"display_login":"ronakpandya7"}}