rawlinp opened a new pull request #5343: URL: https://github.com/apache/trafficcontrol/pull/5343
## What does this PR (Pull Request) do? When TR receives a 503 from TM, log it instead of silently retrying. ## Which Traffic Control components are affected by this PR? - Traffic Router ## What is the best way to verify this PR? Run TR but point it at a TM (or a mock http server) that returns a 503 (python script below can be used). ## The following criteria are ALL met by this PR - [ ] This PR includes tests OR I have explained why tests are unnecessary - [x] no docs necessary - [x] This PR includes an update to CHANGELOG.md - [x] This PR includes any and all required license headers - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details) ## Additional Information This python script can be used to return 503s: ``` #!/usr/bin/env python3 from http.server import BaseHTTPRequestHandler, HTTPServer class MyHandler(BaseHTTPRequestHandler): def do_GET(self): try: self.send_response(503) # let bots know whats up self.end_headers() return except IOError: self.send_error(500,'Internal error') class TimeoutingHTTPServer(HTTPServer): def finish_request(self, request, client_address): request.settimeout(5) # Really short timeout as there is only 1 thread HTTPServer.finish_request(self, request, client_address) def main(): try: server = TimeoutingHTTPServer(('',8081), MyHandler) print('Listening...') server.serve_forever() except KeyboardInterrupt: print('quit...') server.socket.close() if __name__ == '__main__': main() ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
