make proxy pay attention to WEAVE_HTTP_ADDR

This commit is contained in:
Matthias Radestock committed 2016-02-03 11:28:38 +00:00
1 parent fdd006022d
commit dde244160b
4 files changed
+25 -12

No files matched your search

+3
View File
@@ -48,6 +48,9 @@ func callWeave(args ...string) ([]byte, []byte, error) {
// integration test suite breaking things.
propagateEnv("COVERAGE")
// In case the router control endpoint address is non-standard.
propagateEnv("WEAVE_HTTP_ADDR")
Log.Debug("Calling weave args: ", args, "env: ", cmd.Env)
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
+1 -11
View File
@@ -559,17 +559,7 @@ func (proxy *Proxy) getDNSDomain() string {
if proxy.WithoutDNS {
return ""
}
weaveContainer, err := proxy.client.InspectContainer("weave")
var weaveIP string
if err == nil && weaveContainer.NetworkSettings != nil {
weaveIP = weaveContainer.NetworkSettings.IPAddress
}
if weaveIP == "" {
weaveIP = "127.0.0.1"
}
weave := weaveapi.NewClient(weaveIP)
weave := weaveapi.NewClient(os.Getenv("WEAVE_HTTP_ADDR"))
domain, _ := weave.DNSDomain()
return domain
}