Browse Source

Don't consider a server up after 5xx (#3709)

Without this change, we consider a server ready for verification if it
responds to a curl command with any HTTP response, even if that response
indicates a failure like 502 Bad Gateway.  (This particular response can
happen with frameworks that use nginx, when nginx has started but the
back end server isn't ready yet.)  With this change, we wait for a
successful response.
Michael Hixson 7 years ago
parent
commit
5bd688d283
1 changed files with 1 additions and 1 deletions
  1. 1 1
      toolset/utils/docker_helper.py

+ 1 - 1
toolset/utils/docker_helper.py

@@ -336,7 +336,7 @@ class DockerHelper:
         try:
             self.client.containers.run(
                 'techempower/tfb.wrk',
-                'curl --max-time 5 %s' % url,
+                'curl --fail --max-time 5 %s' % url,
                 remove=True,
                 log_config={'type': None},
                 network=self.benchmarker.config.network,