{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/fleet/issues/1111","labels_url":"https://api.github.com/repos/coreos/fleet/issues/1111/labels{/name}","comments_url":"https://api.github.com/repos/coreos/fleet/issues/1111/comments","events_url":"https://api.github.com/repos/coreos/fleet/issues/1111/events","html_url":"https://github.com/coreos/fleet/issues/1111","id":55671519,"number":1111,"title":"container moved to another host, but can not get the new IP","user":{"login":"huikang","id":463631,"avatar_url":"https://avatars.githubusercontent.com/u/463631?v=3","gravatar_id":"","url":"https://api.github.com/users/huikang","html_url":"https://github.com/huikang","followers_url":"https://api.github.com/users/huikang/followers","following_url":"https://api.github.com/users/huikang/following{/other_user}","gists_url":"https://api.github.com/users/huikang/gists{/gist_id}","starred_url":"https://api.github.com/users/huikang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huikang/subscriptions","organizations_url":"https://api.github.com/users/huikang/orgs","repos_url":"https://api.github.com/users/huikang/repos","events_url":"https://api.github.com/users/huikang/events{/privacy}","received_events_url":"https://api.github.com/users/huikang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coreos/fleet/labels/needs-more","name":"needs-more","color":"bfdadc"},{"url":"https://api.github.com/repos/coreos/fleet/labels/support-request","name":"support-request","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-27T20:41:08Z","updated_at":"2015-01-27T21:15:01Z","closed_at":null,"body":"Hi,\r\nIn my fleet unit file, I created a container and pass the COREOS_PUBLIC_IPV4 as a docker environment variable to the container, like this\r\n               EnvironmentFile=/etc/environment\r\n               docker run    -h service-%i      \\\r\n                                    --name service-%i               \\\r\n                                    -e HOST_IP=$COREOS_PUBLIC_IPV4        \\\r\n                                    command\r\nSuch that the script in the container can use the host IP to do some configuration. For exmple, the instance 01 is created on host IP 172.16.1.101.\r\n\r\nHowever, after I reboot the 172.17.1.101 host and the container moved to another host (172.17.1.102), I found that the container environment variable still uses the old IP (101), instead of the new one (172.17.1.102).\r\n\r\nI further stop and destroy the instance, and the restart the instance on the new host. It stills use the old IP. \r\nCould anyone help on the problem? Thanks.\r\n\r\n- Hui\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/coreos/fleet/issues/comments/71729330","html_url":"https://github.com/coreos/fleet/issues/1111#issuecomment-71729330","issue_url":"https://api.github.com/repos/coreos/fleet/issues/1111","id":71729330,"user":{"login":"bcwaldon","id":548759,"avatar_url":"https://avatars.githubusercontent.com/u/548759?v=3","gravatar_id":"","url":"https://api.github.com/users/bcwaldon","html_url":"https://github.com/bcwaldon","followers_url":"https://api.github.com/users/bcwaldon/followers","following_url":"https://api.github.com/users/bcwaldon/following{/other_user}","gists_url":"https://api.github.com/users/bcwaldon/gists{/gist_id}","starred_url":"https://api.github.com/users/bcwaldon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcwaldon/subscriptions","organizations_url":"https://api.github.com/users/bcwaldon/orgs","repos_url":"https://api.github.com/users/bcwaldon/repos","events_url":"https://api.github.com/users/bcwaldon/events{/privacy}","received_events_url":"https://api.github.com/users/bcwaldon/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T21:15:01Z","updated_at":"2015-01-27T21:15:01Z","body":"Ok, so this isn't adding up. Your environment file is clearly set up properly. Did you have two instances of the same unit running on both core-01 and core-02? What makes you believe that something went wrong here?"}}