Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-21468

Knox restart fails during EU due to wrong location to the Knox data directory

    XMLWordPrintableJSON

Details

    Description

      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

      1. <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",
      """

      Attachments

        1. AMBARI-21468.patch
          6 kB
          Di Li

        Issue Links

          Activity

            People

              dili Di Li
              dili Di Li
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: