Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1598 from /issues/1584-improved-proxy-router-restart
Browse files Browse the repository at this point in the history
Improved detection of router container restart

Fixes #1584
  • Loading branch information
rade committed Oct 28, 2015
2 parents b697b6e + 4792fe6 commit a31b287
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions proxy/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
containerIDRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/([^/]*)/.*")
weaveWaitEntrypoint = []string{"/w/w"}
weaveEntrypoint = "/home/weave/weaver"
weaveContainerName = "/weave"
)

func callWeave(args ...string) ([]byte, []byte, error) {
Expand Down
3 changes: 2 additions & 1 deletion proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ func containerShouldAttach(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) {
Expand Down

0 comments on commit a31b287

Please sign in to comment.