Exceptions thrown by one provisioning adapter block further adapters from invocation

Description

With opennms-rancid-provisioning-adapter.jar still in /lib (happens when installed from source, not so much from packages) but not configured, exceptions thrown by this adapter block the SNMP asset provisioning adapter from doing its job. The following sequence of messages appears in provisiond.log; notice that the SNMP adapter never gets called:

2012-02-08 15:19:43,970 INFO [ProvisioningAdapterManager:EventListener] EventIpcManagerDefaultImpl: run: calling onEvent on ProvisioningAdapterManager:EventListener for event uei.opennms.org/internal/provisiond/nodeScanCompleted dbid 72 with time Wednesday, February 8, 2012 2:19:43 PM GMT
2012-02-08 15:19:43,973 INFO [ProvisioningAdapterManager:EventListener] ProvisioningAdapterManager: handleScanCompletedEvent: Calling adapter:MAP Provisioning Adapter for node: 1
2012-02-08 15:19:43,974 INFO [ProvisioningAdapterManager:EventListener] ProvisioningAdapterManager: handleScanCompletedEvent: Calling adapter:RancidProvisioningAdapter for node: 1
2012-02-08 15:19:43,974 INFO [ProvisioningAdapterManager:EventListener] ProvisioningAdapterManager: handleScanCompletedEvent: Calling adapter:SnmpAssetProvisioningAdapter for node: 1
2012-02-08 15:19:43,974 INFO [ProvisioningAdapterManager:EventListener] SnmpAssetProvisioningAdapter: createScheduleForNode: Scheduling Update for nodeid 1 with schedule: AdapterOperationSchedule; Initial delay: 300, Interval: 60, Attempts: 3, Units: SECONDS
2012-02-08 15:24:43,976 INFO [pool-3-thread-1] MapProvisioningAdapter: processPendingOperationsForNode: acquiring lock...
2012-02-08 15:24:43,978 INFO [pool-3-thread-1] MapProvisioningAdapter: processPendingOperationsForNode: lock released.
2012-02-08 15:24:44,000 WARN [pool-4-thread-1] SimpleQueuedProvisioningAdapter: Exception thrown during adapter queuing, rescheduling: Rancid provisioning failed:
org.opennms.netmgt.provision.ProvisioningAdapterException: Rancid provisioning failed:
at org.opennms.netmgt.provision.RancidProvisioningAdapter.sendAndThrow(RancidProvisioningAdapter.java:446)
at org.opennms.netmgt.provision.RancidProvisioningAdapter.doUpdate(RancidProvisioningAdapter.java:341)
at org.opennms.netmgt.provision.RancidProvisioningAdapter$5.doInTransaction(RancidProvisioningAdapter.java:676)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.opennms.netmgt.provision.RancidProvisioningAdapter.processPendingOperationForNode(RancidProvisioningAdapter.java:674)
at org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter$AdapterOperation.run(SimpleQueuedProvisioningAdapter.java:408)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.opennms.rancid.RancidApiException: Error: RWS GET failed for URL: http://localhost/rws/rancid/groups/test/flyingfox Status: Communication Error (1001) - Connection refused
at org.opennms.rancid.RWSClientApi.handleException(RWSClientApi.java:921)
at org.opennms.rancid.RWSClientApi.getMethodRWS(RWSClientApi.java:817)
at org.opennms.rancid.RWSClientApi.getRWSRancidNodeTLO(RWSClientApi.java:240)
at org.opennms.netmgt.provision.RancidProvisioningAdapter.doUpdate(RancidProvisioningAdapter.java:296)
... 12 more
2012-02-08 15:26:44,793 INFO [Main] DefaultProvisiondConfigurationDao: Loaded Provisiond Configuration in 15ms

Environment

1.10.0 system installed from source, Fedora 15 x86_64 OpenJDK Runtime Environment (IcedTea6 1.10.5) (fedora-62.1.10.5.fc15-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger April 3, 2012 at 1:31 PM

This exception isn't blocking execution of the SnmpAssetProvisioningAdapter, that adapter queues operations with an initial delay so you wouldn't see the asset update immediately.

Ben mentioned that the error handling in the provisioning adapters has been improved in the latest 1.10 code for 1.10.1 so feedback about problems like this should be better in any case. Marking as fixed.

Jeff Gehlbach March 13, 2012 at 3:55 PM

Agreed

Benjamin Reed March 13, 2012 at 3:52 PM

considering how many people install adapters without knowing what they do, thinking this should be a blocker

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created February 8, 2012 at 9:33 AM
Updated January 27, 2017 at 4:21 PM
Resolved April 3, 2012 at 1:31 PM