Debian Bug report logs - #498784
Don't silently recover from debconf error

version graph

Package: mdcfg; Maintainer for mdcfg is Debian Install System Team <debian-boot@lists.debian.org>; Source for mdcfg is src:mdcfg.

Reported by: Martin Michlmayr <tbm@cyrius.com>

Date: Sat, 13 Sep 2008 08:54:01 UTC

Severity: normal

Tags: patch

Found in version mdcfg/1.27

Fixed in version mdcfg/1.28

Done: Jérémy Bobbio <lunar@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#498784; Package mdcfg. Full text and rfc822 format available.

Acknowledgement sent to Martin Michlmayr <tbm@cyrius.com>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: submit@bugs.debian.org
Subject: mdcfg hangs when there is no partition for spare device
Date: Sat, 13 Sep 2008 11:44:26 +0300
Package: mdcfg
Version: 1.27
Severity: serious

I chose 1 partition (sda2) for RAID in partman and entered the RAID
config tool.  I then chose RAID1 with 1 active partition and 1 spare
partition.  I got a prompt asking which partition to use for the
active one and chose sda2.  Then mdcfg hangs.  Looking at the code, it
does (lines 329-331):

db_subst mdcfg/raidsparedevs PARTITIONS "$PARTITIONS"
db_input critical mdcfg/raidsparedevs
db_go

$PARTITIONS is empty in my case and apparently debconf doesn't like an
empty variable for Choices and hangs.

There is a check whethere there are enough partitions available but
this is not run if the RAID level is 1:

REQUIRED=$(($DEV_COUNT + $SPARE_COUNT))
if [ $LEVEL -ne 1 ]; then
    if [ $REQUIRED -gt $NUM_PART ]; then
        db_subst mdcfg/notenoughparts NUM_PART "$NUM_PART"

Any idea why this check is not run for RAID level 1?
-- 
Martin Michlmayr
http://www.cyrius.com/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#498784; Package mdcfg. Full text and rfc822 format available.

Acknowledgement sent to Ryan Niebur <ryanryan52@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 498784@bugs.debian.org (full text, mbox):

From: Ryan Niebur <ryanryan52@gmail.com>
To: 498784@bugs.debian.org
Subject: Re: Bug#498784: mdcfg hangs when there is no partition for spare device
Date: Sat, 13 Sep 2008 22:36:59 -0700
[Message part 1 (text/plain, inline)]
tags 498784 + patch
thanks

On Sat, Sep 13, 2008 at 11:44:26AM +0300, Martin Michlmayr wrote:
> Package: mdcfg
> Version: 1.27
> Severity: serious
> 
> I chose 1 partition (sda2) for RAID in partman and entered the RAID
> config tool.  I then chose RAID1 with 1 active partition and 1 spare
> partition.  I got a prompt asking which partition to use for the
> active one and chose sda2.  Then mdcfg hangs.  Looking at the code, it
> does (lines 329-331):
> 

Attached is a (trivial, and of course tested) patch that fixes this.

> db_subst mdcfg/raidsparedevs PARTITIONS "$PARTITIONS"
> db_input critical mdcfg/raidsparedevs
> db_go
> 
> $PARTITIONS is empty in my case and apparently debconf doesn't like an
> empty variable for Choices and hangs.
> 

It looks like previously debconf allowed that, and just didn't show
the menu. I tested with the etch installer (with some added debug
statements), and that was how it behaved.

> There is a check whethere there are enough partitions available but
> this is not run if the RAID level is 1:
> 
> REQUIRED=$(($DEV_COUNT + $SPARE_COUNT))
> if [ $LEVEL -ne 1 ]; then
>     if [ $REQUIRED -gt $NUM_PART ]; then
>         db_subst mdcfg/notenoughparts NUM_PART "$NUM_PART"
> 
> Any idea why this check is not run for RAID level 1?

