Bug 348701
| Summary: | apcupsd control script does not invoke shutdown properly | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Daphne Shaw <dshaw> | ||||||
| Component: | apcupsd | Assignee: | Tomas Smetana <tsmetana> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | 7 | CC: | vchepkov | ||||||
| Target Milestone: | --- | Keywords: | Reopened | ||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | 3.14.2-2.fc8 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2008-02-14 14:16:37 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Daphne Shaw
2007-10-23 12:31:21 UTC
Created attachment 235031 [details]
A patch for apccontrol to fix Fedora shutdown
When there is a power outage and apcupsd decides to shutdown the machine, what is the reason not to power it off? The machine can automatically power on again when the outage is over or whatever an user sets it up. I don't understand what is the benefit of halting the machine when there is no power. Maybe you can explain the reason. The problem is that there are some systems that try and restore the last known power state after a power failure, so if the machine was powered on, it comes back on, and if the machine was powered off, it stays off. For a UPS to be be meaningful, the machine must come back on again when the power is restored. The patch forces the machine to be in halt state (but still powered on) when the UPS cuts the power, so when the system returns to the last known power state, that state is "on". This makes sense. Thanks. Your patch will be present in the next release. apcupsd-3.14.2-2.fc8 has been submitted as an update for Fedora 8 apcupsd-3.14.2-2.fc7 has been submitted as an update for Fedora 7 apcupsd-3.14.2-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update apcupsd'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F7/FEDORA-2008-1233 apcupsd-3.14.2-2.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report. apcupsd-3.14.2-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. Created attachment 294910 [details]
/sbin/halt.local
There is another scenario that is not handled properly. In case power returns after system halted but before UPS ran out of battery system will be never restarted. UPS should be powered off during shutdown. /etc/init.d/halt does that for nut package but not for apcupsd. I attached my /sbin/halt.local to fix the issue, maybe somebody can insert it into a main tree Thank you Vadym. Maybe it would be better to try to shutdown the UPS from the halt init script (not the halt.local) as we do with nut -- we'd avoid the remounting of /usr for instance and we won't have to workaround already existing halt.local, etc. Reopening. I believe Vadym's issue is already open as bug 346271. (In reply to comment #13) > I believe Vadym's issue is already open as bug 346271. There's no fun in being a package maintainer when users do all the work for me... I've added myself to cc: of the bug you filled and I'm closing this one again. Thank you. To be clearer, UPS shutdown situation using apcupsd needs three bugs to be fixed before it works: bug 348701 (this one, now fixed), bug 346271 (an issue with the halt initscript, as noted by Yaydm), and finally bug 346261 (another halt initscript issue, where the script powers off rather than halting. |