autofs: Upgrade fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs (Debian) |
Fix Released
|
Unknown
|
|||
autofs (Ubuntu) |
Fix Released
|
High
|
Adam Conrad |
Bug Description
Automatically imported from Debian bug report #300703 http://
Debian Bug Importer (debzilla) wrote : | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Message-Id: <email address hidden>
Date: Mon, 21 Mar 2005 09:58:26 +0100 (CET)
From: Anders =?iso-8859-
To: Debian Bug Tracking System <email address hidden>
Subject: autofs: Upgrade fails
Package: autofs
Version: 4.1.3+4.1.4beta2-3
Severity: grave
Upgrade from 4.1.3+4.1.4beta2-2 fails:
Preparing to replace autofs 4.1.3+4.1.4beta2-2 (using .../autofs_
Stopping automounter:dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
Stopping automounter:dpkg: ... it looks like that went OK.
Unpacking replacement autofs ...
...
Setting up autofs (4.1.3+
Installing new version of config file /etc/init.d/autofs ...
Stopping automounter:dpkg: error processing autofs (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
autofs
E: Sub-process /usr/bin/dpkg returned an error code (1)
Some errors occurred while unpacking. I'm going to configure the
packages that were installed. This may result in duplicate errors
or errors caused by missing dependencies. This is OK, only the errors
above this message are important. Please fix them and run [I]nstall again
Press enter to continue.
Setting up autofs (4.1.3+
Stopping automounter:dpkg: error processing autofs (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
autofs
installation script returned error exit status 100.
Press <enter> to continue.
This seems to fail also:
sid:~# /etc/init.d/autofs stop
Stopping automounter:sid:~#
sid:~# sh -x /etc/init.d/autofs stop
+ FLAGS='defaults 21'
+ DAEMON=
++ basename /usr/sbin/automount
+ prog=automount
+ initdir=/etc/init.d
+ test -e /usr/sbin/automount
+ system=unknown
+ '[' -f /etc/debian_version ']'
+ system=debian
+ '[' debian = redhat ']'
+ '[' debian = debian ']'
+ thisscript=
+ '[' '!' -f /etc/init.d/autofs ']'
+ PATH=/sbin:
+ export PATH
+ localoptions=
+ daemonoptions=
+ '[' debian = redhat ']'
+ '[' debian = debian ']'
+ TIMEOUT=300
+ DISABLE_DIRECT=1
+ DAEMON_EXIT_WAIT=20
+ '[' -f /etc/default/autofs ']'
+ . /etc/default/autofs
++ TIMEOUT=300
++ DISABLE_DIRECT=1
+ daemonoptions=' --timeout=300'
+ RETVAL=0
+ '[' debian = debian ']'
+ debian stop
+ set -e
+ case "$1" in
+ echo -n 'Stopping automounter:'
Stopping automounter:+ umount_loopback
++ LC_ALL=C
++ awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts
+ loops=
++ LC_ALL=C
++ awk '!/^#/ && $1 ~ /^automount/ {print $2}' /proc/mounts
+ automounts=
/var/autofs/net
/mnt/linux32/home
/mnt/linux32/nfs2
/home
/neti
/nfs2'
++ LC_ALL=C
++ awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts
+ loopmnts=
+ any=0
++ ls /var/run/
+ for file in '`ls ...
In Debian Bug tracker #300703, Francesco Potorti` (potorti) wrote : maybe the init.s script is broken? | #3 |
This one "fixed" the problem.
cd /etc/init.d/
diff -pu /etc/init.
--- /etc/init.d/autofs~ 2005-02-21 12:37:43.000000000 +0100
+++ /etc/init.d/autofs 2005-03-21 17:25:54.000000000 +0100
@@ -644,7 +644,7 @@ start)
stop)
echo -n 'Stopping automounter:'
- umount_loopback
+ umount_loopback || true
any=0
for file in `ls /var/run/
Diff finished at Mon Mar 21 17:26:46
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 313 8091
via G. Moruzzi 1, I-56124 Pisa Email: <email address hidden>
Web: http://
Debian Bug Importer (debzilla) wrote : | #4 |
Message-Id: <email address hidden>
Date: Mon, 21 Mar 2005 17:28:29 +0100
From: Francesco Potorti` <email address hidden>
To: <email address hidden>
CC: <email address hidden>
Subject: maybe the init.s script is broken?
This one "fixed" the problem.
cd /etc/init.d/
diff -pu /etc/init.
--- /etc/init.d/autofs~ 2005-02-21 12:37:43.000000000 +0100
+++ /etc/init.d/autofs 2005-03-21 17:25:54.000000000 +0100
@@ -644,7 +644,7 @@ start)
stop)
echo -n 'Stopping automounter:'
- umount_loopback
+ umount_loopback || true
any=0
for file in `ls /var/run/
Diff finished at Mon Mar 21 17:26:46
--
Francesco Potort�ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 313 8091
via G. Moruzzi 1, I-56124 Pisa Email: <email address hidden>
Web: http://
In Debian Bug tracker #300703, Adam Conrad (adconrad) wrote : | #5 |
If you want to solve this bug once and for all, just replace "--exec
$DAEMON" in your stop target with "--name automount" instead. This way,
it will match pidfile and process name, which is about as reliable for
getting the "right process", but won't fail on inode removal.
I'm making this change to the Ubuntu packages for now (as we're on an
older version without the attempted upgrade magic), but you could save
yourself a lot of headaches if you do the same in the Debian package, and
scrap a bunch of the other magic used to work around the disappearing
inode.
... Adam
Debian Bug Importer (debzilla) wrote : | #6 |
Message-ID: <email address hidden>
Date: Tue, 22 Mar 2005 10:18:01 +1100 (EST)
From: "Adam Conrad" <adconrad@0c3.net>
To: <email address hidden>
Subject: autofs: Upgrade fails
If you want to solve this bug once and for all, just replace "--exec
$DAEMON" in your stop target with "--name automount" instead. This way,
it will match pidfile and process name, which is about as reliable for
getting the "right process", but won't fail on inode removal.
I'm making this change to the Ubuntu packages for now (as we're on an
older version without the attempted upgrade magic), but you could save
yourself a lot of headaches if you do the same in the Debian package, and
scrap a bunch of the other magic used to work around the disappearing
inode.
... Adam
Adam Conrad (adconrad) wrote : | #7 |
This is fixed in version 4.1.3-8ubuntu1
In Debian Bug tracker #300703, Anders =?iso-8859-1?Q?Bostr=F6m?= (anders-netinsight) wrote : | #8 |
>>>>> "FP" == Francesco Potorti` <email address hidden> writes:
FP> This one "fixed" the problem.
FP> cd /etc/init.d/
FP> diff -pu /etc/init.
FP> --- /etc/init.d/autofs~ 2005-02-21 12:37:43.000000000 +0100
FP> +++ /etc/init.d/autofs 2005-03-21 17:25:54.000000000 +0100
FP> @@ -644,7 +644,7 @@ start)
FP> stop)
FP> echo -n 'Stopping automounter:'
FP> - umount_loopback
FP> + umount_loopback || true
FP> any=0
FP> for file in `ls /var/run/
FP> Diff finished at Mon Mar 21 17:26:46
I didn't have any loopback-mounts, so this one probably only fixed
another problem.
The real problem is 'start-stop-daemon --stop' failing. And it is
probably solved by the suggested change to --name instead of --exec.
/ Anders
Debian Bug Importer (debzilla) wrote : | #9 |
Message-Id: <email address hidden>
Date: Tue, 22 Mar 2005 08:53:56 +0100 (CET)
From: Anders =?iso-8859-
To: <email address hidden>, <email address hidden>
Subject: Re: maybe the init.s script is broken?
>>>>> "FP" == Francesco Potorti` <email address hidden> writes:
FP> This one "fixed" the problem.
FP> cd /etc/init.d/
FP> diff -pu /etc/init.
FP> --- /etc/init.d/autofs~ 2005-02-21 12:37:43.000000000 +0100
FP> +++ /etc/init.d/autofs 2005-03-21 17:25:54.000000000 +0100
FP> @@ -644,7 +644,7 @@ start)
FP> stop)
FP> echo -n 'Stopping automounter:'
FP> - umount_loopback
FP> + umount_loopback || true
FP> any=0
FP> for file in `ls /var/run/
FP> Diff finished at Mon Mar 21 17:26:46
I didn't have any loopback-mounts, so this one probably only fixed
another problem.
The real problem is 'start-stop-daemon --stop' failing. And it is
probably solved by the suggested change to --name instead of --exec.
/ Anders
In Debian Bug tracker #300703, Gustavo Franco (stratus) wrote : there's a patch to this bug. | #10 |
tags 300703 +patch
thanks
Hi Steinar,
I think that Adam pointed out a patch to this bug.
Hope that helps,
Gustavo Franco -- <email address hidden>
Debian Bug Importer (debzilla) wrote : | #11 |
Message-Id: <email address hidden>
Date: Thu, 24 Mar 2005 11:45:00 -0300
From: Gustavo Franco <email address hidden>
To: <email address hidden>
Subject: there's a patch to this bug.
tags 300703 +patch
thanks
Hi Steinar,
I think that Adam pointed out a patch to this bug.
Hope that helps,
Gustavo Franco -- <email address hidden>
In Debian Bug tracker #300703, Herbert Xu (herbert-gondor) wrote : Re: Bug#300703: autofs: Upgrade fails | #12 |
I just saw the same problem upgrading to sarge. I had a look around and
it looks like the script simply wasn't written to be run under set -e.
When a script uses $? liberally to explicitly test success/failure of
commands, you can't just enable -e and expect it to work. You have
to carefully inspect it to make sure that all failure cases are handled
so that they don't cause the script to bomb out when it shouldn't.
I made an attempt to do this here. No guarantees that this catches
all the problems but it does let me finish configuring the package.
--
Visit Openswan at http://
Email: Herbert Xu ~{PmV>HI~} <email address hidden>
Home Page: http://
PGP Key: http://
Debian Bug Importer (debzilla) wrote : | #13 |
Message-ID: <email address hidden>
Date: Fri, 25 Mar 2005 14:19:23 +1100
From: Herbert Xu <email address hidden>
To: <email address hidden>, <email address hidden>, <email address hidden>,
adconrad@0c3.net
Subject: Re: Bug#300703: autofs: Upgrade fails
--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii
Content-
I just saw the same problem upgrading to sarge. I had a look around and
it looks like the script simply wasn't written to be run under set -e.
When a script uses $? liberally to explicitly test success/failure of
commands, you can't just enable -e and expect it to work. You have
to carefully inspect it to make sure that all failure cases are handled
so that they don't cause the script to bomb out when it shouldn't.
I made an attempt to do this here. No guarantees that this catches
all the problems but it does let me finish configuring the package.
--
Visit Openswan at http://
Email: Herbert Xu ~{PmV>HI~} <email address hidden>
Home Page: http://
PGP Key: http://
--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii
Content-
--- autofs.old 2005-03-25 14:09:01.000000000 +1100
+++ autofs 2005-03-25 14:18:43.000000000 +1100
@@ -448,11 +448,11 @@
echo ""
echo -n $"Unmounting loopback filesystem $match: "
loopdev=
- umount -d $match
- if [ $? -eq 0 ]; then
+ if umount -d $match; then
echo "done"
else
echo "failed ($?)"
+ exit 1
fi
fi
done
@@ -470,11 +470,11 @@
if [ -n "$match" ]; then
echo ""
echo -n $"Unmounting loopback filesystem $match: "
- umount -d $match
- if [ $? -eq 0 ]; then
+ if umount -d $match; then
echo "done"
else
echo "failed ($?)"
+ exit 1
fi
fi
done
@@ -629,13 +629,12 @@
mnt=`echo $rest | sed 's/^.* \(\/[^ ]*\) [A-Za-z].*$/\1/'`
pidfile=
- start-stop-daemon --start --pidfile $pidfile --quiet \
+ if ! start-stop-daemon --start --pidfile $pidfile --quiet \
--exec $DAEMON -- --pid-file=$pidfile $rest
-
- if [ $? -ne 0 ]
then
echo
echo " failed to start automount point $mnt"
+ exit 1
fi
done
@@ -658,8 +657,8 @@
start-
--retry USR2/$DAEMON_
- --pidfile $file --exec $DAEMON
- ret=$?
+ --pidfile $file --exec $DAEMON ||
+ ret=$?
case $ret in
0)
@@ -675,7 +674,7 @@
;;
*)
echo -n -e \
- "\n Strange start-stop-daemon exit status: $?"
+ "\n Strange start-stop-daemon exit status: $ret"
;;
esac
fi
@@ -718,12 +717,12 @@
mnt=`echo $rest | sed 's/^.* \(\/[^ ]*\) [A-Za-z].*$/\1/'`
pidfile=
- start-stop-daemon --start --pidfile $pidfile --quiet \
+ if ! start-stop-daemon --start --pidfile $pidfile --quiet \
--exec $DAEMON -- --pid-file=$pidfile $rest
-
- if [ $? -ne 0 ]; then
+ then
echo
echo " failed to start automount p...
In Debian Bug tracker #300703, Steinar H. Gunderson (sesse) wrote : Bug#300703: fixed in autofs 4.1.3+4.1.4beta2-4 | #14 |
Source: autofs
Source-Version: 4.1.3+4.1.4beta2-4
We believe that the bug you reported is fixed in the latest version of
autofs, which is due to be installed in the Debian FTP archive:
autofs-
to pool/main/
autofs-
to pool/main/
autofs_
to pool/main/
autofs_
to pool/main/
autofs_
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Steinar H. Gunderson <email address hidden> (supplier of updated autofs package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Fri, 1 Apr 2005 15:58:20 +0200
Source: autofs
Binary: autofs-hesiod autofs-ldap autofs
Architecture: source i386
Version: 4.1.3+4.1.4beta2-4
Distribution: unstable
Urgency: high
Maintainer: Steinar H. Gunderson <email address hidden>
Changed-By: Steinar H. Gunderson <email address hidden>
Description:
autofs - kernel-based automounter for Linux
autofs-hesiod - Hesiod map support for autofs
autofs-ldap - LDAP map support for autofs
Closes: 295480 299298 300703
Changes:
autofs (4.1.3+
.
* Urgency=high, fixes RC-bugs.
* 054_no_
init.d script, which caused failures at lot of different unexpected
points. (Closes: #300703, #295480, #299298)
Files:
e5f53b2ec90220
1747ea041eb360
f3e5306f5b2c64
e4dcd1045fc0d5
b919dc18807584
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCTVWgXKR
VfFCNbwgUR6Z29q
=ZGzv
-----END PGP SIGNATURE-----
In Debian Bug tracker #300703, Steinar H. Gunderson (sesse) wrote : Track autofs RC bug in sarge | #15 |
reopen 300703
tags 300703 + sarge
thanks
--
Homepage: http://
Debian Bug Importer (debzilla) wrote : | #16 |
Message-Id: <email address hidden>
Date: Fri, 01 Apr 2005 09:32:15 -0500
From: <email address hidden> (Steinar H. Gunderson)
To: <email address hidden>
Subject: Bug#300703: fixed in autofs 4.1.3+4.1.4beta2-4
Source: autofs
Source-Version: 4.1.3+4.1.4beta2-4
We believe that the bug you reported is fixed in the latest version of
autofs, which is due to be installed in the Debian FTP archive:
autofs-
to pool/main/
autofs-
to pool/main/
autofs_
to pool/main/
autofs_
to pool/main/
autofs_
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Steinar H. Gunderson <email address hidden> (supplier of updated autofs package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Fri, 1 Apr 2005 15:58:20 +0200
Source: autofs
Binary: autofs-hesiod autofs-ldap autofs
Architecture: source i386
Version: 4.1.3+4.1.4beta2-4
Distribution: unstable
Urgency: high
Maintainer: Steinar H. Gunderson <email address hidden>
Changed-By: Steinar H. Gunderson <email address hidden>
Description:
autofs - kernel-based automounter for Linux
autofs-hesiod - Hesiod map support for autofs
autofs-ldap - LDAP map support for autofs
Closes: 295480 299298 300703
Changes:
autofs (4.1.3+
.
* Urgency=high, fixes RC-bugs.
* 054_no_
init.d script, which caused failures at lot of different unexpected
points. (Closes: #300703, #295480, #299298)
Files:
e5f53b2ec90220
1747ea041eb360
f3e5306f5b2c64
e4dcd1045fc0d5
b919dc18807584
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCTVWgXKR
VfFCNbwgUR6Z29q
=ZGzv
-----END PGP SIGNATURE-----
Debian Bug Importer (debzilla) wrote : | #17 |
Message-ID: <email address hidden>
Date: Sat, 2 Apr 2005 14:14:26 +0200
From: "Steinar H. Gunderson" <email address hidden>
To: <email address hidden>
Subject: Track autofs RC bug in sarge
reopen 300703
tags 300703 + sarge
thanks
--
Homepage: http://
In Debian Bug tracker #300703, Steve Langasek (vorlon) wrote : fixed package has reached sarge | #18 |
# in sarge now, re-closing
tags 300703 -sarge
close 300703
thanks
Debian Bug Importer (debzilla) wrote : | #19 |
Message-ID: <email address hidden>
Date: Wed, 6 Apr 2005 17:45:12 -0700
From: Steve Langasek <email address hidden>
To: <email address hidden>
Subject: fixed package has reached sarge
# in sarge now, re-closing
tags 300703 -sarge
close 300703
thanks
Changed in autofs: | |
status: | Unknown → Fix Released |
Automatically imported from Debian bug report #300703 http:// bugs.debian. org/300703