style95 commented on issue #1790: Add documentation for docker for mac
URL: 
https://github.com/apache/incubator-openwhisk/pull/1790#issuecomment-302031999
 
 
   @rabbah @markusthoemmes @csantanapr 
   I updated the logic.
   Now there is no retry logic on 503 service unavailable.
   
   Let me explain previous problem first.
   
   It was a kind of timing issue. When test codes send `syncPost(ip, 8080, 
"/init", value)`, there is a possibility that target action container is not 
ready yet. In this case, proxy server will get connection failed(`No route to 
host`), and accordingly proxy returns `503 service unavailable`.
   
   I found the [way to configure 
squid](http://www.squid-cache.org/Doc/config/connect_retries/) to retry when 
connection attempts fails with "No route to host".
   It will retry for some time(it is configurable) in case of connection 
failure until the action container is ready.
   
   Now every tests worked as expected except only once test case.
   
   ```
   ...
   actionContainers.DockerExampleContainerTests > bad containers should timeout 
bad proxy with exception FAILED
   ...
   ```
   
   Difference on this test is as follow:
   
   This test run `badproxy` container and try to send `/init` request to it.
   Since `badproxy` does not expose any port, squid proxy server get 
"Connection refused" instead of "No route to host" And in this case, squid 
proxy returns with `503 service unavailable` immediately.
   
   I think, squid proxy is supposed to retry on both the cases.
   I opened an issue at the squid repo: 
https://github.com/squid-cache/squid/issues/23
   
   If this is resolved, it will finally make it.
   In the meantime, please review the code again.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to