Skip to content

Commit

Permalink
Set the hostname in the framework information proto
Browse files Browse the repository at this point in the history
Due to a bug in Mesos < 0.24.0, Marathon users have observed JVM crashes
when the framework the host's hostname is nor resolvable
(https://issues.apache.org/jira/browse/MESOS-3145).

This change works around the problem by setting the hostname in the
Framework Information proto.
  • Loading branch information
gkleiman committed Aug 18, 2015
1 parent a6e6d93 commit 912408f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ trait SchedulerConfiguration extends ScallopConf {
descr = "The list of ZooKeeper servers for storing state",
default = Some("localhost:2181"))
lazy val hostname = opt[String]("hostname",
descr = "The advertised hostname stored in ZooKeeper so another standby " +
"host can redirect to this elected leader",
descr = "The advertised hostname of this Chronos instance for network communication. This is used by other" +
"Chronos instances and the Mesos master",
default = Some(java.net.InetAddress.getLocalHost.getHostName))
lazy val leaderMaxIdleTimeMs = opt[Int]("leader_max_idle_time",
descr = "The look-ahead time for scheduling tasks in milliseconds",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SchedulerDriverBuilder {
.setRole(config.mesosRole())
.setFailoverTimeout(config.failoverTimeoutSeconds())
.setUser(config.user())
.setHostname(config.hostname())

// Set the ID, if provided
frameworkId.foreach(frameworkInfoBuilder.setId)
Expand Down

0 comments on commit 912408f

Please sign in to comment.