My preferred solution is to: 1. Remove the requirement that the forward and reverse DNS match ( https://github.com/airbnb/mesos/commit/6953571758d287d159a289e62c1fd0d685b5e8e3), and 2. Write the leading master's hostname to ZooKeeper for discovery ( https://github.com/airbnb/mesos/commit/3f6854c40058d8542d38c9c9a67bb5118b008552 ).
To me this seems like the least troublesome approach. Furthermore, it's matches the behaviour of several other projects such as Hadoop (which also uses the machine's hostname from `gethostname(2)` or equivalent). On Mon, Dec 9, 2013 at 12:50 PM, Tim St Clair <[email protected]> wrote: > full ref: > > > http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html > > ----- Original Message ----- > > > From: "Tim St Clair" <[email protected]> > > To: [email protected] > > Cc: "dev" <[email protected]> > > Sent: Monday, December 9, 2013 2:46:46 PM > > Subject: Re: mesos and ec2 > > > inline > > > ----- Original Message ----- > > > > From: "Benjamin Hindman" <[email protected]> > > > > > To: "dev" <[email protected]>, [email protected] > > > > > Sent: Monday, December 9, 2013 2:06:36 PM > > > > > Subject: mesos and ec2 > > > > > > If you don't use Mesos on EC2 then you can likely stop reading this > email. > > > > > > When using Mesos on EC2 you might notice that the web UI seems broken. > The > > > two things we know about are: > > > > > > (1) You can't use '/master/redirect' on a master because it attempts to > > > send > > > you to the private IP hostname of the leading master (which obviously > your > > > browser can't connect to). > > > > > Why not use a simple detection mechanics: > > > my_hostname=$(hostname -f) > > > curl --connect-timeout 3 --silent http://169.254.169.254/2012-01-12 > > if [ $? -eq 0 ]; then > > my_hostname=$(curl > > http://169.254.169.254/2012-01-12/meta-data/public-hostname) > > echo "Found EC2 public hostname: $my_hostname" > > fi > > > > (2) You can't get information from the slaves (and thus, information > about > > > your tasks such as file download/tailing) because your browser tries to > > > connect to the slave's private hostname. > > > > > same details as above. > > > > We're trying to architect a clean fix for (1) in MESOS-672 . Feel free > to > > > follow along and please add any suggestions. In the mean time, the best > > > solution that we know of is to modify /etc/hosts on the masters to > resolve > > > the public hostname from the private IP. > > > > > > For (2) you can set the --hostname flag on the slave to the public > > > hostname. > > > Within EC2 the public hostname will resolve to the private IP address > so > > > you > > > won't be paying extra traffic fees but your browser will also be able > to > > > get > > > the public IP address from the public hostname. > > > > > > Of course, don't forget to set up your security groups to make sure the > > > master and slave port(s) are open (5050 and 5051 by default > respectively). > > > > > > We plan to make these fixes less of a manual process in the future and > > > would > > > love to hear your suggestions! > > > > > > Thanks, > > > > > > Ben. > > > > > -- > > Cheers, > > Tim > > -- > Cheers, > Tim >
