YARN-6113, we have added a re-direct NM web service to get container logs which could cause the potential infinite redirection.
It can happens when:
- Call AHS web service to get a running/finished AM container log for a running application.
- AHS web service would re-direct the request the specific NM given the application is still running. And the NM would handle the request
- If the log file we requested has already been aggregated and deleted from NM, the NM would re-direct the request back to AHS.
In this case, we would do step 2 and step 3 infinite times.