Bug 789191

Summary: apcupsd alerts on every boot: Communications with UPS lost
Product: [Fedora] Fedora Reporter: Larkin Lowrey <llowrey>
Component: apcupsdAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: apcupsd-3.14.10-3.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-08 21:23:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Larkin Lowrey 2012-02-10 03:21:22 UTC
Description of problem:
The apcupsd daemon sends an email alert "Communications with UPS lost" on every boot followed almost immediately by "Communications with UPS restored". The machine in question is connecting to a remote instance of apcupsd running on another machine. It appears that this problem occurs because the network interface is not up when apcupsd is started. There is no actual problem with the remote UPS or remote apcupsd.

Version-Release number of selected component (if applicable):


How reproducible:

Every boot.

Steps to Reproduce:
1. boot
2.
3.
  
Actual results:
Email alert "Communications with UPS lost" followed almost immediately by "Communications with UPS restored".

Expected results:
No alert unless remote apcupsd server is actually down.

Additional info:

The apcupsd daemon should not be started until network services are up and it's actually possible for it to connect to the remote apcupsd.

This scenario did not occur prior to updating from F15 to F16.

Comment 1 Michal Hlavinka 2012-02-10 15:29:29 UTC
please try if following helps:
edit /lib/systemd/system/apcupsd.service
and in [Unit] section, add (there will be two "After=" lines, that's ok) following line:

After=network.target

then reboot. Does it help?

Comment 2 Larkin Lowrey 2012-02-10 18:29:17 UTC
That worked perfectly. I tried several reboots and cold boots and never saw any spurious alert emails. Thank you!

Comment 3 Fedora Update System 2012-02-14 10:58:24 UTC
apcupsd-3.14.10-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/apcupsd-3.14.10-3.fc16

Comment 4 Fedora Update System 2012-02-15 11:34:38 UTC
Package apcupsd-3.14.10-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing apcupsd-3.14.10-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1688/apcupsd-3.14.10-3.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-03-08 21:23:26 UTC
apcupsd-3.14.10-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.