ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-21188) Configuration Symlink Is Incorrect After Stack Distribution
Date Tue, 06 Jun 2017 18:41:18 GMT
Jonathan Hurley created AMBARI-21188:
----------------------------------------

             Summary: Configuration Symlink Is Incorrect After Stack Distribution
                 Key: AMBARI-21188
                 URL: https://issues.apache.org/jira/browse/AMBARI-21188
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 3.0.0
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
            Priority: Critical
             Fix For: 3.0.0


The configuration symlinks for a component after installation should reflect something similar
to the following:

/etc/component/conf -> /usr/hdp/current/component/conf
/usr/hdp/current/component/conf -> /etc/component/<version>/conf

For example:
{noformat}
[root@c6403 ~]# ll /etc/zookeeper/
total 12
drwxr-xr-x 3 root      root   4096 Jun  5 20:19 2.4.2.0-236
drwxr-xr-x 3 root      root   4096 Jun  5 20:38 2.6.0.0-334
lrwxrwxrwx 1 root      root     26 Jun  5 20:38 conf -> /usr/hdp/current/zookeeper-server/conf
drwxr-xr-x 2 zookeeper hadoop 4096 Jun  5 20:17 conf.backup

[root@c6403 ~]# ll /usr/hdp/current/zookeeper-server/conf
lrwxrwxrwx 1 root root 28 Jun  5 20:38 /usr/hdp/current/zookeeper-server/conf -> /etc/zookeeper/2.6.0.0-334/0
{noformat}

This is the way that the structure exists after a normal installation today. However, it seems
that distribution a new stack breaks this:

{code}
[root@c6403 zookeeper]# ll /etc/zookeeper/
total 12
drwxr-xr-x 3 root      root   4096 Jun  5 20:19 2.4.2.0-236
drwxr-xr-x 3 root      root   4096 Jun  5 20:38 2.6.0.0-334
lrwxrwxrwx 1 root      root     26 Jun  5 20:38 conf -> /etc/zookeeper/conf.backup
drwxr-xr-x 2 zookeeper hadoop 4096 Jun  5 20:17 conf.backup
{code}

The {{conf}} symlink is now pointing to {{conf.backup}} which is the interim temporary location.

