|
Bugzilla – Full Text Bug Listing |
| Summary: | Apcupsd & shutdown sequence on Power-Failure | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Jorge Fábregas <jfabregas> |
| Component: | ConsoleApps | Assignee: | Stanislav Brabec <sbrabec> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | ||
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Customer | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | Awk script | ||
|
Description
Jorge Fábregas
2005-11-05 21:08:46 UTC
Created attachment 56554 [details]
Awk script
I don't know, whether it is still actual, but late in the halt script, USB may be unavailable. And the idea was: Do halt as fast as possible. Some daemons can terminate too slowly, and power can fail in midtime. See bug 81281 for discusssion. In future, it would be nice to have option: Standard halt / Quick halt / Suspend to disk. > I don't know, whether it is still actual, but late in the halt script, > USB may be unavailable. Well, this is easy to verify. I'm not in front of my system but a couple of weeks ago I had a power failure and USB did work (invoked one or two lines before halt -p). > And the idea was: Do halt as fast as possible. Some daemons can terminate too > slowly, and power can fail in midtime The apcupsd documentation on www.apcupsd.com suggests that "/etc/apcupsd/apccontrol killpower" should be called as late as possible. We can have two scenarios : On power failure: 1- A daemon is taking too much time to terminate (and we haven't run "/etc/apcupsd/apccontrol killpower") thus taking the risk that the system will abruptly shut down. or 2- We call "/etc/apcupsd/apccontrol killpower" early in the halt script...and after this execution...we resume doing other stuff that it's on halt...and then we take a lot of time here...(and the UPS already received signal to shut itself down)....thus we're taking the risk that the UPS will shut itself down (before reaching halt -p). I think the latter is more likely to happen. Also, we can control the TIMELEFT parameter on apcupsd.conf...and it's by default 5 minutes I think (which I honestly think is reasonable)..but if someone knows that it has a daemon that takes a while to termiante...the user could adjust the TIMELEFT parameter. Also, the build process of apcupsd (when you compile from source) will insert the appropiate just before "halt -p". They're doing it this way for a particular reason. I will try to contact the project leader to ask for his opinion. > See bug 81281 for discusssion I can't see the bug. It says I'm not authorized :( Jorge Yes, calling killpower as late as possible is a good idea. It ensures, that UPS will never shut down during execution of power-off scripts if it still has any energy. I guess that we can provide three possible scenarios in sysconfig: 1) Fast not fully correct shutdown (current behavior, default). It will prevent timeouts while umounting NFS volumes etc. 2) Full shutdown (clean, risk of time-outs). 3) Suspend to disk (nice, if hardware supports it). This ugly script was improved and moved to documentation for use in special situations. Since SuSE Linux 10.1 /etc/init.d/halt implements HALT_POWERDOWN_INSERT and apcupsd uses it. |