jlpedrosa commented on a change in pull request #24702: [SPARK-27989] [Kubernetes] [Core] Added retries on the connection to the driver for k8s URL: https://github.com/apache/spark/pull/24702#discussion_r292426146
########## File path: resource-managers/kubernetes/docker/src/main/dockerfiles/spark/Dockerfile ########## @@ -51,6 +51,8 @@ ENV SPARK_HOME /opt/spark WORKDIR /opt/spark/work-dir RUN chmod g+w /opt/spark/work-dir +#Disable negative dns reslolution https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html +RUN sed -i -e 's/networkaddress.cache.negative.ttl=10/networkaddress.cache.negative.ttl=0/g' /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/java.security Review comment: Hi @skonto For me any option is ok, the entrypoint for the container, I'll adapt to whatever you guys prefer. I am aware that the Dockerfile is only used in k8s, the train of thoughts is that this scenario is only common at k8s when pods networking may take some time (CNI, Sidecar pods..). Just let me know what is the path you preffer and I'll implement in such way. In the docker image that spark uses (the base [spark image](https://github.com/apache/spark/blob/1217996f1574f758d8cccc1c4e3846452d24b35b/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/Dockerfile#L18) is openjdk8 alpine [openjdk8](https://github.com/docker-library/openjdk/blob/178c542fbb93a8f8a42e331b73a1214c9d8ba81d/8/jdk/alpine/Dockerfile#L7)) dns caching is disabled, if you'd start an openjdk8 image and your try: `watch -n 2 ping -c 1 www.apache.org` while tcpdumping, you'll see that every 2 seconds a request is issued. I tried this also in an ubtuntu docker image, and I get the same behaviour. @skonto @srowen: Just let me know the way you'd prefer it and I'll patch it that way. ---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
