You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Di Li (JIRA)" <ji...@apache.org> on 2017/07/13 16:26:00 UTC

[jira] [Created] (AMBARI-21468) Knox restart fails during EU due to wrong location to the Knox data directory

Di Li created AMBARI-21468:
------------------------------

             Summary: Knox restart fails during EU due to wrong location to the Knox data directory
                 Key: AMBARI-21468
                 URL: https://issues.apache.org/jira/browse/AMBARI-21468
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: branch-feature-AMBARI-21348
            Reporter: Di Li
            Assignee: Di Li
             Fix For: branch-feature-AMBARI-21348


Knox fails the restart during EU with error 
"""
resource_management.core.exceptions.ExecutionFailed: Execution of 'cp -R -p -f /usr/hdp/4.2.0.0/knox/data/. /usr/hdp/current/knox-server/data' returned 1. cp: cannot stat '/usr/hdp/4.2.0.0/knox/data/.': No such file or directory
"""

This is because the common service Knox Py script assumes data dir is under stack_root which is /usr/hdp by the time it's Knox to restart during EU.  But it also attaches the "current_version" obtained from command json file that points to 4.2.0.0 (or 4.2.5.0-0000) for the migration cluster. So the result root dir /usr/hdp/4.2.xxxx does not exist.

"""
ambari-server\src\main\resources\common-services\KNOX\0.5.0.2.2\package\scripts\upgrade.py
# <stack-root>/2.3.0.0-1234/knox/data/.
    source_data_dir = os.path.join(params.stack_root, params.upgrade_from_version, "knox", "data", ".")

ambari-server\src\main\resources\common-services\KNOX\0.5.0.2.2\package\scripts\params_linux.py
upgrade_from_version = default("/hostLevelParams/current_version", None)
"""

"""
	"hostLevelParams": {
        "agent_stack_retry_on_unavailability": "false",
        "stack_name": "HDP",
        "group_list": "[\"spark\",\"hadoop\",\"users\",\"knox\"]",
        "host_sys_prepped": "false",
        "ambari_db_rca_username": "mapred",
        "current_version": "4.2.0.0",
"""



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)