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

Install actions fail when switching from root to non-root.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • None
    • None

    Description

      1\. Deploy cluster with ambari-agent running as root and umask 027
      2\. Switch to non-root
      3\. Trigger install action

      Traceback (most recent call last):
      File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py", line 35, in <module>
      BeforeAnyHook().execute()
      File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 313, in execute
      method(env)
      File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py", line 32, in hook
      setup_java()
      File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py", line 218, in setup_java
      Execute(install_cmd,
      File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in _init_
      self.env.run()
      File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
      self.run_action(resource, action)
      File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
      provider_action()
      File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 262, in action_run
      tries=self.resource.tries, try_sleep=self.resource.try_sleep)
      File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner
      result = function(command, **kwargs)
      File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102, in checked_call
      tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
      File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
      result = _call(command, **kwargs_copy)
      File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call
      raise ExecutionFailed(err_msg, code, out, err)
      resource_management.core.exceptions.ExecutionFailed: Execution of 'cd /var/lib/ambari-agent/tmp/jdk_tmp_CN9C5F && tar -xf /var/lib/ambari-agent/tmp/jdk-8u112-linux-x64.tar.gz && ambari-sudo.sh cp -rp /var/lib/ambari-agent/tmp/jdk_tmp_CN9C5F/* /usr/jdk64' returned 2. tar: /var/lib/ambari-agent/tmp/jdk-8u112-linux-x64.tar.gz: Cannot open: Permission denied
      tar: Error is not recoverable: exiting now
      Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-145.json', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-145.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1']

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aonishuk Andrew Onischuk Assign to me
            aonishuk Andrew Onischuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment