Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13673

Update scripts to be smarter when running with privilege

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1, 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: scripts
    • Labels:
    • Target Version/s:
    • Release Note:
      Hide
      Apache Hadoop is now able to switch to the appropriate user prior to launching commands so long as the command is being run with a privileged user and the appropriate set of _USER variables are defined. This re-enables sbin/start-all.sh and sbin/stop-all.sh as well as fixes the sbin/start-dfs.sh and sbin/stop-dfs.sh to work with both secure and unsecure systems.
      Show
      Apache Hadoop is now able to switch to the appropriate user prior to launching commands so long as the command is being run with a privileged user and the appropriate set of _USER variables are defined. This re-enables sbin/start-all.sh and sbin/stop-all.sh as well as fixes the sbin/start-dfs.sh and sbin/stop-dfs.sh to work with both secure and unsecure systems.

      Description

      As work continues on HADOOP-13397, it's become evident that we need better hooks to start daemons as specifically configured users. Via the (command)_(subcommand)_USER environment variables in 3.x, we actually have a standardized way to do that. This in turn means we can make the sbin scripts super functional with a bit of updating:

      • Consolidate start-dfs.sh and start-secure-dns.sh into one script
      • Make start-*.sh and stop-*.sh know how to switch users when run as root
      • Undeprecate start/stop-all.sh so that it could be used as root for production purposes and as a single user for non-production users

        Attachments

        1. HADOOP-13673.00.patch
          21 kB
          Allen Wittenauer
        2. HADOOP-13673.01.patch
          30 kB
          Allen Wittenauer
        3. HADOOP-13673.02.patch
          35 kB
          Allen Wittenauer
        4. HADOOP-13673.03.patch
          36 kB
          Allen Wittenauer
        5. HADOOP-13673.04.patch
          37 kB
          Allen Wittenauer

          Issue Links

            Activity

              People

              • Assignee:
                aw Allen Wittenauer
                Reporter:
                aw Allen Wittenauer
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: