replace proxy /weave endpoint with /status
which is more standard with others, and doesn't conflict with docker api
This commit is contained in:
1 parent
6e2bb075a6
commit
2be69634df
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -73,7 +73,7 @@ func (proxy *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
proxy.serveWithInterceptor(&startContainerInterceptor{proxy.client, proxy.withDNS, proxy.withIPAM}, w, r)
|
proxy.serveWithInterceptor(&startContainerInterceptor{proxy.client, proxy.withDNS, proxy.withIPAM}, w, r)
|
||||||
case execCreateRegexp.MatchString(path):
|
case execCreateRegexp.MatchString(path):
|
||||||
proxy.serveWithInterceptor(&createExecInterceptor{proxy.client, proxy.withIPAM}, w, r)
|
proxy.serveWithInterceptor(&createExecInterceptor{proxy.client, proxy.withIPAM}, w, r)
|
||||||
case strings.HasPrefix(path, "/weave"):
|
case strings.HasPrefix(path, "/status"):
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
default:
|
default:
|
||||||
proxy.serveWithInterceptor(&nullInterceptor{}, w, r)
|
proxy.serveWithInterceptor(&nullInterceptor{}, w, r)
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ wait_for_status_ip() {
|
|||||||
WAIT_TIME=0
|
WAIT_TIME=0
|
||||||
while [ $WAIT_TIME -lt 3 ]; do
|
while [ $WAIT_TIME -lt 3 ]; do
|
||||||
sleep $WAIT_TIME
|
sleep $WAIT_TIME
|
||||||
http_call_ip $1 $2 GET ${3:-/status} >/dev/null && return 0
|
http_call_ip $1 $2 GET /status >/dev/null && return 0
|
||||||
WAIT_TIME=$((WAIT_TIME+1))
|
WAIT_TIME=$((WAIT_TIME+1))
|
||||||
done
|
done
|
||||||
echo "Timed out waiting for container to start." >&2
|
echo "Timed out waiting for container to start." >&2
|
||||||
@@ -866,7 +866,7 @@ case "$COMMAND" in
|
|||||||
$WEAVEPROXY_DOCKER_ARGS \
|
$WEAVEPROXY_DOCKER_ARGS \
|
||||||
$EXEC_IMAGE "$@")
|
$EXEC_IMAGE "$@")
|
||||||
|
|
||||||
wait_for_status_ip $PROXY_HOST $PROXY_PORT /weave
|
wait_for_status_ip $PROXY_HOST $PROXY_PORT
|
||||||
echo $PROXY_CONTAINER
|
echo $PROXY_CONTAINER
|
||||||
;;
|
;;
|
||||||
connect)
|
connect)
|
||||||
|
|||||||
Reference in new issue
Block a user