IMPALA-4057, IMPALA-4050: Fix --webserver_interface

This patch fixes two issues with --webserver_interface:
- When --webserver_interface was used start-impala-cluster.py with a
  value that's different from --hostname, minicluster startup would
  appear to fail as liveness is determined by checking for the webui's
  availability at the address specified for --hostname.
- The value of --webserver_interface was applied correctly for the
  catalogd and statestored but not for impalads, due to the way
  ExecEnv constructed the Webserver.
- It is now possible to specify a hostname for webserver_interface
  instead of an IP. The webserver will resolve the hostname.

This patch also upgrades our version of psutil to the latest for the
function 'net_if_addrs'. This requires a few change to our use of
psutil, mostly adding '()' to call functions that previously were
variables.

Testing:
- Added a custom cluster test that finds all available interfaces,
  binds the webserver to one of them, and checks that its only
  available over that interface.

Change-Id: Ic7e75908426756d73f13a0fa3cfc21fc31da164c
Reviewed-on: http://gerrit.cloudera.org:8080/14266
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Thomas Tauber-Marshall
2019-09-18 09:53:57 -07:00
committed by Impala Public Jenkins
parent d99bc14936
commit 16e0d550c2
10 changed files with 112 additions and 64 deletions

View File

@@ -122,7 +122,8 @@ class TestClientSsl(CustomClusterTestSuite):
WEBSERVER_SSL_ARGS = ("--webserver_certificate_file=%(cert_dir)s/server-cert.pem "
"--webserver_private_key_file=%(cert_dir)s/server-key.pem "
"--hostname=localhost" # Must match hostname in certificate
"--hostname=localhost " # Must match hostname in certificate
"--webserver_interface=localhost "
% {'cert_dir': CERT_DIR})
@classmethod
@@ -145,6 +146,7 @@ class TestClientSsl(CustomClusterTestSuite):
"--ssl_cipher_list=ECDHE-RSA-AES128-GCM-SHA256 "
"--webserver_certificate_file=%(cert_dir)s/server-cert.pem "
"--webserver_private_key_file=%(cert_dir)s/server-key.pem "
"--webserver_interface=localhost "
% {'cert_dir': CERT_DIR})
@pytest.mark.execute_serially