From abf6f8f465e6b99fdd0a97e12bbde143ef98f3db Mon Sep 17 00:00:00 2001 From: Philip Zeyliger Date: Mon, 30 Jul 2018 13:15:54 -0700 Subject: [PATCH] Fix TestKuduOperations tests in test-with-docker by using consistent hostname. TestKuduOperations, when run using test-with-docker, failed with errors like: Remote error: Service unavailable: Timed out: could not wait for desired snapshot timestamp to be consistent: Tablet is lagging too much to be able to serve snapshot scan. Lagging by: 1985348 ms, (max is 30000 ms): The underlying issue, as discovered by Thomas Tauber-Marshall, is that Kudu serializes the hostnames of Kudu tablet servers, and, different containers in test-with-docker use different hostnames. This was exposed after "IMPALA-6812: Fix flaky Kudu scan tests" switched to using READ_AT_SNAPSHOT for Kudu reads. Using the same hostname for all the containers is easy and harmless; this change does just that. Change-Id: Iea8c5096b515a79601be2e919d32585fb2796b3d Reviewed-on: http://gerrit.cloudera.org:8080/11082 Reviewed-by: Impala Public Jenkins Tested-by: Impala Public Jenkins --- docker/test-with-docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/test-with-docker.py b/docker/test-with-docker.py index 1922c5779..3da700f7d 100755 --- a/docker/test-with-docker.py +++ b/docker/test-with-docker.py @@ -505,7 +505,14 @@ class TestWithDocker(object): # requirement may be lifted in newer Docker versions. "--privileged", "--name", name, - "--hostname", name, + # Whereas the container names vary across containers, we use the same + # hostname repeatedly, so that the build container and the test + # containers have the same hostnames. Kudu errors out with "Remote + # error: Service unavailable: Timed out: could not wait for desired + # snapshot timestamp to be consistent: Tablet is lagging too much to be + # able to serve snapshot scan." if reading with READ_AT_SNAPSHOT + # if the hostnames change underneath it. + "--hostname", self.name, # Label with the git root directory for easier cleanup "--label=pwd=" + self.git_root, # Consistent locales