set http listen address solely through the weave script
Previously it was set by the script only in fastdp mode; and in the router's main.go otherwise. Yet every interaction of the script with weave assumes the port is the script's HTTP_PORT=6784. By always starting the router with options to listen on that port we ensure that the router is in fact listening where the script expects it to. In doing this get rid of router.HTTPPort. We do need to hard-code the port in the proxy instead, but relying on router.HTTPPort was flawed anyway, for the above reasons.
This commit is contained in:
1 parent
d3d2863d52
commit
878a12002c
4 files changed
+5
-5
No files matched your search
+1
-2
@@ -17,7 +17,6 @@ import (
|
||||
. "github.com/weaveworks/weave/common"
|
||||
weavedocker "github.com/weaveworks/weave/common/docker"
|
||||
"github.com/weaveworks/weave/nameserver"
|
||||
"github.com/weaveworks/weave/router"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -490,7 +489,7 @@ func (proxy *Proxy) getDNSDomain() (domain string) {
|
||||
weaveIP = "127.0.0.1"
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("http://%s:%d/domain", weaveIP, router.HTTPPort)
|
||||
url := fmt.Sprintf("http://%s:6784/domain", weaveIP)
|
||||
resp, err := http.Get(url)
|
||||
if err != nil || resp.StatusCode != http.StatusOK {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user