{"action":"closed","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/8335","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/8335/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/8335/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/8335/events","html_url":"https://github.com/kubernetes/kubernetes/issues/8335","id":76831372,"number":8335,"title":"Flip pod's ready condition when node is unreachable","user":{"login":"bnprss","id":12030955,"avatar_url":"https://avatars.githubusercontent.com/u/12030955?v=3","gravatar_id":"","url":"https://api.github.com/users/bnprss","html_url":"https://github.com/bnprss","followers_url":"https://api.github.com/users/bnprss/followers","following_url":"https://api.github.com/users/bnprss/following{/other_user}","gists_url":"https://api.github.com/users/bnprss/gists{/gist_id}","starred_url":"https://api.github.com/users/bnprss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnprss/subscriptions","organizations_url":"https://api.github.com/users/bnprss/orgs","repos_url":"https://api.github.com/users/bnprss/repos","events_url":"https://api.github.com/users/bnprss/events{/privacy}","received_events_url":"https://api.github.com/users/bnprss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/enhancement","name":"kind/enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/control-plane","name":"team/control-plane","color":"d2b48c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2015-05-15T19:31:21Z","updated_at":"2015-08-31T11:09:03Z","closed_at":"2015-08-31T11:09:03Z","body":"Getting hit by the new policy on skydns I shut down the host where it was running and waited for an automatic relocation.\r\nAfter a while (~1h) I manually stopped the pod and it was launched on a new one, as expected.\r\n\r\nIf host status is NotReady pods should be moved.\r\n\r\nHere is the pod status when host was down : \r\n```\r\n{\r\n    \"kind\": \"Pod\",\r\n    \"apiVersion\": \"v1beta3\",\r\n    \"metadata\": {\r\n        \"name\": \"kube-dns-787nc\",\r\n        \"generateName\": \"kube-dns-\",\r\n        \"namespace\": \"default\",\r\n        \"selfLink\": \"/api/v1beta1/pods/kube-dns-787nc?namespace=default\",\r\n        \"uid\": \"c32c0c6f-fb0a-11e4-83a8-42010af0b423\",\r\n        \"resourceVersion\": \"36141\",\r\n        \"creationTimestamp\": \"2015-05-15T14:00:37Z\",\r\n        \"labels\": {\r\n            \"k8s-app\": \"kube-dns\",\r\n            \"kubernetes.io/cluster-service\": \"true\"\r\n        },\r\n        \"annotations\": {\r\n            \"kubernetes.io/created-by\": \"{\\\"kind\\\":\\\"SerializedReference\\\",\\\"apiVersion\\\":\\\"v1beta3\\\",\\\"reference\\\":{\\\"kind\\\":\\\"ReplicationController\\\",\\\"namespace\\\":\\\"default\\\",\\\"name\\\":\\\"kube-dns\\\",\\\"uid\\\":\\\"c3274113-fb0a-11e4-83a8-42010af0b423\\\",\\\"apiVersion\\\":\\\"v1beta3\\\",\\\"resourceVersion\\\":\\\"136\\\"}}\"\r\n        }\r\n    },\r\n    \"spec\": {\r\n        \"volumes\": [\r\n            {\r\n                \"name\": \"dns-token\",\r\n                \"hostPath\": null,\r\n                \"emptyDir\": null,\r\n                \"gcePersistentDisk\": null,\r\n                \"awsElasticBlockStore\": null,\r\n                \"gitRepo\": null,\r\n                \"secret\": {\r\n                    \"secretName\": \"token-system-dns\"\r\n                },\r\n                \"nfs\": null,\r\n                \"iscsi\": null,\r\n                \"glusterfs\": null\r\n            }\r\n        ],\r\n        \"containers\": [\r\n            {\r\n                \"name\": \"etcd\",\r\n                \"image\": \"gcr.io/google_containers/etcd:2.0.9\",\r\n                \"command\": [\r\n                    \"/usr/local/bin/etcd\",\r\n                    \"-listen-client-urls\",\r\n                    \"http://127.0.0.1:2379,http://127.0.0.1:4001\",\r\n                    \"-advertise-client-urls\",\r\n                    \"http://127.0.0.1:2379,http://127.0.0.1:4001\",\r\n                    \"-initial-cluster-token\",\r\n                    \"skydns-etcd\"\r\n                ],\r\n                \"resources\": {},\r\n                \"terminationMessagePath\": \"/dev/termination-log\",\r\n                \"imagePullPolicy\": \"IfNotPresent\",\r\n                \"capabilities\": {}\r\n            },\r\n            {\r\n                \"name\": \"kube2sky\",\r\n                \"image\": \"gcr.io/google_containers/kube2sky:1.4\",\r\n                \"args\": [\r\n                    \"-domain=kubernetes.local\",\r\n                    \"-kubecfg_file=/etc/dns_token/kubeconfig\"\r\n                ],\r\n                \"resources\": {},\r\n                \"volumeMounts\": [\r\n                    {\r\n                        \"name\": \"dns-token\",\r\n                        \"readOnly\": true,\r\n                        \"mountPath\": \"/etc/dns_token\"\r\n                    }\r\n                ],\r\n                \"terminationMessagePath\": \"/dev/termination-log\",\r\n                \"imagePullPolicy\": \"IfNotPresent\",\r\n                \"capabilities\": {}\r\n            },\r\n            {\r\n                \"name\": \"skydns\",\r\n                \"image\": \"gcr.io/google_containers/skydns:2015-03-11-001\",\r\n                \"args\": [\r\n                    \"-machines=http://localhost:4001\",\r\n                    \"-addr=0.0.0.0:53\",\r\n                    \"-domain=kubernetes.local.\"\r\n                ],\r\n                \"ports\": [\r\n                    {\r\n                        \"name\": \"dns\",\r\n                        \"containerPort\": 53,\r\n                        \"protocol\": \"UDP\"\r\n                    },\r\n                    {\r\n                        \"name\": \"dns-tcp\",\r\n                        \"containerPort\": 53,\r\n                        \"protocol\": \"TCP\"\r\n                    }\r\n                ],\r\n                \"resources\": {},\r\n                \"livenessProbe\": {\r\n                    \"exec\": {\r\n                        \"command\": [\r\n                            \"/bin/sh\",\r\n                            \"-c\",\r\n                            \"nslookup foobar 127.0.0.1 \\u0026\\u003e /dev/null; echo ok\"\r\n                        ]\r\n                    },\r\n                    \"initialDelaySeconds\": 30,\r\n                    \"timeoutSeconds\": 5\r\n                },\r\n                \"terminationMessagePath\": \"/dev/termination-log\",\r\n                \"imagePullPolicy\": \"IfNotPresent\",\r\n                \"capabilities\": {}\r\n            }\r\n        ],\r\n        \"restartPolicy\": \"Always\",\r\n        \"dnsPolicy\": \"Default\",\r\n        \"host\": \"internal-changecommerce-minion-006\"\r\n    },\r\n    \"status\": {\r\n        \"phase\": \"Running\",\r\n        \"Condition\": [\r\n            {\r\n                \"type\": \"Ready\",\r\n                \"status\": \"False\"\r\n            }\r\n        ],\r\n        \"hostIP\": \"104.155.83.214\",\r\n        \"podIP\": \"10.244.6.2\",\r\n        \"containerStatuses\": [\r\n            {\r\n                \"name\": \"etcd\",\r\n                \"state\": {\r\n                    \"running\": {\r\n                        \"startedAt\": \"2015-05-15T18:25:16Z\"\r\n                    }\r\n                },\r\n                \"lastState\": {\r\n                    \"termination\": {\r\n                        \"exitCode\": 0,\r\n                        \"startedAt\": \"2015-05-15T15:12:48Z\",\r\n                        \"finishedAt\": \"2015-05-15T18:23:57Z\",\r\n                        \"containerID\": \"docker://1519a9ff8807f84ce55df761164460c66ba4a0e3f2eec0da7c650c9d121f4956\"\r\n                    }\r\n                },\r\n                \"ready\": true,\r\n                \"restartCount\": 1,\r\n                \"image\": \"gcr.io/google_containers/etcd:2.0.9\",\r\n                \"imageID\": \"docker://b6b9a86dc06aa1361357ca1b105feba961f6a4145adca6c54e142c0be0fe87b0\",\r\n                \"containerID\": \"docker://43ab1b874434e97b868ed3e79437dd5dd0225a504b24e31a9490edb11f70cbfd\"\r\n            },\r\n            {\r\n                \"name\": \"kube2sky\",\r\n                \"state\": {\r\n                    \"running\": {\r\n                        \"startedAt\": \"2015-05-15T18:36:15Z\"\r\n                    }\r\n                },\r\n                \"lastState\": {\r\n                    \"termination\": {\r\n                        \"exitCode\": 255,\r\n                        \"startedAt\": \"2015-05-15T18:36:05Z\",\r\n                        \"finishedAt\": \"2015-05-15T18:36:06Z\",\r\n                        \"containerID\": \"docker://d58e3371d512551275314f45417a0ac0cb98897aa7296a7d132280e080e3b3d3\"\r\n                    }\r\n                },\r\n                \"ready\": false,\r\n                \"restartCount\": 15,\r\n                \"image\": \"gcr.io/google_containers/kube2sky:1.4\",\r\n                \"imageID\": \"docker://3df83f1bccbf18ab59cd64da32cda26b4f56ae0cd6bb6e374477a60468f04232\",\r\n                \"containerID\": \"docker://919a5faa8a89dba0e975165995d32ba60b873d2b4e96a590fe840dee1b28a122\"\r\n            },\r\n            {\r\n                \"name\": \"skydns\",\r\n                \"state\": {\r\n                    \"running\": {\r\n                        \"startedAt\": \"2015-05-15T18:25:20Z\"\r\n                    }\r\n                },\r\n                \"lastState\": {\r\n                    \"termination\": {\r\n                        \"exitCode\": 2,\r\n                        \"startedAt\": \"2015-05-15T18:00:20Z\",\r\n                        \"finishedAt\": \"2015-05-15T18:23:57Z\",\r\n                        \"containerID\": \"docker://40a68db359a90b3aedcefbd960f51347841f21d65773140509dc045664b1a714\"\r\n                    }\r\n                },\r\n                \"ready\": true,\r\n                \"restartCount\": 9,\r\n                \"image\": \"gcr.io/google_containers/skydns:2015-03-11-001\",\r\n                \"imageID\": \"docker://791ddf327076e0fd35a1125568a56c05ee1f1dfd7a165c74f4d489d8a5e65ac5\",\r\n                \"containerID\": \"docker://dd53be5827169136e55d768ac7d05a5c3664a2d1ba4c4b377b1d862f78993ca1\"\r\n            }\r\n        ]\r\n    }\r\n}\r\n```"}}