You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bigtop.apache.org by "Kengo Seki (JIRA)" <ji...@apache.org> on 2017/06/09 01:02:18 UTC

[jira] [Commented] (BIGTOP-2802) Some packages don't create necessary groups on debian-based system if the users correspond to them already exist

    [ https://issues.apache.org/jira/browse/BIGTOP-2802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043751#comment-16043751 ] 

Kengo Seki commented on BIGTOP-2802:
------------------------------------

Also, I found typos in bigtop-packages/src/deb/phoenix/phoenix.preinst (phenix instead of phoenix). I'll fix them together.

{code:title=bigtop-packages/src/deb/phoenix/phoenix.preinst}
 26         if ! getent passwd phenix >/dev/null; then
 27                 # Adding system user: phenix.
 28                 adduser \
 29                   --system \
 30                   --group \
 31                   --home /var/lib/phenix \
 32                   --gecos "Phoenix User" \
 33                   --shell /bin/false \
 34                   phoenix >/dev/null
 35         fi
{code}

> Some packages don't create necessary groups on debian-based system if the users correspond to them already exist
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: BIGTOP-2802
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-2802
>             Project: Bigtop
>          Issue Type: Improvement
>    Affects Versions: 1.2.0
>            Reporter: Kengo Seki
>
> For example, user and group creation for yarn are independent on rpm-based systems:
> {code:title=bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec}
> 557 %pre yarn
> 558 getent group yarn >/dev/null   || groupadd -r yarn
> 559 getent passwd yarn >/dev/null || /usr/sbin/useradd --comment "Hadoop Yarn" --shell /bin/bash -M -r -g yarn -G hadoop --home %{state_yarn} yarn
> {code}
> but on debian-based systems, yarn group creation is skipped if yarn user is created in advance:
> {code:title=bigtop-packages/src/deb/hadoop/hadoop-yarn.preinst}
>  34     install|upgrade)
>  35         if ! getent passwd yarn >/dev/null; then
>  36             # Adding system user: yarn.
>  37             adduser \
>  38                 --system \
>  39                 --group \
>  40                 --home /var/lib/hadoop-yarn \
>  41                 --gecos "Hadoop YARN" \
>  42                 --shell /bin/bash \
>  43                 yarn >/dev/null 2>/dev/null || :
>  44             usermod --append --groups hadoop yarn || :
>  45         fi
>  46     ;;
> {code}
> It causes a problem when the package is used with Ambari. When Ambari installs a stack, it creates users such as hdfs, yarn, mapred besides hadoop, but it creates only hadoop group.
> So installing hadoop-yarn skips the above path and fails with the following error:
> {code}
> Setting up hadoop-yarn (2.7.3-1) ...
> chown: invalid group: 'root:yarn'
> dpkg: error processing package hadoop-yarn (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  hadoop-yarn
> {code}
> at line 24 in the following code:
> {code:title=bigtop-packages/src/deb/hadoop/hadoop-yarn.postinst}
>  23     configure)
>  24         chown root:yarn /usr/lib/hadoop-yarn/bin/container-executor
>  25         chmod 4754 /usr/lib/hadoop-yarn/bin/container-executor
>  26         mkdir -p /var/log/hadoop-yarn /var/run/hadoop-yarn /var/lib/hadoop-yarn/cache || :
>  27         chown yarn:hadoop /var/log/hadoop-yarn /var/run/hadoop-yarn
>  28         chmod g+w /var/log/hadoop-yarn /var/run/hadoop-yarn
>  29         chown yarn:hadoop /var/lib/hadoop-yarn/ /var/lib/hadoop-yarn/cache
>  30         chmod 0755 /var/lib/hadoop-yarn
>  31         chmod 1777 /var/lib/hadoop-yarn/cache
>  32     ;;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)