-
Notifications
You must be signed in to change notification settings - Fork 681
Report errors when weave script talks to weave component via http #2096
Conversation
I rebased this locally and came across the following problems:
That last one should return nothing post #2101. The code needs adjusting since it currently matches on a "404 ..." response text. |
else | ||
res=1 | ||
call_weave GET $STATUS_URL || res=$? | ||
if [ $res = 404 ] ; then |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
That needs fixing. |
c31acbc
to
0b41ae3
Compare
Rebased and addressed comments. |
0b41ae3
to
0498e73
Compare
I have tweaked the code slightly. Feel free to squash. Should Does it ignore errors? |
echo "Call to $CONTAINER_NAME failed." >&2 | ||
return 1 | ||
fi | ||
http_call $HTTP_ADDR "$@" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
I changed It now never returns a failure status for the overall |
e1a1d73
to
e5fd56f
Compare
This is consistently failing in CI in run_on $HOST1 sudo kill -KILL $(docker_on $HOST1 inspect --format='{{.State.Pid}}' c2)
That container is the
|
I cannot shake off the suspicion that something else, specific to this PR, is going on here. We have had 10 successive failures in CI for this PR, which is way higher than the normal failure rate of It could just be that the timing has shifted... |
When working to understand this, I found the failure incredibly sensitive - adding one more line of logging before the allocate is attempted would make it succeed every time. I see it failing due to |
and fix up all uses of this function.
e5fd56f
to
934ec24
Compare
Fixes #2052.
The output from
curl
is placed in a temporary file, which is sent to stdout if the result is 2xx and stderr otherwise, except for 404 errors which are specifically handled in various places socall_weave
swallows the "404 not found" message.The "Call to weave failed." message is removed, in favour of whatever actual error came back from
curl
. It may be that this makes some troubleshooting harder.Also fixes an issue introduced by #1200 if the user has disabled IPAM with the (undocumented)
--ipalloc-range=""
whereby each fixed IP address specified would receive a "404" message, and this PR would otherwise have turned that into a failure of the entire command.