{"action":"created","issue":{"url":"https://api.github.com/repos/koding/koding/issues/9381","repository_url":"https://api.github.com/repos/koding/koding","labels_url":"https://api.github.com/repos/koding/koding/issues/9381/labels{/name}","comments_url":"https://api.github.com/repos/koding/koding/issues/9381/comments","events_url":"https://api.github.com/repos/koding/koding/issues/9381/events","html_url":"https://github.com/koding/koding/issues/9381","id":184854874,"number":9381,"title":"provider/google: `/etc/hosts` is rewritten by google deamon worker each time when machine is rebooted.","user":{"login":"ppknap","id":5021246,"avatar_url":"https://avatars.githubusercontent.com/u/5021246?v=3","gravatar_id":"","url":"https://api.github.com/users/ppknap","html_url":"https://github.com/ppknap","followers_url":"https://api.github.com/users/ppknap/followers","following_url":"https://api.github.com/users/ppknap/following{/other_user}","gists_url":"https://api.github.com/users/ppknap/gists{/gist_id}","starred_url":"https://api.github.com/users/ppknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppknap/subscriptions","organizations_url":"https://api.github.com/users/ppknap/orgs","repos_url":"https://api.github.com/users/ppknap/repos","events_url":"https://api.github.com/users/ppknap/events{/privacy}","received_events_url":"https://api.github.com/users/ppknap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/koding/koding/labels/Priority-Low","name":"Priority-Low","color":"E14C1F"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-24T14:22:10Z","updated_at":"2016-10-24T14:31:23Z","closed_at":null,"body":"At machine bootstrapping Cloud-init injects machine's hostname to `/etc/hosts` file:\r\n```\r\n[sh, -c, 'echo \\\"127.0.0.1 ppknap\\\" >> /etc/hosts']\r\n```\r\n\r\nhowever google workers [replace](http://stackoverflow.com/questions/35762778/google-cloud-compute-engine-etc-hosts) them each time when machine is started:\r\n```sh\r\nppknap@ppknap:~$ cat /etc/hosts\r\n127.0.0.1 localhost\r\n \r\n# The following lines are desirable for IPv6 capable hosts\r\n::1 ip6-localhost ip6-loopback\r\nfe00::0 ip6-localnet\r\nff00::0 ip6-mcastprefix\r\nff02::1 ip6-allnodes\r\nff02::2 ip6-allrouters\r\nff02::3 ip6-allhosts\r\n169.254.169.254 metadata.google.internal metadata\r\n```\r\n\r\n## Expected Behavior\r\n`/etc/hosts` should contain `127.0.0.1 hostname` entry.\r\n\r\n## Current Behavior\r\n`/etc/hosts` doesn't contain `127.0.0.1 hostname` entry.\r\n\r\n## Possible Solution\r\nAdd [startup script](https://cloud.google.com/compute/docs/startupscript) that will add missing entry.\r\n\r\n## Steps to Reproduce (for bugs)\r\nBuild GCE instance and check its `/etc/hosts`\r\n"},"comment":{"url":"https://api.github.com/repos/koding/koding/issues/comments/255757125","html_url":"https://github.com/koding/koding/issues/9381#issuecomment-255757125","issue_url":"https://api.github.com/repos/koding/koding/issues/9381","id":255757125,"user":{"login":"ppknap","id":5021246,"avatar_url":"https://avatars.githubusercontent.com/u/5021246?v=3","gravatar_id":"","url":"https://api.github.com/users/ppknap","html_url":"https://github.com/ppknap","followers_url":"https://api.github.com/users/ppknap/followers","following_url":"https://api.github.com/users/ppknap/following{/other_user}","gists_url":"https://api.github.com/users/ppknap/gists{/gist_id}","starred_url":"https://api.github.com/users/ppknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppknap/subscriptions","organizations_url":"https://api.github.com/users/ppknap/orgs","repos_url":"https://api.github.com/users/ppknap/repos","events_url":"https://api.github.com/users/ppknap/events{/privacy}","received_events_url":"https://api.github.com/users/ppknap/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T14:31:23Z","updated_at":"2016-10-24T14:31:23Z","body":"It only prevents errors like:\r\n```\r\nppknap@ppknap:~$ sudo su\r\nsudo: unable to resolve host ppknap\r\n```\r\nI didn't find it critical(even opposite - see labels). I created the issue just in case someone's complaining about it. "}}
{"actor":{"display_login":"ppknap"}}