Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87265 - apcupsd /etc/init.d/halt unsafe for software RAID
Summary: apcupsd /etc/init.d/halt unsafe for software RAID
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-30 06:02 UTC by Neil Darlow
Modified: 2005-05-04 19:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Darlow 2005-03-30 06:02:09 UTC
The /etc/init.d/halt script installed by apcupsd performs a two minute wait and exit 1 after issuing the killpower command to the UPS.

This essentially means the final halt command isn't executed under powerfail conditions and software RAID superblocks won't be updated.

As a member of the apcupsd development team, I've had to report this bug on every distribution I've used. The apcupsd project no longer advocates the wait and exit 1 under powerfail conditions because of the problems it causes.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Frank 2005-04-23 06:45:53 UTC
So what are you recommending /etc/init.d/halt does instead ?
Comment 2 Neil Darlow 2005-04-23 07:06:21 UTC
/etc/init.d/halt should do the following:

1) Issue apcupsd --killpower
2) Terminate as it normally would

The RAID superblocks will be updated and the system will do whatever it should for a halt condition i.e. display "Power down" or power itself off.

The UPS will power itself off after its configured KILLDELAY setting expires.

The apcupsd documentation (which has been recently revised) discusses powerdown situations and configuration for powerdown in detail.

Regards,
Neil Darlow
Comment 3 Neil Darlow 2005-04-29 12:39:13 UTC
During the conversion of my system to UTF-8, I upgraded baselayout from 1.9.4 to 1.11.11 and noticed that /etc/init.d/halt.sh in the newer version does exactly what I described for apcupsd during halt.

In fact, I can't see that /etc/init.d/halt is actually executed as part of the halt process (correct me if I'm wrong).

Regards,
Neil Darlow
Comment 4 SpanKY gentoo-dev 2005-04-29 14:10:43 UTC
i dont have an /etc/init.d/halt on my system ... or any of my systems ...

they're all /etc/init.d/halt.sh
Comment 5 SpanKY gentoo-dev 2005-04-29 14:12:10 UTC
actually i lied, i managed to find 1 system which had it ... it isnt part of baselayout and is never executed by baselayout

so if halt.sh (which is part of baselayout) does the right thing, can we punt this bug ?
Comment 6 Neil Darlow 2005-04-29 14:40:29 UTC
Looks like /etc/init.d/halt is installed by apcupsd (and should be removed).

Somewhere after baselayout-1.9.4, support for apcupsd was added to /etc/init.d/halt.sh so systems running that version won't turn the UPS off.

Either some backporting, or some effort made to get the appropriate newer version of baselayout marked stable, is required.

Regards,
Neil Darlow
Comment 7 SpanKY gentoo-dev 2005-04-29 16:19:39 UTC
does apcupsd still install /etc/init.d/halt ?  if so, we should fix the package
Comment 8 SpanKY gentoo-dev 2005-05-04 19:31:28 UTC
apcupsd no longer installs /etc/init.d/halt