Prompt for BOOT_DEGRADED=true|false in the installer

Bug #268580 reported by Dustin Kirkland  on 2008-09-10
4
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Medium
Dustin Kirkland 
partman-md (Ubuntu)
Undecided
Unassigned
partman-target (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: partman-target

If installing / or /boot onto a RAID device, the Ubuntu installer should ask the if they want to configure their system to boot if the root RAID becomes degraded.

This debconf configuration is currently held in the mdadm package. However, we should really prompt for this information within the installer.

I'm currently working on a patch against partman-target, which does some checking with respect to the partitioning. The code may well end up elsewhere, but for now, it seems like a reasonable location.

:-Dustin

Changed in partman-target:
assignee: nobody → kirkland
importance: Undecided → Medium
milestone: none → intrepid-alpha-6
status: New → In Progress
ceg (ceg) wrote :

When a disk fails in a running system a raid will run degraded. The System doesn't stop, and probably should't. The mdadm notification functionality brings this to the admins attention.

So changing the default to bootdegraded=yes seems reasonable, once the patches are tested to work with enough configurations, and will be safe, if no other md devices than the ones neccessary to set up the fstab are touched.

(This is when mdadm --incremental is used in udev rules and only specific raids will be run even degraded on boot with mdadm --run /dev/mdX)

Dustin Kirkland  (kirkland) wrote :

According to cjwatson, this should be fixed in mdadm and partman-md, not partman-target.

<cjwatson> kirkland: firstly, I think this should be in partman-md, not partman-target; you can add a new check.d script for it there
<cjwatson> kirkland: *bing* sorry, a lightbulb just went off
<cjwatson> kirkland: you want the translated text in mdadm too, right? great. put it there, and *also* put it in mdadm-udeb, along with the check.d script!
<cjwatson> no more translation syncing problem
<cjwatson> that will make it much more comfortable and less namespace-violating to call the template mdadm/boot_degraded
<cjwatson> kirkland: you'll need a slightly awkward trick to get the answer to the question into /target; this is necessary because (presumably) you don't want to ask the question when mdadm is actually installed, but instead during partman
<cjwatson> kirkland: this trick is: db_get mdadm/boot_degraded; echo mdadm mdadm/boot_degraded boolean "$RET" | debconf-set-selections
<cjwatson> with a comment explaining that you're doing this so that the value gets set in /target's debconf database before mdadm is installed
<cjwatson> kirkland: in the template, you should avoid "yes"; we try to write templates so that they're agnostic of changes in the debconf frontend. We usually prefer language such as "you might want to boot your system even with a degraded RAID if ..."
<cjwatson> kirkland: I think perhaps the short description could be clearer. Maybe "Do you want to boot normally even if your RAID becomes degraded?"

Changed in mdadm:
importance: Undecided → Medium
milestone: none → intrepid-alpha-6
status: New → In Progress
Changed in partman-md:
status: New → In Progress
Changed in partman-target:
status: In Progress → Invalid
milestone: intrepid-alpha-6 → none
Changed in mdadm:
assignee: nobody → kirkland
Changed in partman-md:
assignee: nobody → kirkland
milestone: none → intrepid-alpha-6
Changed in partman-target:
assignee: kirkland → nobody
importance: Medium → Undecided
Dustin Kirkland  (kirkland) wrote :

Work in progress patch. Not yet ready for upload.

:-Dustin

Dustin Kirkland  (kirkland) wrote :

Patch attached.

This patch seems to do all of the right things in the installer, except that I'm not seeing the mdadm/boot_degraded value in /var/lib/preseed/log. I'm not sure why that is...any help would be appreciated.

It also fixes a small but significant bug in the handling of obtaining the initial value in the mdadm.deb, which was defaulting BOOT_DEGRADED="false", rather than "", which would affect the following -n test.

I think this patch is ready for sponsorship and testing.

:-Dustin

Dustin Kirkland  (kirkland) wrote :

Updated patch.

The /var/lib/preseed/log problem was fixed with a " | debconf-set-selections -", the "-" being the key to say "take stdin".

I have removed the po/translation bits from the patch with:
 * debdiff --exclude "*.po" --exclude "templates.pot" > ../mdadm.debdiff

Those should be regenerated by the sponsor.

:-Dustin

Colin Watson (cjwatson) wrote :

We just need mdadm, not partman-md.

Changed in partman-md:
assignee: kirkland → nobody
milestone: intrepid-alpha-6 → none
status: In Progress → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mdadm - 2.6.7-3ubuntu5

---------------
mdadm (2.6.7-3ubuntu5) intrepid; urgency=low

  * Fixes for LP: #268580
    - debian/mdadm-udeb.dirs: add lib/partman for the check script
    - debian/mdadm.config: don't initialize BOOT_DEGRADED to false
    - debian/rules: install the check script, put the boot_degraded debconf
      question in the mdadm-udeb
    - debian/mdadm.templates, debian/mdadm-udeb.templates: move the
      boot_degraded question to the udeb
    - debian/po/POTFILES.in: add the new mdadm-udeb.templates
    - debian/install-rc: install the check script, copied from partman-target
    - check.d/_numbers, check.d/root_on_raid: new script to check if / or
      /boot is on an md device and if so, prompt for BOOT_DEGRADED in the
      installer
    - debian/mdadm.config: initialize BOOT_DEGRADED to ""

 -- Dustin Kirkland <email address hidden> Sat, 13 Sep 2008 11:09:09 -0400

Changed in mdadm:
status: In Progress → Fix Released

Just a followup, to verify that this fix to mdadm is working properly
on today's latest Intrepid ISO.

:-Dustin

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments