Provisioning a node with RANCID enabled caused error if rancid group does not exist
Description
Environment
Acceptance / Success Criteria
Lucidchart Diagrams
Activity
Steve MacDougall June 12, 2019 at 4:16 PM
Seems to still be an issue in version 24 as well, even though I've added only certain nodes within the include range in rancid-configuration.xml as follows:
<package name="example1">
<filter>IPADDR != '0.0.0.0'</filter>
<include-range begin="10.10.27.1" end="10.10.27.16" />
</package>
It seems it should only try to use the rancid provisioner for the included range, but I get the
'A provisioning adapter failed for host with the following condition: Rancid provisioning failed: Error: RWS PUT failed for URL: http://compost.bluepay.ca/rws/rancid/groups/Netapp OnCommand Servers/bpcdr-01 Status: Internal Server Error (500) - Unhandled Exception.'
Error for any new host I add.
Alejandro Galue May 15, 2015 at 2:54 PM
I can certify that the problem exist (even on latest version of OpenNMS as the code has not been modified in a long time), so I'm going to recapitulate everything on the following short description:
Let's say you are monitoring 5000 nodes with OpenNMS, and you want to use the Rancid Provisioning Adapter for only your Cisco Routers, and nothing else (even if "nothing else" means that you have other Cisco Devices). Also let's say you have 100 Cisco Routers.
After properly configure Rancid, and define the Cisco routers on the proper requisition, you can see that the adapter works.
The expected results is that the adapter takes care only about Cisco Routers, because that is what we have on the Rancid server. Instead, you'll see 4900 unwanted events saying something like Tarus mentioned, I mean:
::Rancid provisioning failed: Error: RWS PUT failed for URL:http://barbrady/rws/rancid/groups/Customers/watchtower.sandiego.edu Status: Not Found (404) - Resource Not Found
I know that this is just an informational events, which is not going to prevent any other component of OpenNMS to work properly, but it is in fact very annoying, spatially considering the severity of the event.
I propose 3 solutions here:
1) Be able to use FilterDao inside the adapter's implementation to decide on which nodes, the adapter should run (instead of all of them which is the default). The idea is to define packages like Collectd or Pollerd to control the scope of nodes considerd for Rancid.
2) Declare which requisitions are going to be used for Rancid, and even better, specify the name of the group in Rancid, that way there is no need to match the requisition's name with the Rancid Group. This is another kind of filtering.
3) Combine (1) and (2)
Mike Diehn February 23, 2015 at 5:31 PM
Seems to be present in 15.0.1
Martin Lärcher December 16, 2013 at 2:11 PM
The same behaviour still exists on 1.12.+
Any chance to get a solution?
It is very annoying to configure several hundred devices manually to backup their config - only to avoid errors in eventlog.
Alexander Hoogerhuis December 11, 2011 at 2:59 AM
I'm seeing the same with 1.9.93 + git uptodate as of today, it's trying to provision lots of different nodes that seems to not match any of the given OIDs.
Details
Assignee
UnassignedUnassignedReporter
Martin LärcherMartin LärcherHB Grooming Date
Oct 27, 2021Components
Priority
Trivial
Details
Details
Assignee
Reporter
HB Grooming Date
Components
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

If provisioning a node via "Manage Provisioning Groups" in Admin area a RANCID provisioning is always executed and a error occurs if rancid-group does not exists (uei.opennms.org/provisioner/provisioningAdapterFailed ::Rancid provisioning failed: Error: RWS PUT failed for URL:http://xxxx Status: Not Found (404) - Resource Not Found).
A RANCID provisioning should be only executed if rancid-group exist and nodesysoid is specified in rancid-configuration.xml.
Settings in opennms.properties:
opennms.rancidIntegrationEnabled = true
opennms.rancidIntegrationUseOnlyRancidAdaper = false