Bug 35258 - assort troubles with nut UPS support (qa0404)
assort troubles with nut UPS support (qa0404)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nut (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-08 18:42 EDT by Michal Jaegermann
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-24 09:39:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2001-04-08 18:42:56 EDT
A program 'upsc' from 'nut' package obviously has troubles with
itself.  In /etc/ups/upsd.conf on a machine (lets called it 'thisbox
but names are changed to protect innocents) to which a ups (Best
Power) is attached there are configured ACLs, like documented, for two
"hosts"; namely 'localhost' with IP 127.0.0.1 and 'thisbox' with its
own IP.  "ACCESS" lists are defined for both to give a full access.

An attempt to do 'upsc localhost', as shown in documentation, results
in the following response:

host: localhost
No variables available!  Check your upsd.conf entry for this UPS

Curiously enough a response for 'upsc thisbox' is different:

Unable to get variable list - Access denied

In the first case the relevant fragment of strace looks like this:

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
bind(3, {sin_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
sendto(3, "LISTVARS", 8, 0, {sin_family=AF_INET, sin_port=htons(3305),
sin_addr=inet_addr("127.0.0.1")}}, 16) = 8
select(4, [3], NULL, NULL, {2, 0}) = 1 (in [3], left {2, 0})
recvfrom(3, "VARS\n", 512, 0, {sin_family=AF_INET,
sin_port=htons(3305), sin_addr=inet_addr("127.0.0.1")}}, [16]) = 5
close(3)                          = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40017000
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "host: localhost\n", 16) = 16
write(1, "No variables available!  Check y"..., 65) = 65

In the second one

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3

bind(3, {sin_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
sendto(3, "LISTVARS", 8, 0, {sin_family=AF_INET, sin_port=htons(3305),
sin_addr=inet_addr("XXX.YY.ZZ.WWW")}}, 16) = 8
select(4, [3], NULL, NULL, {2, 0}) = 1 (in [3], left {2, 0})
recvfrom(3, "ERR ACCESS-DENIED\n", 512, 0, {sin_family=AF_INET,
sin_port=htons(3305), sin_addr=inet_addr("XXX.YY.ZZ.WWW")}}, [16]) = 18
close(3)                          = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40017000
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 
write(1, "Unable to get variable list - Ac"..., 44) = 44

Any idea what gives?  As far as I can tell documentation and comments
in configuration files were strictly followed.

Also, even if NOTIFYCMD is defined in /etc/ups/upsmon.conf, and
NOTIFYFLAG for various events are created as well, then nothing seems
to be running a script speficied there.  Moreover starting 'upslog'
one collects only entries like that:

20010408 115146 NA NA NA [NA] NA NA
20010408 115206 NA NA NA [NA] NA NA
20010408 115226 NA NA NA [NA] NA NA
20010408 115246 NA NA NA [NA] NA NA

but an attempt to read directly from a serial port with an UPS attached
results in:

cat < /dev/ttyS0
(121.8 121.8 121.8 030 60.0 27.0 XX.X 00101000

so it does not look that UPS is dead or unresponsive whatever these
numbers may mean.  I do see in log files things of that sort on
a startup:

 bestups: ...
 bestups: .. done
 bestups: Identifying UPS: .
 bestups: ..
 bestups[953]: Startup successful
 ups: bestups startup succeeded
 ups: upsd startup succeeded
 upsd[958]: Startup successful
 upsd[958]: Connection from 127.0.0.1 
 ups: upsmon startup succeeded
 upsmon[963]: Startup successful

so it is not exactly the whole thing is dead but does not seem
to be entirely healthy as well.

  Michal
  michal@harddata.com

p.s. I am afraid that I do not have an access to this ups anymore.  Maybe
at some later date.
Comment 1 Ngo Than 2001-07-11 10:39:54 EDT
it's fixed in 0.45.0-2
Comment 2 Michal Jaegermann 2001-07-11 11:06:08 EDT
Yes, indeed.  Thanks!  Purely by an accident I was yesterday in a proximity
of some machine which is using this :-) and I replaced 'nut' by a version
from rawhide.  It behaves markedly better and, in particular, it started
sending mail about its status like it should.


/etc/rc.d/init.d/halt still does not seem to be aware about a possible UPS
presence (but this is #34312).

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