[
https://issues.apache.org/jira/browse/IMPALA-6716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Knupp closed IMPALA-6716.
-------------------------------
Resolution: Fixed
Fix Version/s: Impala 3.0
> ImpalaShell should not rely on global access to parsed command line options
> ---------------------------------------------------------------------------
>
> Key: IMPALA-6716
> URL: https://issues.apache.org/jira/browse/IMPALA-6716
> Project: IMPALA
> Issue Type: Bug
> Components: Clients
> Affects Versions: Impala 3.0, Impala 2.12.0
> Reporter: David Knupp
> Assignee: David Knupp
> Priority: Major
> Fix For: Impala 3.0
>
>
> A recent patch to address a problem line breaks in LDAP passwords
> (IMPALA-6610) can, in rare instances (e.g., when running the shell as an
> installed python package), result in an exception being thrown if the call to
> {{_connect()}} fails.
> {noformat}
> $ impala-shell -i foo
> Starting Impala Shell without Kerberos authentication
> Traceback (most recent call last):
> File "/home/systest/shellenv/bin/impala-shell", line 11, in <module>
> load_entry_point('impala-shell', 'console_scripts', 'impala-shell')()
> File
> "/home/systest/Impala/shell/packaging/staging/impala_shell/impala_shell.py",
> line 1588, in main
> shell = ImpalaShell(options, query_options)
> File
> "/home/systest/Impala/shell/packaging/staging/impala_shell/impala_shell.py",
> line 209, in __init__
> self.do_connect(options.impalad)
> File
> "/home/systest/Impala/shell/packaging/staging/impala_shell/impala_shell.py",
> line 755, in do_connect
> self._connect()
> File
> "/home/systest/Impala/shell/packaging/staging/impala_shell/impala_shell.py",
> line 821, in _connect
> if options.ldap_password_cmd and \
> NameError: global name 'options' is not defined
> {noformat}
> The error is actually in the connection failure handling code:
> https://github.com/apache/impala/blob/master/shell/impala_shell.py#L821
> The problem is that the shell instance should not assume continued access to
> the options returned from {{parser.parse_args().}} In most cases, we store
> those values directly as member variables of the shell. We should do the same
> with all LDAP-related values, and then access those member variables.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)