hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ingo Rauschenberg (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-8997) Upgrade of the .deb Packege removes Hadoop Users (hdfs and mapred) and the hadoop-group
Date Wed, 31 Oct 2012 14:11:13 GMT
Ingo Rauschenberg created HADOOP-8997:
-----------------------------------------

             Summary: Upgrade of the .deb Packege removes Hadoop Users (hdfs and mapred) and
the hadoop-group
                 Key: HADOOP-8997
                 URL: https://issues.apache.org/jira/browse/HADOOP-8997
             Project: Hadoop Common
          Issue Type: Bug
    Affects Versions: 1.0.4, 1.0.3
         Environment: Debian Squeeze 64 Bit
            Reporter: Ingo Rauschenberg


During the Package Upgrade the script postrm from the old package is the last script that
is called.
Because this script is called after the preinst-script of the new package is called the Haddop
users and group is deleted.

This happens because the Script don't check the parameter which is given to him.

A solution may be to modify the script:
#! /bin/sh

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Abort if any command returns an error value
set -e

# This script is called twice during the removal of the package; once
# after the removal of the package's files from the system, and as
# the final step in the removal of this package, after the package's
# conffiles have been removed.

case "$1" in
  remove)
    # This package has been removed, but its configuration has not yet
    # been purged.
    /usr/sbin/userdel hdfs 2> /dev/null >/dev/null
    /usr/sbin/userdel mapred 2> /dev/null >/dev/null
    /usr/sbin/groupdel hadoop 2> /dev/null >dev/null
    ;;
  purge)
    # This package has previously been removed and is now having
    # its configuration purged from the system.
    /usr/sbin/userdel hdfs 2> /dev/null >/dev/null
    /usr/sbin/userdel mapred 2> /dev/null >/dev/null
    /usr/sbin/groupdel hadoop 2> /dev/null >dev/null
    ;;
  disappear)
    if test "$2" != overwriter; then
      echo "$0: undocumented call to \`postrm $*'" 1>&2
      exit 1
    fi
    # This package has been completely overwritten by package $3
    # (version $4).  All our files are already gone from the system.
    # This is a special case: neither "prerm remove" nor "postrm remove"
    # have been called, because dpkg didn't know that this package would
    # disappear until this stage.
    :
    ;;
  upgrade)
    # About to upgrade FROM THIS VERSION to version $2 of this package.
    # "prerm upgrade" has been called for this version, and "preinst
    # upgrade" has been called for the new version.  Last chance to
    # clean up.
    :
    ;;
  failed-upgrade)
    # About to upgrade from version $2 of this package TO THIS VERSION.
    # "prerm upgrade" has been called for the old version, and "preinst
    # upgrade" has been called for this version.  This is only used if
    # the previous version's "postrm upgrade" couldn't handle it and
    # returned non-zero. (Fix old postrm bugs here.)
    :
    ;;
  abort-install)
    # Back out of an attempt to install this package.  Undo the effects of
    # "preinst install...".  There are two sub-cases.
    /usr/sbin/userdel hdfs 2> /dev/null >/dev/null
    /usr/sbin/userdel mapred 2> /dev/null >/dev/null
    /usr/sbin/groupdel hadoop 2> /dev/null >dev/null
    if test "${2+set}" = set; then
      # When the install was attempted, version $2's configuration
      # files were still on the system.  Undo the effects of "preinst
      # install $2".
      :
    else
      # We were being installed from scratch.  Undo the effects of
      # "preinst install".
      :
    fi ;;
  abort-upgrade)
    # Back out of an attempt to upgrade this package from version $2
    # TO THIS VERSION.  Undo the effects of "preinst upgrade $2".
    :
    ;;
  *) echo "$0: didn't understand being called with \`$1'" 1>&2
     exit 1;;
esac

exit 0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message