You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Alok Lal (JIRA)" <ji...@apache.org> on 2014/11/19 02:39:34 UTC
[jira] [Commented] (ARGUS-187) Script parsing install.properties
fails if there is space in the name value pair. It should be resilient to
such user errors.
[ https://issues.apache.org/jira/browse/ARGUS-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217239#comment-14217239 ]
Alok Lal commented on ARGUS-187:
--------------------------------
bug can be reproduced if {{ranger-hive-pligin/install.properties}} contains white space in the following manner
{code}
REPOSITORY_NAME= hivedev
# Note this has a trailing space, i.e. after hivedev
REPOSITORY_NAME=hivedev
# there is a tab after = instead of a space
REPOSITORY_NAME= hivedev
# there is a trailing tab after the value
REPOSITORY_NAME=hivedev
# of course the following don't work either with space after = and after value
REPOSITORY_NAME= hivedev
# etc. etc.
{code}
In particular note that the following works today when space is before the = sign.
{code}
REPOSITORY_NAME =hivedev
{code}
The aim should be that any combination of spaces *around* = sign and those *after* the value should work. In particular, if the value has any spaces or tab _inside it of it_ then they *should be preserved*.
{code}
REPOSITORY_NAME = hivedev hbasedev
{code}
should work as expected, i.e. spaces and/or tabs before {{hivedev}} and after {{hbasedev}} should get trimmed but those between {{hivedev}} and {{hbasedev}} should be preserved. Thus above should be equivalent to having the following line in {{install.properties}} file
{code}
REPOSITORY_NAME=hivedev hbasedev
{code}
> Script parsing install.properties fails if there is space in the name value pair. It should be resilient to such user errors.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARGUS-187
> URL: https://issues.apache.org/jira/browse/ARGUS-187
> Project: Argus
> Issue Type: Bug
> Affects Versions: 0.4.0
> Reporter: Alok Lal
> Assignee: Alok Lal
> Labels: install
>
> Logging the following on behalf of Bennet Daniel:
> When I was testing hive manual installation we faced this issue, I had a space between the = and the value (REPOSITORY_NAME= datalake_hive)
> This lead to the below:
> {code}
> [root@ip-172-31-37-9 ranger-hive-plugin]# ./enable-hive-plugin.sh
> + ./enable-hive-plugin.sh
> + Wed Nov 5 01:12:52 UTC 2014 : Saving /usr/hdp/2.2.0.0-1756/hive/conf/xasecure-audit.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.xasecure-audit.xml.20141105-011252 ...
> + Wed Nov 5 01:12:52 UTC 2014 : Saving /usr/hdp/2.2.0.0-1756/hive/conf/xasecure-hive-security.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.xasecure-hive-security.xml.20141105-011252 ...
> + Wed Nov 5 01:12:52 UTC 2014 : Saving /usr/hdp/2.2.0.0-1756/hive/conf/xasecure-policymgr-ssl.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.xasecure-policymgr-ssl.xml.20141105-011252 ...
> ./enable-hive-plugin.sh: line 295: [: /etc/ranger/: binary operator expected
> chmod: cannot access `datalake_hive': No such file or directory
> chmod: cannot access `datalake_hive/policycache': No such file or directory
> chown: cannot access `datalake_hive': No such file or directory
> + Wed Nov 5 01:12:52 UTC 2014 : Saving current config file: /usr/hdp/2.2.0.0-1756/hive/conf/hiveserver2-site.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.hiveserver2-site.xml.20141105-011252 ...
> + Wed Nov 5 01:12:52 UTC 2014 : Saving current config file: /usr/hdp/2.2.0.0-1756/hive/conf/xasecure-audit.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.xasecure-audit.xml.20141105-011252 ...
> + Wed Nov 5 01:12:52 UTC 2014 : Saving current config file: /usr/hdp/2.2.0.0-1756/hive/conf/xasecure-hive-security.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.xasecure-hive-security.xml.20141105-011252 ...
> + Wed Nov 5 01:12:53 UTC 2014 : Saving current config file: /usr/hdp/2.2.0.0-1756/hive/conf/xasecure-policymgr-ssl.xml to /usr/hdp/2.2.0.0-1756/hive/conf/.xasecure-policymgr-ssl.xml.20141105-011252 ...
> ./enable-hive-plugin.sh: line 426: [: /etc/ranger/: unary operator expected
> ERROR:Please enter the Credential File Store with proper file path
> ++ printf '\033]0;%s@%s:%s\007' root ip-172-31-37-9 /usr/hdp/2.2.0.0-1756/ranger-hive-plugin
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)