This is because mdcfg allows "degraded" RAID 1 arrays (arrays that
don't have all of the devices that you say the array should have). It
will add missing spares at line 373 (even though missing spares don't
make much sense).

> -- 
> Martin Michlmayr
> http://www.cyrius.com/
> 
> 
> 

Thanks,
Ryan52

-- 
_________________________
Ryan Niebur
RyanRyan52@gmail.com
[fix-raid1-spares (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Tags added: patch Request was from Ryan Niebur <ryanryan52@gmail.com> to control@bugs.debian.org. (Sun, 14 Sep 2008 05:42:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#498784; Package mdcfg. Full text and rfc822 format available.

Acknowledgement sent to Jérémy Bobbio <lunar@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #17 received at 498784@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: Ryan Niebur <ryanryan52@gmail.com>, 498784@bugs.debian.org
Subject: Re: Bug#498784: mdcfg hangs when there is no partition for spare device
Date: Sun, 14 Sep 2008 14:49:36 +0200
[Message part 1 (text/plain, inline)]
On Sat, Sep 13, 2008 at 10:36:59PM -0700, Ryan Niebur wrote:
> On Sat, Sep 13, 2008 at 11:44:26AM +0300, Martin Michlmayr wrote:
> > I chose 1 partition (sda2) for RAID in partman and entered the RAID
> > config tool.  I then chose RAID1 with 1 active partition and 1 spare
> > partition.  I got a prompt asking which partition to use for the
> > active one and chose sda2.  Then mdcfg hangs.  Looking at the code, it
> > does (lines 329-331):
> > 
> 
> Attached is a (trivial, and of course tested) patch that fixes this.

Well, the hang is due to a regression in cdebconf for which a fix has
already been commited (#498846), upload pending.

Nevertheless, I still think that it would make sense to commit your
patch to mdcfg: silently recovering from an error does not feel like
good code to me.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#498784; Package mdcfg. Full text and rfc822 format available.

Acknowledgement sent to Otavio Salvador <otavio@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #22 received at 498784@bugs.debian.org (full text, mbox):

From: Otavio Salvador <otavio@debian.org>
To: Ryan Niebur <ryanryan52@gmail.com>
Cc: 498784@bugs.debian.org
Subject: Re: Bug#498784: mdcfg hangs when there is no partition for spare device
Date: Mon, 15 Sep 2008 09:55:19 -0300
Jérémy Bobbio <lunar@debian.org> writes:

> Well, the hang is due to a regression in cdebconf for which a fix has
> already been commited (#498846), upload pending.

Can you do the upload or wish me to do that?

> Nevertheless, I still think that it would make sense to commit your
> patch to mdcfg: silently recovering from an error does not feel like
> good code to me.

Can you push it? Makes sense!

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."




Severity set to `normal' from `serious' Request was from Ryan Niebur <ryanryan52@gmail.com> to control@bugs.debian.org. (Tue, 16 Sep 2008 02:21:03 GMT) Full text and rfc822 format available.

Changed Bug title to `Don't silently recover from debconf error' from `mdcfg hangs when there is no partition for spare device'. Request was from Ryan Niebur <ryanryan52@gmail.com> to control@bugs.debian.org. (Tue, 16 Sep 2008 02:21:03 GMT) Full text and rfc822 format available.

Reply sent to Jérémy Bobbio <lunar@debian.org>:
You have taken responsibility. (Sun, 21 Sep 2008 09:51:19 GMT) Full text and rfc822 format available.

Notification sent to Martin Michlmayr <tbm@cyrius.com>:
Bug acknowledged by developer. (Sun, 21 Sep 2008 09:51:19 GMT) Full text and rfc822 format available.

Message #31 received at 498784-close@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: 498784-close@bugs.debian.org
Subject: Bug#498784: fixed in mdcfg 1.28
Date: Sun, 21 Sep 2008 09:02:22 +0000
Source: mdcfg
Source-Version: 1.28

We believe that the bug you reported is fixed in the latest version of
mdcfg, which is due to be installed in the Debian FTP archive:

mdcfg-utils_1.28_all.udeb
  to pool/main/m/mdcfg/mdcfg-utils_1.28_all.udeb
mdcfg_1.28.dsc
  to pool/main/m/mdcfg/mdcfg_1.28.dsc
mdcfg_1.28.tar.gz
  to pool/main/m/mdcfg/mdcfg_1.28.tar.gz
mdcfg_1.28_all.udeb
  to pool/main/m/mdcfg/mdcfg_1.28_all.udeb



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 498784@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Bobbio <lunar@debian.org> (supplier of updated mdcfg 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.8
Date: Sun, 21 Sep 2008 08:45:45 +0000
Source: mdcfg
Binary: mdcfg mdcfg-utils
Architecture: source all
Version: 1.28
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Jérémy Bobbio <lunar@debian.org>
Description: 
 mdcfg      - Configure MD devices (udeb)
 mdcfg-utils - Configure MD devices (udeb)
Closes: 498784
Changes: 
 mdcfg (1.28) unstable; urgency=low
 .
   [ Jérémy Bobbio ]
   * Do not call debconf to ask for spare RAID devices when there is no spare
     devices available.  Patch by Ryan Niebur.  (Closes: #498784)
 .
   [ Updated translations ]
   * Arabic (ar.po) by Ossama M. Khayat
   * Belarusian (be.po) by Pavel Piatruk
   * Bengali (bn.po) by Mahay Alam Khan (মাহে আলম খান)
   * Bosnian (bs.po) by Armin Besirovic
   * Catalan (ca.po) by Jordi Mallach
   * Czech (cs.po) by Miroslav Kure
   * Welsh (cy.po) by Jonathan Price
   * Danish (da.po)
   * German (de.po) by Jens Seidel
   * Greek, Modern (el.po) by Emmanuel Galatoulas
   * Esperanto (eo.po) by Felipe Castro
   * Spanish (es.po) by Javier Fernández-Sanguino Peña
   * Basque (eu.po) by Piarres Beobide
   * Finnish (fi.po) by Esko Arajärvi
   * Hebrew (he.po) by Omer Zak
   * Hindi (hi.po) by Kumar Appaiah
   * Croatian (hr.po) by Josip Rodin
   * Hungarian (hu.po) by SZERVÁC Attila
   * Indonesian (id.po) by Arief S Fitrianto
   * Italian (it.po) by Milo Casagrande
   * Japanese (ja.po) by Kenshi Muto
   * Georgian (ka.po) by Aiet Kolkhi
   * Central Khmer (km.po) by KHOEM Sokhem
   * Korean (ko.po) by Changwoo Ryu
   * Kurdish (ku.po) by Amed Çeko Jiyan
   * Lithuanian (lt.po) by Kęstutis Biliūnas
   * Latvian (lv.po) by Aigars Mahinovs
   * Macedonian (mk.po) by Arangel Angov
   * Malayalam (ml.po) by പ്രവീണ്‍ അരിമ്പ്രത്തൊടിയില്‍
   * Nepali (ne.po) by Shiva Prasad Pokharel
   * Dutch (nl.po) by Frans Pop
   * Norwegian Nynorsk (nn.po) by Håvard Korsvoll
   * Panjabi (pa.po) by Amanpreet Singh Alam
   * Polish (pl.po) by Bartosz Fenski
   * Russian (ru.po) by Yuri Kozlov
   * Slovenian (sl.po) by Vanja Cvelbar
   * Albanian (sq.po) by Elian Myftiu
   * Serbian (sr.po) by Veselin Mijušković
   * Tamil (ta.po) by Dr.T.Vasudevan
   * Thai (th.po) by Theppitak Karoonboonyanan
   * Turkish (tr.po) by Mert Dirik
   * Ukrainian (uk.po) by Євгеній Мещеряков
   * Vietnamese (vi.po) by Clytie Siddall
   * Simplified Chinese (zh_CN.po) by Deng Xiyue
Checksums-Sha1: 
 484d6f49e5d2005320408c6d67da07ab4761ad1e 853 mdcfg_1.28.dsc
 41e7a2f2fb0db9fb41a3c9ce97672cd8b9e4d9f2 134701 mdcfg_1.28.tar.gz
 50dfabd00e8baa38886a1e6f6875d00f6ab29393 4108 mdcfg_1.28_all.udeb
 7766bce5001e89ab403db36d91f6b5fe10ccea7f 119356 mdcfg-utils_1.28_all.udeb
Checksums-Sha256: 
 3f273c64648c0fc9792e95d721f2cab222dc47494728d775661ccf56a8e81576 853 mdcfg_1.28.dsc
 c976d4e47de69425c98d77446d71b808e1a5c61e37e401ceec5a95dfb03b1676 134701 mdcfg_1.28.tar.gz
 f195a49018cefad59741b9577a6e1b08b71df942dd593a219fc323eee0b3faba 4108 mdcfg_1.28_all.udeb
 06f8f3fcc2f3d7f200b8871434e753ce962ae88c6a44d91f8fc6e1ae491bd4c9 119356 mdcfg-utils_1.28_all.udeb
Files: 
 510f3821280235edec3163ed2e00e463 853 debian-installer optional mdcfg_1.28.dsc
 2dd86f75f0493b5c0c2f91d06947d1a0 134701 debian-installer optional mdcfg_1.28.tar.gz
 fa13a1346ded3ef4685e3c539122f7bb 4108 debian-installer optional mdcfg_1.28_all.udeb
 eeb353e460cc100b84bb5619869a1ff9 119356 debian-installer optional mdcfg-utils_1.28_all.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFI1go42PUjs9fQ72URAtAUAJ9aSSMzOHxmKCIVvNxa0PcdyPpjogCffvEh
/JeyjijPnfIqfKnn+chDSQ4=
=/MnK
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 21 Oct 2008 07:32:18 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 07:36:41 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.