[ https://issues.apache.org/jira/browse/MESOS-672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13843468#comment-13843468 ]
Benjamin Hindman commented on MESOS-672: ---------------------------------------- Hey [~xujyan], given the code today doing something like (3) and (4) are going to be difficult (or hacky) in order to cleanly be backwards compatibility. Here's another suggestion for (3) which could be used for (4) as well: add some data "semantics" into the LeaderContender in zookeeper/contender.hpp rather than just passing arbitrary "data". For example, you could have a LeaderContender constructor which takes a map from "key" to "value" and construct multiple znodes for each "key". Then, to implement Brenden's approach you could pass a map with a 'hostname' key. The LeaderDetector and/or MasterDetector would likely still have some grossness to pull this data out, and the StandaloneMasterDetector might be a bit weird here. > Web UI redirection does not work for hosts whose ip addresses are not > publicly accessible > ----------------------------------------------------------------------------------------- > > Key: MESOS-672 > URL: https://issues.apache.org/jira/browse/MESOS-672 > Project: Mesos > Issue Type: Bug > Affects Versions: 0.14.0 > Reporter: Jie Yu > Assignee: Jie Yu > Labels: twitter > Fix For: 0.17.0 > > > Web UI redirection does not work for hosts where the local interface address > is not publicly accessible. For example, with EC2 the redirection will not > work. > There are some possible solutions: > (1) Add a new REST endpoint on the master called 'info'. When master A finds > out that master B is the leader it hits master B's '/master/info' endpoint to > get back information about that master including it's (public) hostname. > - This also requires making sure that each master uses it's public > hostname which may possibly require adding a --hostname flag (similar to what > we did on the slave). > - Alternatively, we could update os::hostname to special case EC2, thus > making Mesos work "out of the box" without requiring operators to explicitly > set it to the private hostname. > (2) Add a 'hostname' field to PID and make sure that stringification of the > PID uses the hostname. Then master redirection is done by getting the > hostname of the PID instead of the IP. Note this still requires detecting the > public hostname using mechanisms mentioned in (1). > (3) Store a separate ZNode for the public hostname. Patch from Brenden > Matthews: https://reviews.apache.org/r/11975/ > (4) Store a protobuf blob of 'MasterInfo' in ZooKeeper which includes the > hostname field (suggested by Vinod Kone in the above review). We have to deal > with issues with backwards compatibility. When old slaves read the new > master's data, it deserializes the protobuf blob as a PID; when new slaves > read the old master's data, it deserializes the PID as protobuf. > This ticket intends to evaluate these potential solutions and solicit new > ideas. -- This message was sent by Atlassian JIRA (v6.1.4#6159)