SNMPSET on running datastore with NETCONF lock active

Greetings!

I am seeing strange SNMP response and I wanted to run it through you.

I have a ConfD server implemented with NETCONF and SNMP agent.

Initially, established a NETCONF session with the ConfD server and locked the “running” data store.

Then, from the remote Ubuntu machine, which has net-snmp installed, I tried to perform SNMPSET operation against the ConfD server to modify the “running” data store(locked by NETCONF session)

Received the below response.

snmpusm -v 3 -n “” -u raja -a SHA -A rajapass -x AES -X rajapass -l authPriv -Cw 10.0.0.100 create lotus raja
Error in packet.
Reason: resourceUnavailable (This is likely a out-of-memory failure within the agent)
Failed object: SNMP-USER-BASED-SM-MIB::usmUserStatus."…g…1533".“lotus”

Is this the correct “reason” for this scenario? Is this message reported by ConfD server?

seeing “out-of-memory” is bit alarming.

Thanks in Advance!

HI,

See confd_lib_lib.3 man page under “ERRORS”

resourceUnavailable maps to either CONFD_ERRCODE_IN_USE CONFD_ERRCODE_RESOURCE_DENIED

For your use-case, since running was locked by another NETCONF session you likely got an CONFD_ERRCODE_IN_USE that mapped to resourceUnavailable.

Actually I believe the resourceUnavailable is generated “directly” by the SNMP agent in this case, but the logic is the same. And perhaps more to the point, SNMP doesn’t have “error messages”, only codes - the “(This is likely a out-of-memory failure within the agent)” text is a guess by the net-snmp code:

$ strings libnetsnmp.so.30 | grep out-of-mem
resourceUnavailable (This is likely a out-of-memory failure within the agent)

And as is typically the case with such guesses, it is wrong…

Thanks @cohult and @per for the clarification!