apcupsd unable to do killpower with snmp driver

Bug #1658780 reported by legioner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apcupsd (Ubuntu)
New
Undecided
Unassigned

Bug Description

# 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.

Tags: patch
Revision history for this message
legioner (legioner) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "oids.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.