{"action":"closed","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/29292","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/29292/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/29292/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/29292/events","html_url":"https://github.com/kubernetes/kubernetes/issues/29292","id":166608248,"node_id":"MDU6SXNzdWUxNjY2MDgyNDg=","number":29292,"title":"Ensure container prestop hooks are run before a machine shuts down","user":{"login":"yujuhong","id":10524058,"node_id":"MDQ6VXNlcjEwNTI0MDU4","avatar_url":"https://avatars1.githubusercontent.com/u/10524058?v=4","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"labels":[{"id":158907408,"node_id":"MDU6TGFiZWwxNTg5MDc0MDg=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/platform/gke","name":"area/platform/gke","color":"d4c5f9","default":false},{"id":267761362,"node_id":"MDU6TGFiZWwyNjc3NjEzNjI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/feature","name":"kind/feature","color":"c7def8","default":false},{"id":778118402,"node_id":"MDU6TGFiZWw3NzgxMTg0MDI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lifecycle/rotten","name":"lifecycle/rotten","color":"604460","default":false},{"id":149621825,"node_id":"MDU6TGFiZWwxNDk2MjE4MjU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/awaiting-more-evidence","name":"priority/awaiting-more-evidence","color":"fef2c0","default":false},{"id":173494222,"node_id":"MDU6TGFiZWwxNzM0OTQyMjI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cluster-lifecycle","name":"sig/cluster-lifecycle","color":"d2b48c","default":false},{"id":173493665,"node_id":"MDU6TGFiZWwxNzM0OTM2NjU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/node","name":"sig/node","color":"d2b48c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-07-20T15:19:40Z","updated_at":"2018-06-24T12:42:29Z","closed_at":"2018-06-24T12:42:28Z","author_association":"CONTRIBUTOR","body":"This is a GKE user request. They want the prestop hooks to be run before the machine shutdown. \n\nFor planned machine shutdowns, one can simply drain the pods from the nodes. In which case, kubelet will execute prestop hooks. The only exception is the DaemonSet pods, but this will be resolved after #1574 is implemented.\n\nFor unexpected shutdowns, things are more complicated. @roberthbailey mentioned that \" We've discussed the option of adding a shutdown.sh script to all nodes which would try to cleanly shut the machine down, but I don't think the kubelet exposes an API that it could even call to start gracefully terminating pods. And draining the machine wouldn't have any effect on a DaemonSet because they don't get drained (since they are pinned to machines). \"\n\nWe may want to consider adding a mechanism to trigger kubelet to gracefully terminate all pods on the node. \n\n/cc @roberthbailey @davidopp \n"}}
{"actor":{"display_login":"k8s-ci-robot"}}