{noformat:title=Initial Install}
2017-06-05 20:19:17,137 - Backing up /etc/zookeeper/conf to /etc/zookeeper/conf.backup if
destination doesn't exist already.
2017-06-05 20:19:17,137 - Execute[('cp', '-R', '-p', '/etc/zookeeper/conf', '/etc/zookeeper/conf.backup')]
{'not_if': 'test -e /etc/zookeeper/conf.backup', 'sudo': True}
2017-06-05 20:19:17,150 - Checking if need to create versioned conf dir /etc/zookeeper/2.4.2.0-236/0
2017-06-05 20:19:17,151 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'dry-run-create',
'--package', 'zookeeper', '--stack-version', '2.4.2.0-236', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-06-05 20:19:17,173 - call returned (0, '/etc/zookeeper/2.4.2.0-236/0', '')
2017-06-05 20:19:17,173 - Package zookeeper will have new conf directories: /etc/zookeeper/2.4.2.0-236/0
2017-06-05 20:19:17,173 - Checking if need to create versioned conf dir /etc/zookeeper/2.4.2.0-236/0
2017-06-05 20:19:17,174 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'create-conf-dir',
'--package', 'zookeeper', '--stack-version', '2.4.2.0-236', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-06-05 20:19:17,197 - call returned (0, '/etc/zookeeper/2.4.2.0-236/0', '')
2017-06-05 20:19:17,197 - Directory['/etc/zookeeper/2.4.2.0-236/0'] {'create_parents': True,
'mode': 0755, 'cd_access': 'a'}
2017-06-05 20:19:17,198 - Seeding versioned configuration directories for zookeeper
2017-06-05 20:19:17,198 - Execute['ambari-sudo.sh  -H -E cp -R -p -v /usr/hdp/current/zookeeper-client/conf/*
/etc/zookeeper/2.4.2.0-236/0'] {'logoutput': True}
`/usr/hdp/current/zookeeper-client/conf/configuration.xsl' -> `/etc/zookeeper/2.4.2.0-236/0/configuration.xsl'
`/usr/hdp/current/zookeeper-client/conf/log4j.properties' -> `/etc/zookeeper/2.4.2.0-236/0/log4j.properties'
`/usr/hdp/current/zookeeper-client/conf/zoo.cfg' -> `/etc/zookeeper/2.4.2.0-236/0/zoo.cfg'
`/usr/hdp/current/zookeeper-client/conf/zoo_sample.cfg' -> `/etc/zookeeper/2.4.2.0-236/0/zoo_sample.cfg'
`/usr/hdp/current/zookeeper-client/conf/zookeeper-env.cmd' -> `/etc/zookeeper/2.4.2.0-236/0/zookeeper-env.cmd'
`/usr/hdp/current/zookeeper-client/conf/zookeeper-env.sh' -> `/etc/zookeeper/2.4.2.0-236/0/zookeeper-env.sh'
2017-06-05 20:19:17,204 - Execute['ambari-sudo.sh  -H -E cp -R -p /etc/zookeeper/conf/* /etc/zookeeper/2.4.2.0-236/0']
{'only_if': 'ls -d /etc/zookeeper/conf/*'}
2017-06-05 20:19:17,213 - Checking if need to create versioned conf dir /etc/zookeeper/2.4.2.0-236/0
2017-06-05 20:19:17,213 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'create-conf-dir',
'--package', 'zookeeper', '--stack-version', '2.4.2.0-236', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-06-05 20:19:17,231 - call returned (1, '/etc/zookeeper/2.4.2.0-236/0 exist already',
'')
2017-06-05 20:19:17,231 - checked_call[('ambari-python-wrap', '/usr/bin/conf-select', 'set-conf-dir',
'--package', 'zookeeper', '--stack-version', '2.4.2.0-236', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False}
2017-06-05 20:19:17,254 - checked_call returned (0, '/usr/hdp/2.4.2.0-236/zookeeper/conf ->
/etc/zookeeper/2.4.2.0-236/0')
2017-06-05 20:19:17,255 - Ensuring that zookeeper has the correct symlink structure
2017-06-05 20:19:17,255 - Execute[('cp', '-R', '-p', '/etc/zookeeper/conf', '/etc/zookeeper/conf.backup')]
{'not_if': 'test -e /etc/zookeeper/conf.backup', 'sudo': True}
2017-06-05 20:19:17,258 - Skipping Execute[('cp', '-R', '-p', '/etc/zookeeper/conf', '/etc/zookeeper/conf.backup')]
due to not_if
2017-06-05 20:19:17,259 - Directory['/etc/zookeeper/conf'] {'action': ['delete']}
2017-06-05 20:19:17,259 - Removing directory Directory['/etc/zookeeper/conf'] and all its
content
2017-06-05 20:19:17,260 - Link['/etc/zookeeper/conf'] {'to': '/etc/zookeeper/conf.backup'}
2017-06-05 20:19:17,260 - Creating symbolic Link['/etc/zookeeper/conf'] to /etc/zookeeper/conf.backup
2017-06-05 20:19:17,260 - Link['/etc/zookeeper/conf'] {'action': ['delete']}
2017-06-05 20:19:17,260 - Deleting Link['/etc/zookeeper/conf']
2017-06-05 20:19:17,260 - Link['/etc/zookeeper/conf'] {'to': '/usr/hdp/current/zookeeper-client/conf'}
2017-06-05 20:19:17,260 - Creating symbolic Link['/etc/zookeeper/conf'] to /usr/hdp/current/zookeeper-client/conf
{noformat}

{noformat:title=After Stack Distribution}
2017-06-05 20:38:13,243 - Backing up /etc/zookeeper/conf to /etc/zookeeper/conf.backup if
destination doesn't exist already.
2017-06-05 20:38:13,244 - Execute[('cp', '-R', '-p', '/etc/zookeeper/conf', '/etc/zookeeper/conf.backup')]
{'not_if': 'test -e /etc/zookeeper/conf.backup', 'sudo': True}
2017-06-05 20:38:13,247 - Skipping Execute[('cp', '-R', '-p', '/etc/zookeeper/conf', '/etc/zookeeper/conf.backup')]
due to not_if
2017-06-05 20:38:13,247 - Checking if need to create versioned conf dir /etc/zookeeper/2.6.0.0-334/0
2017-06-05 20:38:13,248 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'dry-run-create',
'--package', 'zookeeper', '--stack-version', '2.6.0.0-334', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-06-05 20:38:13,267 - call returned (0, '/etc/zookeeper/2.6.0.0-334/0', '')
2017-06-05 20:38:13,267 - Package zookeeper will have new conf directories: /etc/zookeeper/2.6.0.0-334/0
2017-06-05 20:38:13,267 - Checking if need to create versioned conf dir /etc/zookeeper/2.6.0.0-334/0
2017-06-05 20:38:13,268 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'create-conf-dir',
'--package', 'zookeeper', '--stack-version', '2.6.0.0-334', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-06-05 20:38:13,287 - call returned (0, '/etc/zookeeper/2.6.0.0-334/0', '')
2017-06-05 20:38:13,287 - Directory['/etc/zookeeper/2.6.0.0-334/0'] {'create_parents': True,
'mode': 0755, 'cd_access': 'a'}
2017-06-05 20:38:13,288 - Seeding versioned configuration directories for zookeeper
2017-06-05 20:38:13,288 - Execute['ambari-sudo.sh  -H -E cp -R -p -v /usr/hdp/current/zookeeper-client/conf/*
/etc/zookeeper/2.6.0.0-334/0'] {'logoutput': True}
`/usr/hdp/current/zookeeper-client/conf/configuration.xsl' -> `/etc/zookeeper/2.6.0.0-334/0/configuration.xsl'
`/usr/hdp/current/zookeeper-client/conf/log4j.properties' -> `/etc/zookeeper/2.6.0.0-334/0/log4j.properties'
`/usr/hdp/current/zookeeper-client/conf/zoo.cfg' -> `/etc/zookeeper/2.6.0.0-334/0/zoo.cfg'
`/usr/hdp/current/zookeeper-client/conf/zoo_sample.cfg' -> `/etc/zookeeper/2.6.0.0-334/0/zoo_sample.cfg'
`/usr/hdp/current/zookeeper-client/conf/zookeeper-env.cmd' -> `/etc/zookeeper/2.6.0.0-334/0/zookeeper-env.cmd'
`/usr/hdp/current/zookeeper-client/conf/zookeeper-env.sh' -> `/etc/zookeeper/2.6.0.0-334/0/zookeeper-env.sh'
2017-06-05 20:38:13,305 - Execute['ambari-sudo.sh  -H -E cp -R -p /etc/zookeeper/conf/* /etc/zookeeper/2.6.0.0-334/0']
{'only_if': 'ls -d /etc/zookeeper/conf/*'}
2017-06-05 20:38:13,314 - Checking if need to create versioned conf dir /etc/zookeeper/2.6.0.0-334/0
2017-06-05 20:38:13,315 - call[('ambari-python-wrap', '/usr/bin/conf-select', 'create-conf-dir',
'--package', 'zookeeper', '--stack-version', '2.6.0.0-334', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False, 'stderr': -1}
2017-06-05 20:38:13,331 - call returned (1, '/etc/zookeeper/2.6.0.0-334/0 exist already',
'')
2017-06-05 20:38:13,332 - checked_call[('ambari-python-wrap', '/usr/bin/conf-select', 'set-conf-dir',
'--package', 'zookeeper', '--stack-version', '2.6.0.0-334', '--conf-version', '0')] {'logoutput':
False, 'sudo': True, 'quiet': False}
2017-06-05 20:38:13,348 - checked_call returned (0, '/usr/hdp/2.6.0.0-334/zookeeper/conf ->
/etc/zookeeper/2.6.0.0-334/0')
2017-06-05 20:38:13,349 - Ensuring that zookeeper has the correct symlink structure
2017-06-05 20:38:13,349 - Link['/etc/zookeeper/conf'] {'action': ['delete']}
2017-06-05 20:38:13,349 - Deleting Link['/etc/zookeeper/conf']
2017-06-05 20:38:13,349 - Link['/etc/zookeeper/conf'] {'to': '/etc/zookeeper/conf.backup'}
2017-06-05 20:38:13,349 - Creating symbolic Link['/etc/zookeeper/conf'] to /etc/zookeeper/conf.backup
{noformat}

Notice that both create the {{conf.backup}} link, but only the first one relinks it correctly
to {{/usr/hdp/current}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message