provisioning node with NodeCategorySettingPolicy policy in foreign source does not work if node has no SNMP available
Description
Environment
Acceptance / Success Criteria
Attachments
Lucidchart Diagrams
Activity
Martin Lärcher May 12, 2011 at 3:53 AM
Hi,
seems to be resolved and works in 1.8.12.
But Bug #NMS-4658 still exist and make Surveillance Categories unusable
Tomás Heredia April 20, 2011 at 8:04 AM
Hi Bill,
I wasn´t able to test it yet.
Anyway, as this is a production system, and no testbench available , will stick to releases. I´ll try 1.8.12 as soon as I found some time for it.
Y saw you solved the "snmp added anyway in #NMS-4615 Will it make in 1.8.12? or 1.8.13?
Cheers!
Bill Ayres April 14, 2011 at 5:51 PM
Tomás,
I found another minor problem when SNMP is provisioned on a node that has no SNMP. I believe I committed the fix to master and the 1.8 branch today. Try the 1.8.12 snapshot tommorow if you can. Of course it would be better to not have SNMP hard-coded as a provisioned service. I'm looking at possible ways to make that an option.
Tomás Heredia April 14, 2011 at 1:17 PM
info added in comment. Still having same problem on 1.8.11
Tomás Heredia April 14, 2011 at 11:27 AM
Sorry for the Cloning.. I'm copying the comments here. Please reopen this if you think its convenient.
Using 1.8.11 on Ubuntu
This is the Foreign source being used:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<foreign-source date-stamp="2011-04-14T11:31:18.776-03:00" name="IFX-sansSNMP" xmlns="http://xmlns.opennms.org/xsd/config/foreign-source">
<scan-interval>1d</scan-interval>
<detectors>
<detector class="org.opennms.netmgt.provision.detector.icmp.IcmpDetector" name="ICMP"/>
<detector class="org.opennms.netmgt.provision.detector.icmp.IcmpDetector" name="StrafePing"/>
</detectors>
<policies>
<policy class="org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy" name="Set Routers">
<parameter value="Routers" key="category"/>
<parameter value="ANY_PARAMETER" key="matchBehavior"/>
</policy>
<policy class="org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy" name="Set Produccion">
<parameter value="Production" key="category"/>
<parameter value="ANY_PARAMETER" key="matchBehavior"/>
</policy>
<policy class="org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy" name="Set IFX">
<parameter value="IFX" key="category"/>
<parameter value="ANY_PARAMETER" key="matchBehavior"/>
</policy>
</policies>
</foreign-source>
When adding a node via the "Add node" link, selecting this foreign source, and adding no other data, the node gets added, SNMP service is added anyway (because of #NMS-3489). StrafePing gets added OK.
Categories don't get added, even after a openms restart.
Excerpt from provisiond debug:
2011-04-14 12:15:27,400 INFO [scanExecutor-5] NodeScan: Aborting Scan of node 95 for the following reason: Aborting node scan : Agent timedout while scanning the system table
2011-04-14 12:15:27,418 DEBUG [scanExecutor-5] DefaultPluginRegistry: Found bean org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy@329a1ba9 with name org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy of type interface org.opennms.netmgt.provision.NodePolicy
2011-04-14 12:15:27,420 DEBUG [scanExecutor-5] DefaultPluginRegistry: Found bean org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy@238e0e33 with name org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy of type interface org.opennms.netmgt.provision.NodePolicy
2011-04-14 12:15:27,422 DEBUG [scanExecutor-5] DefaultPluginRegistry: Found bean org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy@3b422fa8 with name org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy of type interface org.opennms.netmgt.provision.NodePolicy
2011-04-14 12:15:27,432 DEBUG [scanExecutor-5] NodeInfoScan: collectNodeInfo: checking 3 node policies for restoration of categories
2011-04-14 12:15:27,432 DEBUG [scanExecutor-5] NodeCategorySettingPolicy: No Match Found: [OnmsNode@58dab1be id = 95, label = 'TEST-borrar'] for org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy@329a1ba9
2011-04-14 12:15:27,432 DEBUG [scanExecutor-5] NodeCategorySettingPolicy: No Match Found: [OnmsNode@58dab1be id = 95, label = 'TEST-borrar'] for org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy@238e0e33
2011-04-14 12:15:27,432 DEBUG [scanExecutor-5] NodeCategorySettingPolicy: No Match Found: [OnmsNode@58dab1be id = 95, label = 'TEST-borrar'] for org.opennms.netmgt.provision.persist.policies.NodeCategorySettingPolicy@3b422fa8
2011-04-14 12:15:27,433 DEBUG [scanExecutor-4] NodeInfoScan: doPersistNodeInfo: Restoring 0 categories to DB
2011-04-14 12:15:27,444 DEBUG [pool-1-thread-1] NodeScan: Finished scanning node (IFX-sansSNMP/1302793003440)
Thanks!
Details
Assignee
David HustaceDavid HustaceReporter
Martin LärcherMartin LärcherComponents
Fix versions
Affects versions
Priority
Blocker
Details
Details
Assignee
Reporter
Components
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

adding a node via provisioning with no SNMP available does not add node to categories defined in foreign-source.
Walkthrough:
add node in a provisioning group and verify no SNMP access is available
add NodeCategorySettingPolicy in Foreign Source and add a category
synchronize Requisition
-> nodes are not added to categories
Nodes with SNMP available are added to defined categories