Public bug reported:

# lsb_release -rd
Description:    Ubuntu 16.10
Release:        16.10

# apt-cache policy apcupsd
apcupsd:
  Installed: 3.14.14-0.2
  Candidate: 3.14.14-0.2
  Version table:
 *** 3.14.14-0.2 500
        500 http://ru.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages
        100 /var/lib/dpkg/status

Symptoms: apcupsd --killpower unable to do killpower with SNMP driver

Issue was observed on:
  UPS: Smart-UPS 2200
  SNMP module:
    MN:AP9619 HR:A10 MD:11/02/2005
    AOS: 3.7.3 (02/02/2010), StatApp(name: sumx): 3.7.2 (02/02/2010)

tcpdump after "apcupsd --killpower" exec:
<...lines with getting UPS state...>
IP 192.168.1.38.57389 > 192.168.1.5.161:  C=xxx SetRequest(33)  
.1.3.6.1.4.1.318.1.1.1.6.1.1=2
IP 192.168.1.5.161 > 192.168.1.38.57389:  C=xxx GetResponse(33)  noSuchName@1 
.1.3.6.1.4.1.318.1.1.1.6.1.1=2

Main cause - upsBasicControlConserveBattery is incorrect.
Correct OID for upsBasicControlConserveBattery is 
.1.3.6.1.4.1.318.1.1.1.6.1.1.0 (additional ".0" at the end)

I have tested this OID manually with snmpset - it's working correct. 
Here tcpdump of this tests with comments:
IP 192.168.1.38.59474 > 192.168.1.5.161:  C=xxx SetRequest(35)  
.1.3.6.1.4.1.318.1.1.1.6.1.1.0=2
IP 192.168.1.5.161 > 192.168.1.38.59474:  C=xxx GetResponse(35)  genErr@1 
.1.3.6.1.4.1.318.1.1.1.6.1.1.0=2  // it's ok. UPS not on battery power.
IP 192.168.1.5.49315 > 192.168.1.38.162:  Trap(108)  .1.3.6.1.4.1.318 
192.168.1.5 enterpriseSpecific s=5 26777240 .1.3.6.1.4.1.318.2.3.3.0="UPS: On 
battery power in response to an input power problem."
IP 192.168.1.38.35216 > 192.168.1.5.161:  C=xxx SetRequest(35)  
.1.3.6.1.4.1.318.1.1.1.6.1.1.0=2
IP 192.168.1.5.161 > 192.168.1.38.35216:  C=xxx GetResponse(35)  
.1.3.6.1.4.1.318.1.1.1.6.1.1.0=2 // UPS correctly going to sleep

Same problem with upsAdvControlUpsOff - correct OID
.1.3.6.1.4.1.318.1.1.1.6.2.1.0 (additional ".0" at the end).

In attach - patch with trying to fixing this problem in simplest way.

** Affects: apcupsd (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "oids.patch"
   https://bugs.launchpad.net/bugs/1658780/+attachment/4808234/+files/oids.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1658780

Title:
  apcupsd unable to do killpower with snmp driver

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apcupsd/+bug/1658780/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to