{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/70279","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/70279/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/70279/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/70279/events","html_url":"https://github.com/kubernetes/kubernetes/issues/70279","id":374328952,"node_id":"MDU6SXNzdWUzNzQzMjg5NTI=","number":70279,"title":"Windows GotPodNetworkStatus assumes addToNetwork is idempotent, it's not ","user":{"login":"fasaxc","id":469264,"node_id":"MDQ6VXNlcjQ2OTI2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/469264?v=4","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/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":422106010,"node_id":"MDU6TGFiZWw0MjIxMDYwMTA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/windows","name":"sig/windows","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-26T10:46:55Z","updated_at":"2018-10-31T13:59:34Z","closed_at":null,"author_association":"COLLABORATOR","body":"<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!-->\r\n\r\n\r\n**What happened**:\r\n\r\nOn Windows, CNI plugins always get called twice (or more) with command ADD when a pod is created.\r\n\r\nThe issue is that `cni_windows.go:GetPodNetworkStatus()` calls `plugin.addToNetwork` to check the status, but this triggers a new add.\r\n\r\n**What you expected to happen**:\r\n\r\nOnly a single ADD since ADD is not idempotent.\r\n\r\nAs per the (current, at least) CNI spec: \r\n\r\n> A runtime must not call ADD twice (without a corresponding DEL) for the same (network name, container id, name of the interface inside the container). This implies that a given container ID may be added to a specific network more than once only if each addition is done with a different interface name.\r\n\r\n**How to reproduce it (as minimally and precisely as possible)**:\r\n\r\nNetwork a pod on windows, will see two copies of this log:\r\n```\r\nI1023 16:05:18.098116    7176 cni.go:275] About to del CNI network k8s-pod-network ...\r\n```\r\n\r\n**Anything else we need to know?**:\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`): v1.11.3\r\n- Cloud provider or hardware configuration:\r\n- OS (e.g. from /etc/os-release):\r\n- Kernel (e.g. `uname -a`):\r\n- Install tools:\r\n- Others:\r\n\r\n<!-- DO NOT EDIT BELOW THIS LINE -->\r\n/kind bug"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/434697519","html_url":"https://github.com/kubernetes/kubernetes/issues/70279#issuecomment-434697519","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/70279","id":434697519,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDY5NzUxOQ==","user":{"login":"fasaxc","id":469264,"node_id":"MDQ6VXNlcjQ2OTI2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/469264?v=4","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T13:59:34Z","updated_at":"2018-10-31T13:59:34Z","author_association":"COLLABORATOR","body":"I put up a PR that has an alternative approach but it relies on the name of the interface being consistent with those used by the existing CNI plugins (i.e. it has to contain the container ID).  Might be a step int he right direction, at least.  I can respin if there's an alternative approach but I couldn't see an API to determine the HNS endpoints attached to a container."}}
{"actor":{"display_login":"fasaxc"}}