Henry Robinson has uploaded a new change for review. http://gerrit.cloudera.org:8080/3302
Change subject: IMPALA-3628: Fix cancellation from shell when security is enabled ...................................................................... IMPALA-3628: Fix cancellation from shell when security is enabled To cancel a query, the shell will create a separate connection inside it's SIGINT handler, and send the cancellation RPC. However this connection did not start a secure connection if it needed to, meaning that the cancellation attempt would just hang. A workaround is to kill the shell process, which I expect is what users have been doing with this bug which has been around since 2014. Testing: I added a custom cluster test that starts Impala with SSL enabled, and wrote two tests - one just to check SSL connectivity, and the other to mimic the existing test_cancellation which sends SIGINT to the shell process. In doing so I refactored the shell testing code a bit so that all tests use a single ImpalaShell object, rather than rolling their own Popen() based approaches when they needed to do something unusual, like cancel a query. In the cancellation test on my machine, SIGINT can take a few tries to be effective. I'm not sure if this is a timing thing - perhaps the Python interpreter doesn't correctly pass signals through to a handler if it's in a blocking call, for example. The test reliably passes within ~5 tries on my machine, so the test tries 30 times, once per second. Change-Id: If99085e75708d92a08dbecf0131a2234fedad33a --- M shell/impala_shell.py A tests/custom_cluster/test_client_ssl.py A tests/shell/__init__.py D tests/shell/impala_shell_results.py M tests/shell/test_shell_commandline.py D tests/shell/test_shell_common.py M tests/shell/test_shell_interactive.py A tests/shell/util.py 8 files changed, 263 insertions(+), 186 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/02/3302/1 -- To view, visit http://gerrit.cloudera.org:8080/3302 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If99085e75708d92a08dbecf0131a2234fedad33a Gerrit-PatchSet: 1 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Henry Robinson <[email protected]>
