Bug#580825: mdadm: Exit code 1 when running checkarray

martin f krafft madduck at debian.org
Mon May 10 07:05:52 UTC 2010


also sprach GSR <gsr.bugs at infernal-iceberg.com> [2010.05.09.0601 +0200]:
> I got the same email. But I think I understand why it does that and
> have a fix so it stops causing false alarms. It happens because the
> cron command tries to run once per month, but only the first sunday
> should checks be performed. So the second test in pipeline fails
> around 3 weeks per month, ending the pipe with error, when in reality
> that error is not a problem. Plausible fix:
> 
> [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -gt 7 ] || /usr/share/mdadm/checkarray --cron --all --quiet
> 
> This checks for command availability (as before) and then checks if
> day is not in 1-7 (le becomes gt), so for 8 and after it will stop
> there with exit code 0 (cron is happy). If that fails (&& becomes ||)
> it executes the check and cron gets whatever error code the vital
> command returns.

This is a good fix, but I just wonder why this suddenly happens.
The cronjob has been in place for years, and I have never seen such
an e-mail.

-- 
 .''`.   martin f. krafft <madduck at d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20100510/ba6a2f3c/attachment-0001.pgp>


More information about the pkg-mdadm-devel mailing list