{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/180","repository_url":"https://api.github.com/repos/rancher/rancher","labels_url":"https://api.github.com/repos/rancher/rancher/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/180/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/180/events","html_url":"https://github.com/rancher/rancher/issues/180","id":60393980,"number":180,"title":"The eth0 10.x.x.x ip address is not available immediately when rancher starts","user":{"login":"feliksik","id":8527652,"avatar_url":"https://avatars.githubusercontent.com/u/8527652?v=3","gravatar_id":"","url":"https://api.github.com/users/feliksik","html_url":"https://github.com/feliksik","followers_url":"https://api.github.com/users/feliksik/followers","following_url":"https://api.github.com/users/feliksik/following{/other_user}","gists_url":"https://api.github.com/users/feliksik/gists{/gist_id}","starred_url":"https://api.github.com/users/feliksik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliksik/subscriptions","organizations_url":"https://api.github.com/users/feliksik/orgs","repos_url":"https://api.github.com/users/feliksik/repos","events_url":"https://api.github.com/users/feliksik/events{/privacy}","received_events_url":"https://api.github.com/users/feliksik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rancher/rancher/labels/area/networking","name":"area/networking","color":"FBCA04"},{"url":"https://api.github.com/repos/rancher/rancher/labels/kind/bug","name":"kind/bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"cjellick","id":2473240,"avatar_url":"https://avatars.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false},"assignees":[{"login":"cjellick","id":2473240,"avatar_url":"https://avatars.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/rancher/rancher/milestones/71","html_url":"https://github.com/rancher/rancher/milestones/Unscheduled","labels_url":"https://api.github.com/repos/rancher/rancher/milestones/71/labels","id":1853807,"number":71,"title":"Unscheduled","description":"This milestone includes bugs we have looked into but have not scheduled into an upcoming release.","creator":{"login":"deniseschannon","id":11410997,"avatar_url":"https://avatars.githubusercontent.com/u/11410997?v=3","gravatar_id":"","url":"https://api.github.com/users/deniseschannon","html_url":"https://github.com/deniseschannon","followers_url":"https://api.github.com/users/deniseschannon/followers","following_url":"https://api.github.com/users/deniseschannon/following{/other_user}","gists_url":"https://api.github.com/users/deniseschannon/gists{/gist_id}","starred_url":"https://api.github.com/users/deniseschannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniseschannon/subscriptions","organizations_url":"https://api.github.com/users/deniseschannon/orgs","repos_url":"https://api.github.com/users/deniseschannon/repos","events_url":"https://api.github.com/users/deniseschannon/events{/privacy}","received_events_url":"https://api.github.com/users/deniseschannon/received_events","type":"User","site_admin":false},"open_issues":544,"closed_issues":44,"state":"open","created_at":"2016-06-28T21:41:11Z","updated_at":"2016-09-01T18:17:10Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-03-09T19:10:06Z","updated_at":"2016-09-05T15:10:03Z","closed_at":null,"body":"If you run without rancher\r\n\r\ndocker run -d -p 7077:7077 -p 8080:8080 --name spark_master mraad/spark /usr/local/spark/sbin/sm.sh\r\n\r\nall is fine. Alternatively, you can run with rancher the equivalent of\r\n\r\ndocker run -d -p 7077:7077 -p 8080:8080 --name spark_master mraad/spark /usr/local/spark/sbin/sm10.sh\r\n\r\nThis scripts tries to detect the 10.x.x.x ip address from Rancher  with\r\n\r\nexport SPARK_LOCAL_IP=$(ip -o -4 addr list eth0 | awk '$4~\"^10\"{split($4,A,\"/\");print A[1]}')\r\n\r\nThis works fine if you start with /bin/bash and then run the script manually in the terminal. Problem is that this address only comes available after the container is started (there is a delay). So the script assumes that the eth0 address is available, but this is not yet the case just after starting. \r\n\r\nIdeally, you would have a mechanism to know the IP from within a container -- such as the one above. The question is whether rancher should guarantee the availability of the 10.x.x.x address, or whether the script should be more robust. At least this one was tricky to debug, especially since the ip-hack is not used when you run with the docker command. So I had to fall back to debug prints in the shell script. "},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/244768271","html_url":"https://github.com/rancher/rancher/issues/180#issuecomment-244768271","issue_url":"https://api.github.com/repos/rancher/rancher/issues/180","id":244768271,"user":{"login":"santagada","id":225897,"avatar_url":"https://avatars.githubusercontent.com/u/225897?v=3","gravatar_id":"","url":"https://api.github.com/users/santagada","html_url":"https://github.com/santagada","followers_url":"https://api.github.com/users/santagada/followers","following_url":"https://api.github.com/users/santagada/following{/other_user}","gists_url":"https://api.github.com/users/santagada/gists{/gist_id}","starred_url":"https://api.github.com/users/santagada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santagada/subscriptions","organizations_url":"https://api.github.com/users/santagada/orgs","repos_url":"https://api.github.com/users/santagada/repos","events_url":"https://api.github.com/users/santagada/events{/privacy}","received_events_url":"https://api.github.com/users/santagada/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T15:10:03Z","updated_at":"2016-09-05T15:10:03Z","body":"We apparently were bitten by this, isn't there a way to wait a second or two after image start?\r\n\r\nwe have a wget as first command on a bunch of images so I will change it to wget  --retry-connrefused --waitretry=1 --tries=5 to see if it fixes it. Hopefully 5 seconds is enough"}}
{"actor":{"display_login":"santagada"}}