Commit accd28a4 authored by Darren Shepherd's avatar Darren Shepherd
Browse files

Don't exit agent on failure

parent 3a6aca68
Showing with 3 additions and 3 deletions
+3 -3
......@@ -24,4 +24,4 @@ COPY register.py resolve_url.py run.sh /
ENTRYPOINT ["/run.sh"]
LABEL "io.rancher.container.system"="rancher-agent"
ENV HOST_DOCKER_SOCK /var/run/docker.sock
ENV RANCHER_AGENT_IMAGE rancher/agent:v1.1.0-rc14
ENV RANCHER_AGENT_IMAGE rancher/agent:v1.1.0-rc15
......@@ -305,9 +305,9 @@ run_bootstrap()
# Sanity check that these credentials are valid
if curl -u ${CATTLE_ACCESS_KEY}:${CATTLE_SECRET_KEY} -s ${CATTLE_URL}/schemas/configcontent >test.json 2>&1; then
if [ "$(cat test.json | jq -r .id)" != "configContent" ]; then
if cat test.json | jq -r .id >/dev/null 2>&1 && [ "$(cat test.json | jq -r .id)" != "configContent" ]; then
error Credentials are no longer valid, please re-register this agent
exit 1
return 1
fi
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment