Bug#401999: mdadm fails to upgrade in testing. Can't start service.

Raúl Sánchez Siles rss at barracuda.es
Thu Dec 7 12:48:11 CET 2006


Package: mdadm
Version: 2.5.6-6
Severity: grave
Justification: renders package unusable

I upgrade mdadm to the current testing (and sid) version. Upgrade fails,
see this log(transalated by hand):


--LOG START--
Configuring mdadm (2.5.6-6) ...
/boot/initrd.img-2.6.18-3-686 has been altered.  Cannot update.
update-initramfs: Generating /boot/initrd.img-2.6.18p4s
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.17-ck1-p4s
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.17-2-686
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.
sha1sum: /boot/initrd.img-2.6.16.1-p4s: Can't find file or directory.
/boot/initrd.img-2.6.16.1-p4s has been altered.  Cannot update.
Starting MD monitoring service: mdadm --monitor/sbin/mdadm already running.
 failed!
/etc/lsb-base-logging.sh: line 34: RUNLEVEL: unbound variable
invoke-rc.d: initscript mdadm, action "start" failed.
dpkg: error processing mdadm (--configure):
 post-installation script subproccess returned output error code 1
Errors when processing:
 mdadm
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package couldn't be installed. Trying to recover:
Configuring mdadm (2.5.6-6) ...
update-initramfs: Generating /boot/initrd.img-2.6.18p4s
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.17-ck1-p4s
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.17-2-686
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.
Starting MD monitoring service: mdadm --monitor/sbin/mdadm already running.
 failed!
/etc/lsb-base-logging.sh: line 34: RUNLEVEL: unbound variable
invoke-rc.d: initscript mdadm, action "start" failed.
dpkg: error al procesar mdadm (--configure):
 el subproceso post-installation script devolvió el código de salida de error 1
Se encontraron errores al procesar:
 mdadm
--LOG END--

I also attach the file /etc/lsb-base-logging.sh which belongs to package
splashy version 0.2.2

-- Package-specific info:
--- mount output
/dev/sda1 on / type reiserfs (rw,notail)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,nodev)
/dev/sda5 on /home type reiserfs (rw)
/dev/mapper/varoptusr-opt on /opt type reiserfs (rw)
/dev/mapper/varoptusr-usr on /usr type reiserfs (rw)
/dev/mapper/varoptusr-var on /var type reiserfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
10.0.0.50:/opt/BA020 on /opt/BA020 type nfs (rw,noexec,nosuid,nodev,addr=10.0.0.50)

--- mdadm.conf
DEVICE /dev/sda
MAILADDR root

--- /proc/mdstat:
Personalities : [linear] [multipath] [raid0] [raid1] [raid10] 
unused devices: <none>

--- /proc/partitions:
major minor  #blocks  name

   8     0  244198584 sda
   8     1    6835626 sda1
   8     2    1349460 sda2
   8     3   31447237 sda3
   8     4          1 sda4
   8     5  146480638 sda5
   8     6   58082976 sda6
 253     0    5242880 dm-0
 253     1   41943040 dm-1
 253     2   10895360 dm-2

--- initrd.img-2.6.18p4s:
16946 blocks
etc/mdadm
etc/mdadm/mdadm.conf
lib/modules/2.6.18p4s/kernel/drivers/md/dm-mirror.ko
lib/modules/2.6.18p4s/kernel/drivers/md/dm-mod.ko
lib/modules/2.6.18p4s/kernel/drivers/md/multipath.ko
lib/modules/2.6.18p4s/kernel/drivers/md/raid0.ko
lib/modules/2.6.18p4s/kernel/drivers/md/raid1.ko
lib/modules/2.6.18p4s/kernel/drivers/md/raid10.ko
lib/modules/2.6.18p4s/kernel/drivers/md/dm-snapshot.ko
lib/modules/2.6.18p4s/kernel/drivers/md/linear.ko
lib/modules/2.6.18p4s/kernel/drivers/md/md-mod.ko
sbin/mdadm
scripts/local-top/mdadm

--- /proc/modules:
dm_mirror 22096 0 - Live 0xf0923000
dm_snapshot 16932 0 - Live 0xf091d000
dm_mod 56216 9 dm_mirror,dm_snapshot, Live 0xf092f000
raid10 24576 0 - Live 0xf0916000
raid1 24704 0 - Live 0xf090e000
raid0 8960 0 - Live 0xf08ec000
multipath 10368 0 - Live 0xf08e1000
linear 6656 0 - Live 0xf08e5000
md_mod 77972 5 raid10,raid1,raid0,multipath,linear, Live 0xf08f9000

--- volume detail:

--- /proc/cmdline
root=/dev/sda1 ro resume2=swap:/dev/sda3

--- grub:
menu.lst file not readable.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (900, 'testing'), (100, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18p4s
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)

Versions of packages mdadm depends on:
ii  debconf [debconf-2.0]        1.5.8       Debian configuration management sy
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  lsb-base                     3.1-22      Linux Standard Base 3.1 init scrip
ii  makedev                      2.3.1-83    creates device files in /dev

Versions of packages mdadm recommends:
ii  exim4-daemon-light [mail-tran 4.63-10    lightweight exim MTA (v4) daemon
ii  module-init-tools             3.3-pre3-1 tools for managing Linux kernel mo

-- debconf information:
  mdadm/autostart: true
* mdadm/initrdstart: all
  mdadm/initrdstart_notinconf: false
  mdadm/initrdstart_msg_errexist:
  mdadm/initrdstart_msg_intro:
  mdadm/initrdstart_msg_errblock:
* mdadm/start_daemon: true
* mdadm/mail_to: root
  mdadm/initrdstart_msg_errmd:
  mdadm/initrdstart_msg_errconf:
* mdadm/autocheck: true
-------------- next part --------------
# This file is sourced by /lib/lsb/init-fuctions
# it redefines the log_end_message function to
# call splashy_update.
#
# KNOWN BUGS
# Splashy and console-screen.sh don't work together.

# int log_end_message (int exitstatus)
log_end_msg () {
    # If no arguments were passed, return
    [ -z "${1:-}" ] && return 1
    # load some default variables
    [ -r /etc/default/splashy ] && . /etc/default/splashy

    # Only do the fancy stuff if we have an appropriate terminal
    # and if /usr is already mounted
    if log_use_fancy_output; then
        RED=`$TPUT setaf 1`
        NORMAL=`$TPUT op`
        if [ $1 -eq 0 ]; then
            echo "."
        else
            /bin/echo -e " ${RED}failed!${NORMAL}"
        fi
    else
        if [ $1 -eq 0 ]; then
            echo "."
        else
            echo " failed!"
        fi
    fi

    # Bug #400598
    if [ -z "$RUNLEVEL" ]; then
        # we need only the current level
        RUNLEVEL=`runlevel | sed 's/^. //'`
    fi

    # Start splashy code 
    SPL_UPD=/sbin/splashy_update
    SPL_PRG=/lib/splashy/$RUNLEVEL-progress

    if [ -x $SPL_UPD -a -f $SPL_PRG  ]; then
        # Get progress percentage of this script
        # was calculated by update-progress-steps
        PER=`sed -n 's+'${0}' ++ p' $SPL_PRG`

        # exceptions, whenever any of these scripts
        # is detected, we need to set Splashy's progress to 100%
        # and exit:
        # Xgl, gdm, kdm, xdm, (add other dm's here)
        #
        # Also if X or Xgl is running, we do the same thing.

        #echo ${0} | egrep -q '(gdm$|kdm$|xdm$)' && PER=100
        case "${0##*/}" in
            S*gdm | S*kdm | S*xdm )
            PER=100
            ;;
            # in Sid 2006-10-08 05:57 EDT the scripts after S99rc.local
            # do not call lsb* functions. So we don't know when the boot process is done
            S99rc.local )
            PER=100
            ;;
            *)
            ;;
        esac

        pidof X > /dev/null && PER=100
        pidof Xgl > /dev/null && PER=100

        if [ -n "$PER" ]; then
            # it makes no sense for us to send this step if splashy is not running
            # when the splashy process is running, the progressbar will jump
            # to the right location
            if (pidof splashy > /dev/null); then
                # Update progress bar 
                $SPL_UPD "progress $PER" || true
                # Write name of script to the splashy textarea
                #$SPL_UPD "print ${0##*/} $PER" || true

                # Write to log (for testing)
                if [ "x$DEBUG" != "x0" ]; then
                    uptime >> /tmp/splashy.log 2>&1
                    echo "print ${0##*/} $PER" >> /tmp/splashy.log
                fi

                if [ $PER -eq 100 ]; then
                    #echo "calling exit" >> /tmp/splashy.log
                    $SPL_UPD "exit" # && return $1 || sleep 1
                    # Write to log (for testing)
                    if [ "x$DEBUG" != "x0" ]; then
                        uptime >> /tmp/splashy.log 2>&1
                    fi
                    if (pidof splashy > /dev/null); then
                        # wait until splashy exits before changing tty's
                        # this is because of the fade-out effect mostly
                        # so 200 ms should do it
                        sleep 0.2
                        # FIXME what if splashy never exits? infinite loop!
                        while `pidof splashy > /dev/null`; do
                            sleep 0.2
                            #echo "calling killall -9 splashy" >> /tmp/splashy.log
                            # be thorough:
                            killall -9 splashy > /dev/null 2>&1
                        done
                    fi
                    # do some magic with the TTYs
                    if test -z "$CHVT_TTY"; then
                        CHVT_TTY=1
                    fi
                    # detect X, if not, go to CHVT_TTY
                    X11_RUNNING=0
                    pidof X > /dev/null && X11_RUNNING=1
                    if [ $X11_RUNNING -eq 1 ]; then
                        splashy_chvt 7
                    else
                        splashy_chvt $CHVT_TTY
                    fi
                    # Bug #400598
                    # if Splashy was running from initramfs,
                    # and our runlevel is currently a number between 2 and 5,
                    # we need to re-run keymap.sh and console-screen.sh
                    if [ "x$RUNLEVEL" != "x" \
                        -a "x$RUNLEVEL" != "x1" \
                        -a "x$RUNLEVEL" != "x6" \
                        -a "x$RUNLEVEL" != "x0" ]; then
                        if [ -r "/etc/default/splashy" ]; then
                            . /etc/default/splashy
                            if [ "x$ENABLE_INITRAMFS" = "x1" \
                                -o "x$ENABLE_INITRAMFS" = "xyes" \
                                -o "x$ENABLE_INITRAMFS" = "xYes" ]; then
                                if [ -x "/etc/init.d/keymap.sh" ]; then
                                    if [ "x$DEBUG" != "x0" ]; then
                                        uptime >> /tmp/splashy.log 2>&1
                                        echo "calling keymap.sh" >> /tmp/splashy.log
                                    fi
                                    /etc/init.d/keymap.sh start
                                fi
                                if [ -x "/etc/init.d/console-screen.sh" ]; then
                                    if [ "x$DEBUG" != "x0" ]; then
                                        uptime >> /tmp/splashy.log 2>&1
                                        echo "calling console-screen.sh" >> /tmp/splashy.log
                                    fi
                                    /etc/init.d/console-screen.sh start
                                fi
                            fi
                        fi
                    fi 
                fi
            fi 
        fi
    fi

    return $1
}



More information about the pkg-mdadm-devel mailing list