{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9192","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9192/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9192/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9192/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9192","id":84660508,"number":9192,"title":"Watch kubelet flag file, so restart kubelet upon changes.","user":{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars.githubusercontent.com/u/7740897?v=3","gravatar_id":"","url":"https://api.github.com/users/dchen1107","html_url":"https://github.com/dchen1107","followers_url":"https://api.github.com/users/dchen1107/followers","following_url":"https://api.github.com/users/dchen1107/following{/other_user}","gists_url":"https://api.github.com/users/dchen1107/gists{/gist_id}","starred_url":"https://api.github.com/users/dchen1107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchen1107/subscriptions","organizations_url":"https://api.github.com/users/dchen1107/orgs","repos_url":"https://api.github.com/users/dchen1107/repos","events_url":"https://api.github.com/users/dchen1107/events{/privacy}","received_events_url":"https://api.github.com/users/dchen1107/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/lgtm","name":"lgtm","color":"159818"}],"state":"open","locked":false,"assignee":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-03T16:50:17Z","updated_at":"2015-06-03T20:17:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9192","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9192","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9192.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9192.patch"},"body":"With this PR, kubelet flag change does trigger kubelet restart to pick up the new flagset. Here are the testing I had done last night:\r\n\r\n1) Before flag change:\r\n```\r\n# ps -ef | grep kubelet\r\nroot     26779     1  2 16:25 ?        00:00:02 /usr/local/bin/kubelet --api_servers=https://kubernetes-master --enable-debugging-handlers=true --cloud_provider=gce --config=/etc/kubernetes/manifests --allow_privileged=False --v=2 --cluster_dns=10.0.0.10 --cluster_domain=cluster.local --configure-cbr0=true --cgroup_root=/ --system-container=/system\r\n\r\n# kubelet --version\r\nKubernetes v0.18.0-284-g1d9434802305cb-dirty\r\n```\r\n2) Modified kubelet flag file:\r\n```\r\n$ git diff\r\ndiff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default\r\nindex afdf3ad..d08ec43 100644\r\n--- a/cluster/saltbase/salt/kubelet/default\r\n+++ b/cluster/saltbase/salt/kubelet/default\r\n@@ -75,4 +75,4 @@\r\n   {% set cgroup_root = \"--cgroup_root=/\" -%}\r\n {% endif -%}\r\n \r\n-DAEMON_ARGS=\"{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} --allow_privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}}\"\r\n+DAEMON_ARGS=\"{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} --allow_privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} --enable-load-reader=true\"\r\n```\r\n3) kube_push above flag change and make sure it is the same build:\r\n```\r\n# ps -ef | grep kubelet\r\nroot      3168     1  4 16:42 ?        00:00:01 /usr/local/bin/kubelet --api_servers=https://kubernetes-master --enable-debugging-handlers=true --cloud_provider=gce --config=/etc/kubernetes/manifests --allow_privileged=False --v=2 --cluster_dns=10.0.0.10 --cluster_domain=cluster.local --configure-cbr0=true --cgroup_root=/ --system-container=/system --enable-load-reader=true\r\n# kubelet --version\r\nKubernetes v0.18.0-284-g1d9434802305cb-dirty\r\n```\r\nI checked other daemons, and flag changes do trigger daemon restart.\r\n\r\nFix #9110 \r\n\r\ncc/ @gmarek @davidopp "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/108602821","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9192#issuecomment-108602821","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9192","id":108602821,"user":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T20:17:55Z","updated_at":"2015-06-03T20:17:55Z","body":"LGTM"}}