Bigtop
  1. Bigtop
  2. BIGTOP-674

Installing hadoop-mapreduce package uses 'hadoop' group before creation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Debian 12.04, probably other DEB and RPM-based distros

      Description

      When installing the hadoop-mapreduce package, users and files are assigned to the 'hadoop' group before that group has been created.

      I'm still working on verifying all the details for RPMs, but I will attached a patch that fixes this for DEBs (and quite possibly for RPMs too). It doesn't make sense to me why the group has not been added earlier. The hadoop group is added in the hadoop.spec file on line 510, and in the hadoop.preinst script - and I think both of these are supposed to execute before the lines where I've added the group in the attached patch.

      1. BIGTOP-674.patch
        1 kB
        Sean Mackrory

        Activity

        Roman Shaposhnik made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Bruno Mahé made changes -
        Assignee Bruno Mahé [ bmahe ]
        Bruno Mahé made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Not A Problem [ 8 ]
        Sean Mackrory made changes -
        Assignee Sean Mackrory [ mackrorysd ]
        Sean Mackrory made changes -
        Comment [ diff --git a/bigtop-packages/src/deb/hadoop/hadoop-mapreduce.postinst b/bigtop-packages/src/deb/hadoop/hadoop-mapreduce.postinst
        index 5f6977c..85da543 100644
        --- a/bigtop-packages/src/deb/hadoop/hadoop-mapreduce.postinst
        +++ b/bigtop-packages/src/deb/hadoop/hadoop-mapreduce.postinst
        @@ -22,6 +22,7 @@ set -e
         case "$1" in
             configure)
          mkdir -p /var/log/hadoop-mapreduce /var/run/hadoop-mapreduce || :
        + getent group hadoop >/dev/null || groupadd -r hadoop
          chgrp -R hadoop /var/log/hadoop-mapreduce /var/run/hadoop-mapreduce
          chmod g+w /var/run/hadoop-mapreduce /var/log/hadoop-mapreduce
          chown mapred:hadoop /var/lib/hadoop-mapreduce /var/lib/hadoop-mapreduce/cache
        diff --git a/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec b/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
        index f5a7125..cd1819b 100644
        --- a/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
        +++ b/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
        @@ -523,6 +523,7 @@ getent passwd yarn >/dev/null || /usr/sbin/useradd --comment "Hadoop Yarn" --she
         
         %pre mapreduce
         getent group mapred >/dev/null || groupadd -r mapred
        +getent group hadoop >/dev/null || groupadd -r hadoop
         getent passwd mapred >/dev/null || /usr/sbin/useradd --comment "Hadoop MapReduce" --shell /bin/bash -M -r -g mapred -G hadoop --home %{state_mapreduce} mapred
         
         %post ]
        Sean Mackrory made changes -
        Attachment BIGTOP-674.patch [ 12536461 ]
        Sean Mackrory made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Sean Mackrory made changes -
        Field Original Value New Value
        Summary BigTop Installing hadoop-mapreduce package uses 'hadoop' group before creation
        Sean Mackrory created issue -

          People

          • Assignee:
            Bruno Mahé
            Reporter:
            Sean Mackrory
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development