Merge branch '1.2'
This commit is contained in:
commit
355c4bc58e
3 files changed
+8
-1
No files matched your search
@@ -35,6 +35,11 @@ func (n *Nameserver) HandleHTTP(router *mux.Router, dockerCli *docker.Client) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !dns.IsSubDomain(n.domain, hostname) {
|
||||||
|
n.infof("Ignoring registration %s %s %s (not a subdomain of %s)", hostname, ipStr, container, n.domain)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if err := n.AddEntry(hostname, container, n.ourName, ip); err != nil {
|
if err := n.AddEntry(hostname, container, n.ourName, ip); err != nil {
|
||||||
n.badRequest(w, fmt.Errorf("Unable to add entry: %v", err))
|
n.badRequest(w, fmt.Errorf("Unable to add entry: %v", err))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ var (
|
|||||||
containerIDRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/([^/]*)/.*")
|
containerIDRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/([^/]*)/.*")
|
||||||
weaveWaitEntrypoint = []string{"/w/w"}
|
weaveWaitEntrypoint = []string{"/w/w"}
|
||||||
weaveEntrypoint = "/home/weave/weaver"
|
weaveEntrypoint = "/home/weave/weaver"
|
||||||
|
weaveContainerName = "/weave"
|
||||||
)
|
)
|
||||||
|
|
||||||
func callWeave(args ...string) ([]byte, []byte, error) {
|
func callWeave(args ...string) ([]byte, []byte, error) {
|
||||||
|
|||||||
+2
-1
@@ -315,7 +315,8 @@ func containerShouldAttach(container *docker.Container) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func containerIsWeaveRouter(container *docker.Container) bool {
|
func containerIsWeaveRouter(container *docker.Container) bool {
|
||||||
return len(container.Config.Entrypoint) > 0 && container.Config.Entrypoint[0] == weaveEntrypoint
|
return container.Name == weaveContainerName &&
|
||||||
|
len(container.Config.Entrypoint) > 0 && container.Config.Entrypoint[0] == weaveEntrypoint
|
||||||
}
|
}
|
||||||
|
|
||||||
func (proxy *Proxy) createWait(r *http.Request, ident string) {
|
func (proxy *Proxy) createWait(r *http.Request, ident string) {
|
||||||
|
|||||||
Reference in new issue
Block a user