Bug 754984 - Missing apcupsd support in halt script
Summary: Missing apcupsd support in halt script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 759573 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-18 13:44 UTC by Robert Scheck
Modified: 2018-11-27 21:11 UTC (History)
13 users (show)

Fixed In Version: initscripts-9.03.28-1.el6
Doc Type: Bug Fix
Doc Text:
Previous version of initscripts did not contain support for apcupsd. This version turns off UPS in powerfail situation.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:09:26 UTC
Target Upstream Version:


Attachments (Terms of Use)
initscripts-9.03.23-apcupsd.patch (684 bytes, patch)
2011-11-18 13:45 UTC, Robert Scheck
no flags Details | Diff
Content of /etc/sysconfig/ups (229 bytes, text/plain)
2011-12-19 17:16 UTC, Robert Scheck
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 66392 None None None Never
Red Hat Product Errata RHBA-2012:0816 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2012-06-19 20:34:23 UTC

Description Robert Scheck 2011-11-18 13:44:29 UTC
Description of problem:
Currently /etc/rc.d/init.d/halt has the necessary section to support "nut" but 
not the bits needed for apcupsd.

Version-Release number of selected component (if applicable):
initscripts-9.03.23-1.el6

How reproducible:
Everytime

Actual results:
Missing apcupsd support in halt script

Expected results:
Give end users of apcupsd full "out of the box" experience by adding a killpower
section to /etc/rc.d/init.d/halt.

Additional info:
Please use the attached patch or better.

Comment 1 Robert Scheck 2011-11-18 13:45:07 UTC
Created attachment 534395 [details]
initscripts-9.03.23-apcupsd.patch

Comment 2 Robert Scheck 2011-11-18 13:54:09 UTC
I have cross-filled case 00564055 and 00564056 (different customers) in the 
customer portal at the Red Hat Network.

Comment 5 Bill Nottingham 2011-11-22 15:56:12 UTC
Given we don't ship/support apcupsd in RHEL, I'd be inclined to leave this sort of support for halt.local. I know nut is there, but that predates the RHEL fork.

Comment 6 Robert Scheck 2011-11-22 16:16:11 UTC
This patch is really micro and does definately not hurt any existing customers
of RHEL. See also comment #2, this issue affects paying customers.

Comment 7 Robert Scheck 2011-11-22 16:23:43 UTC
By the way.../sbin/halt.local is NOT suitable for us in this case, because it
is unfortunately executed too early. Remounting remaining filesystems readonly
has to be performed first, otherwise it will cause some other trouble.

Comment 9 Bill Nottingham 2011-11-23 19:02:19 UTC
So, various suggestions:

- Use nut instead. That support is already integrated, and it *should* work for most of the same models, if I'm reading the support page right.

- Use halt.local. You'd need some sleep commands, which would be racy, but it may be hacked to work. (not really recommended)

- Create a custom /etc/init.d/halt script... we don't upgrade that script much, and they'd have to patch it back in place across upgrades, but it could work as a hot fix.

- The code to support nut in /etc/init.d/halt has:

# Shutdown UPS drivers
if [ "$command" = /sbin/halt -a -f /etc/sysconfig/ups ]; then
        . /etc/sysconfig/ups

There's nothing that states that an administrator's /etc/sysconfig/ups couldn't run apcupsd shutdown comamnds when sourced in this way. (Hooray, hacks!)

Comment 10 Robert Scheck 2011-11-23 22:14:50 UTC
Again, this is RHEL and thus IMHO not the place for such hackish suggestions, 
that are either racy or not upgrade-safe. I'm not going to put such stuff on 
productive machines as long as paid RHEL subscriptions are used. I will push
this further on via the customer portal now...

Comment 14 Michal Hlavinka 2011-12-05 10:42:50 UTC
*** Bug 759573 has been marked as a duplicate of this bug. ***

Comment 17 Robert Scheck 2011-12-19 17:16:23 UTC
Created attachment 548645 [details]
Content of /etc/sysconfig/ups

Hackish suggestion via Red Hat Support Team by abusing /etc/sysconfig/ups

Comment 23 Lukáš Nykrýn 2012-03-22 11:09:49 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previous version of initscripts did not contain support for apcupsd. This version turns off UPS in powerfail situation.

Comment 25 errata-xmlrpc 2012-06-20 13:09:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0816.html


Note You need to log in before you can comment on or make changes to this bug.