Debian Bug report logs -
#274208
mdadm: postinst script owerwrites /etc/default/mdadm values
Reported by: Michael Tokarev <mjt@corpit.ru>
Date: Thu, 30 Sep 2004 11:18:04 UTC
Severity: grave
Tags: patch
Found in version 1.7.0-1
Fixed in version mdadm/1.7.0-2
Done: Mario Joussen <joussen@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Michael Tokarev <mjt@corpit.ru>:
New Bug report received and forwarded. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: mdadm
Version: 1.7.0-1
Severity: grave
When upgrading mdadm package, postinst script
owerwrites /etc/default/mdadm conffile with
values stored in debconf cache. Ie, any changes
made in that file will be lost after upgrade,
wich, together the mess with AUTOSTART variable
changing it's meaning in every of several
previous releases, when on had to tweak the
value after every upgrade, with good probability
makes a system with raid arrays unbootable
(thus severity of the bug).
As it was pointed out, debconf database is
only a cache for configuration questions,
and should NOT be used to STORE the config
info, which, if needed, should be retrieved
from actual config files (/etc/default/mdadm
in this case) during upgrade.
And when we're at it, both init scripts are
trying to load md module unconditionally.
It will be better if mdadm-raid initscript
will probe for md driver inside the
if [ $AUTOSTART .. ]... fi
block, in "start" case only (as other
parts of the script does nothing anyway),
and mdadm script will not probe for the
md module at all, -- if there's no
/proc/mdstat present at a time when
mdadm monitor is starting (which happens
near the end of boot process), there's
no reason to load the module and start
monitoring.
/mjt
-- System Information
Debian Release: 3.0
Kernel Version: Linux paltus.tls.msk.ru 2.6.7-i686-2 #1 Mon Jul 26 18:54:34 MSD 2004 i686 GNU/Linux
Versions of the packages mdadm depends on:
||/ Name Version Description
+++-==============-==============-============================================
ii debconf 1.4.30.3 Debian configuration management system
ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries and Timezone
ii makedev 2.3.1-75 Creates device files in /dev
Information forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Fabio Massimo Di Nitto <fabbione@fabbione.net>:
Extra info received and forwarded to list. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #10 received at 274208@bugs.debian.org (full text, mbox, reply):
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
tag 274208 patch
stop
Hi,
I prepared and tested a patch to fix this bug that you can find here:
http://people.ubuntulinux.org/patches/mdadm.274208.diff
Thanks
Fabio
- --
<user> fajita: step one
<fajita> Whatever the problem, step one is always to look in the error log.
<user> fajita: step two
<fajita> When in danger or in doubt, step two is to scream and shout.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBXPL9hCzbekR3nhgRAlDyAJ448gJpcHaMYZwIEBq78xXXr7WpmwCeMfQF
zDanQ2/lyatlBbJywZi9Pew=
=IUBZ
-----END PGP SIGNATURE-----
Tags added: patch
Request was from Fabio Massimo Di Nitto <fabbione@fabbione.net>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Frank Lichtenheld <djpig@debian.org>:
Extra info received and forwarded to list. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #17 received at 274208@bugs.debian.org (full text, mbox, reply):
On Fri, Oct 01, 2004 at 08:02:39AM +0200, Fabio Massimo Di Nitto wrote:
> Hi,
> I prepared and tested a patch to fix this bug that you can find here:
>
> http://people.ubuntulinux.org/patches/mdadm.274208.diff
One question to the patch: You only load the config from
/etc/mdadm/debian.conf. As I understand the
postinst, this file was the old location for storing these
values and /etc/default/mdadm is used now. Shouldn't
mdadm.config try to load both files, prefering
/etc/default/mdadm if both exist?
Gruesse,
--
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/
Information forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Fabio Massimo Di Nitto <fabbione@fabbione.net>:
Extra info received and forwarded to list. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #22 received at 274208@bugs.debian.org (full text, mbox, reply):
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Frank Lichtenheld wrote:
| On Fri, Oct 01, 2004 at 08:02:39AM +0200, Fabio Massimo Di Nitto wrote:
|
|>Hi,
|> I prepared and tested a patch to fix this bug that you can find here:
|>
|>http://people.ubuntulinux.org/patches/mdadm.274208.diff
|
|
| One question to the patch: You only load the config from
| /etc/mdadm/debian.conf. As I understand the
| postinst, this file was the old location for storing these
| values and /etc/default/mdadm is used now. Shouldn't
| mdadm.config try to load both files, prefering
| /etc/default/mdadm if both exist?
|
| Gruesse,
argh, you are right! I did the patch on an older version of mdadm, but
the logic of the patch is exactly the same. You can adapt it easily to
the new one.
Fabio
- --
<user> fajita: step one
<fajita> Whatever the problem, step one is always to look in the error log.
<user> fajita: step two
<fajita> When in danger or in doubt, step two is to scream and shout.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBaLG0hCzbekR3nhgRAtUuAKCl61hnPs2KfWuU/DBBgnP15klDhwCdG1As
cIEM7/cb8smv8LNQWBeVF2E=
=HUW0
-----END PGP SIGNATURE-----
Information forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Frank Lichtenheld <djpig@debian.org>:
Extra info received and forwarded to list. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #27 received at 274208@bugs.debian.org (full text, mbox, reply):
On Sun, Oct 10, 2004 at 05:51:18AM +0200, Fabio Massimo Di Nitto wrote:
> argh, you are right! I did the patch on an older version of mdadm, but
> the logic of the patch is exactly the same. You can adapt it easily to
> the new one.
Here is a modified patch that should deal both with the old
and the new file location. Should I upload this as a NMU or do
you plan an upload yourself?
diff -Naur mdadm-1.7.0.bak/debian/mdadm.config mdadm-1.7.0/debian/mdadm.config
--- mdadm-1.7.0.bak/debian/mdadm.config 2004-10-18 23:57:16.000000000 +0200
+++ mdadm-1.7.0/debian/mdadm.config 2004-10-19 00:07:16.000000000 +0200
@@ -6,6 +6,29 @@
. /usr/share/debconf/confmodule
+DEBIANCONFIG=/etc/default/mdadm
+DEBIANCONFIG_OLD=/etc/mdadm/debian.conf
+
+if [ ! -e "$DEBIANCONFIG" ]; then
+ if [ -e "$DEBIANCONFIG_OLD" ]; then
+ DEBIANCONFIG="$DEBIANCONFIG_OLD"
+ fi
+fi
+
+# preseed debconf templates
+if [ -s $DEBIANCONFIG ] ; then
+ . $DEBIANCONFIG
+ if [ -n "$AUTOSTART" ]; then
+ db_set mdadm/autostart "$AUTOSTART"
+ fi
+ if [ -n "$START_DAEMON" ]; then
+ db_set mdadm/start_daemon "$START_DAEMON"
+ fi
+ if [ -n "$MAIL_TO" ]; then
+ db_set mdadm/mail_to "$MAIL_TO"
+ fi
+fi
+
db_input medium mdadm/warning || true
db_go
Gruesse,
--
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/
Information forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Fabio Massimo Di Nitto <fabbione@fabbione.net>:
Extra info received and forwarded to list. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #32 received at 274208@bugs.debian.org (full text, mbox, reply):
Frank Lichtenheld wrote:
> On Sun, Oct 10, 2004 at 05:51:18AM +0200, Fabio Massimo Di Nitto wrote:
>
>>argh, you are right! I did the patch on an older version of mdadm, but
>>the logic of the patch is exactly the same. You can adapt it easily to
>>the new one.
>
>
> Here is a modified patch that should deal both with the old
> and the new file location.
It looks sane to me.
> Should I upload this as a NMU or do
> you plan an upload yourself?
I was hoping in the maintianer but please go ahead. I am in short of time :(
Fabio
>
> diff -Naur mdadm-1.7.0.bak/debian/mdadm.config mdadm-1.7.0/debian/mdadm.config
> --- mdadm-1.7.0.bak/debian/mdadm.config 2004-10-18 23:57:16.000000000 +0200
> +++ mdadm-1.7.0/debian/mdadm.config 2004-10-19 00:07:16.000000000 +0200
> @@ -6,6 +6,29 @@
>
> . /usr/share/debconf/confmodule
>
> +DEBIANCONFIG=/etc/default/mdadm
> +DEBIANCONFIG_OLD=/etc/mdadm/debian.conf
> +
> +if [ ! -e "$DEBIANCONFIG" ]; then
> + if [ -e "$DEBIANCONFIG_OLD" ]; then
> + DEBIANCONFIG="$DEBIANCONFIG_OLD"
> + fi
> +fi
> +
> +# preseed debconf templates
> +if [ -s $DEBIANCONFIG ] ; then
> + . $DEBIANCONFIG
> + if [ -n "$AUTOSTART" ]; then
> + db_set mdadm/autostart "$AUTOSTART"
> + fi
> + if [ -n "$START_DAEMON" ]; then
> + db_set mdadm/start_daemon "$START_DAEMON"
> + fi
> + if [ -n "$MAIL_TO" ]; then
> + db_set mdadm/mail_to "$MAIL_TO"
> + fi
> +fi
> +
> db_input medium mdadm/warning || true
> db_go
>
>
> Gruesse,
--
<user> fajita: step one
<fajita> Whatever the problem, step one is always to look in the error log.
<user> fajita: step two
<fajita> When in danger or in doubt, step two is to scream and shout.
Information forwarded to debian-bugs-dist@lists.debian.org, Mario Joussen <joussen@debian.org>:
Bug#274208; Package mdadm.
(full text, mbox, link).
Acknowledgement sent to Mario Joußen <mario@joussen.org>:
Extra info received and forwarded to list. Copy sent to Mario Joussen <joussen@debian.org>.
(full text, mbox, link).
Message #37 received at 274208@bugs.debian.org (full text, mbox, reply):
Fabio Massimo Di Nitto wrote:
> Frank Lichtenheld wrote:
>
>> On Sun, Oct 10, 2004 at 05:51:18AM +0200, Fabio Massimo Di Nitto wrote:
>>
>>> argh, you are right! I did the patch on an older version of mdadm, but
>>> the logic of the patch is exactly the same. You can adapt it easily to
>>> the new one.
>>
>> Here is a modified patch that should deal both with the old
>> and the new file location.
>
> It looks sane to me.
>
>> Should I upload this as a NMU or do
>> you plan an upload yourself?
>
> I was hoping in the maintianer but please go ahead. I am in short of
> time :(
I will do the upload in the next few days. Thanks for the patches.
> Fabio
Cheers, Mario
--
,,,
Mario Joußen (o o) mario@joussen.org
+--------------------------------oOO--(_)--OOo--------------------------------+
BOFH excuse #401: Sales staff sold a product we don't offer.
Reply sent to Mario Joussen <joussen@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Michael Tokarev <mjt@corpit.ru>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #42 received at 274208-close@bugs.debian.org (full text, mbox, reply):
Source: mdadm
Source-Version: 1.7.0-2
We believe that the bug you reported is fixed in the latest version of
mdadm, which is due to be installed in the Debian FTP archive:
mdadm-udeb_1.7.0-2_i386.udeb
to pool/main/m/mdadm/mdadm-udeb_1.7.0-2_i386.udeb
mdadm_1.7.0-2.diff.gz
to pool/main/m/mdadm/mdadm_1.7.0-2.diff.gz
mdadm_1.7.0-2.dsc
to pool/main/m/mdadm/mdadm_1.7.0-2.dsc
mdadm_1.7.0-2_i386.deb
to pool/main/m/mdadm/mdadm_1.7.0-2_i386.deb
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 274208@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Mario Joussen <joussen@debian.org> (supplier of updated mdadm 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 ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sun, 24 Oct 2004 19:48:06 +0200
Source: mdadm
Binary: mdadm mdadm-udeb
Architecture: source i386
Version: 1.7.0-2
Distribution: unstable
Urgency: high
Maintainer: Mario Joussen <joussen@debian.org>
Changed-By: Mario Joussen <joussen@debian.org>
Description:
mdadm - Manage MD devices aka Linux Software Raid
mdadm-udeb - Manage MD devices aka Linux Software Raid (udeb)
Closes: 274208
Changes:
mdadm (1.7.0-2) unstable; urgency=high
.
* Changed debconf script to save the settings from the config file.
Thanks to Fabio Massimo Di Nitto <fabbione@fabbione.net> and
Frank Lichtenheld <djpig@debian.org> for the patch.
(closes: Bug#274208)
* Moved try to load md module inside the AUTOSTART if branch in
/etc/init.d/mdadm.
* Removed try to load md module from /etc/init.d/mdadm-raid.
Files:
a5b9b6170cbe46211868b3a9f329ca79 609 admin optional mdadm_1.7.0-2.dsc
fd1712872bb59d780152fedfe28413e8 30688 admin optional mdadm_1.7.0-2.diff.gz
a28bddf9a310bb874f2e628affafdec8 96748 admin optional mdadm_1.7.0-2_i386.deb
492d138cea6b7b77e16c1bc15df86f07 40206 debian-installer optional mdadm-udeb_1.7.0-2_i386.udeb
package-type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQFBe+/nMHtSKdKmuBARAhICAKC+eiyYCpQ8Aio4mc07jeudfyjfuACfaCyC
2v0cT5m2YbiV9zA6+nf/5D0=
=1cnh
-----END PGP SIGNATURE-----
Bug unarchived.
Request was from Stefano Zacchiroli <zack@debian.org>
to control@bugs.debian.org.
(Sun, 10 Apr 2011 08:44:07 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 09 May 2011 07:32:55 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Oct 11 12:07:26 2017;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.