mirror of https://github.com/docker/docs.git
always override hostname in mesos
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
parent
f80556ce9c
commit
edb72d0744
|
@ -6,6 +6,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
@ -72,10 +73,16 @@ func NewCluster(scheduler *scheduler.Scheduler, store *state.Store, TLSConfig *t
|
||||||
// Empty string is accepted by the scheduler.
|
// Empty string is accepted by the scheduler.
|
||||||
user, _ := options.String("mesos.user", "SWARM_MESOS_USER")
|
user, _ := options.String("mesos.user", "SWARM_MESOS_USER")
|
||||||
|
|
||||||
|
// Override the hostname here because mesos-go will try
|
||||||
|
// to shell out to the hostname binary and it won't work with our official image.
|
||||||
|
// Do not check error here, so mesos-go can still try.
|
||||||
|
hostname, _ := os.Hostname()
|
||||||
|
|
||||||
driverConfig := mesosscheduler.DriverConfig{
|
driverConfig := mesosscheduler.DriverConfig{
|
||||||
Scheduler: cluster,
|
Scheduler: cluster,
|
||||||
Framework: &mesosproto.FrameworkInfo{Name: proto.String(frameworkName), User: &user},
|
Framework: &mesosproto.FrameworkInfo{Name: proto.String(frameworkName), User: &user},
|
||||||
Master: cluster.master,
|
Master: cluster.master,
|
||||||
|
HostnameOverride: hostname,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Changing port for https
|
// Changing port for https
|
||||||
|
|
Loading…
Reference in New Issue