Andrew Onischuk created AMBARI-14006:
----------------------------------------
Summary: During Component Install conf-select Shell Uses Current
Working Directory That Doesn't Exist Yet
Key: AMBARI-14006
URL: https://issues.apache.org/jira/browse/AMBARI-14006
Project: Ambari
Issue Type: Bug
Reporter: Andrew Onischuk
Assignee: Andrew Onischuk
Fix For: 2.1.3
On an existing (not upgraded) HDP 2.3.2.0-2390 cluster, installation of
additional components fails with the following error:
2015-10-21 08:28:44,613 - Skipping Execute[('cp', '-R', '-p',
'/etc/zookeeper/conf', '/etc/zookeeper/conf.install')] due to not_if
2015-10-21 08:28:44,767 - New conf directories: shell-init: error
retrieving current directory: getcwd: cannot access parent directories: No such
file or directory, shell-init: error retrieving current directory: getcwd:
cannot access parent directories: No such file or directory,
job-working-directory: error retrieving current directory: getcwd: cannot
access parent directories: No such file or directory,
/etc/zookeeper/2.3.2.0-2950/0
2015-10-21 08:28:45,075 - checked_call['conf-select set-conf-dir --package
zookeeper --stack-version 2.3.2.0-2950 --conf-version 0'] {'logoutput': False,
'sudo': True, 'quiet': False}
2015-10-21 08:28:45,228 - checked_call returned (0, 'shell-init: error
retrieving current directory: getcwd: cannot access parent directories: No such
file or directory\nshell-init: error retrieving current directory: getcwd:
cannot access parent directories: No such file or
directory\njob-working-directory: error retrieving current directory: getcwd:
cannot access parent directories: No such file or
directory\n/usr/hdp/2.3.2.0-2950/zookeeper/conf ->
/etc/zookeeper/2.3.2.0-2950/0')
Subsequent runs of the install command succeed. The root of the problem is:
getcwd: cannot access parent directories: No such file or
directory\n/usr/hdp/2.3.2.0-2950/zookeeper/conf ->
/etc/zookeeper/2.3.2.0-2950/0')
During a component install, we invoke the `conf-select` module which:
* Creates `conf.install` from `conf`
* Changes `conf` into a symlink
* Invoke `conf-select` to change pointers to <version>/0
However, the /etc/zookeeper/2.3.2.0-2950/0 does not yet exist while `conf-
select` is being invoked:
**after-INSTALL/scripts/shared_initialization.py**
versioned_confs = conf_select.create("HDP", package, version, dry_run =
True)
**conf_select.py**
code, stdout = shell.call(get_cmd(command, package, version),
logoutput=False, quiet=False, sudo=True)
**Now the real question here is why in the world the
`/etc/zookeeper/2.3.2.0-2950/0` directory is being used a the cwd!** The
workaround of this issue is to ensure we pass in the `cwd` to `shell` which
will pass it to `Popen`:
code, stdout = shell.call(get_cmd(command, package, version),
logoutput=False, quiet=False, sudo=True, cwd="/")
I think we need to:
* See if this can be reproduced and understood
* Determine a proper value for `cwd` here
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)