Return device config filename when polling

Description

Some minor issues must be resolved:

  • The opennms-deviceconfig-sink-consumer must not appear on Minions.

  • The device config backup rest controller must support XML responses.

  • When messages are logged while a sink message is consumed some logs (created when in the DeviceConfigDaoImpl class are written to web.log. They should be in karaf.log like the others that originate from sink message consumption.

  • Not a sink issue, but still relevant: Return the tftp filename with the poller result. It's extension may indicate its file type (e.g. zip or tgz).

 

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Stefan Wachter February 24, 2022 at 8:56 PM

Stefan Wachter February 23, 2022 at 2:58 PM

Directing all log output that is created after DeviceConfigConsumer is called to the same target seems not to be possible:

  • DeviceConfigConsumer.LOG is an instance of org.ops4j.pax.logging.internal.TrackingLogger that outputs into karaf.log.

  • DeviceConfigDaoImpl.LOG is an instance of org.apache.logging.slf4j.Log4jLogger that outputs based in the prefix specified in the MDC.

I tried what happens if the prefix "karaf" is used. In that case the log output of DeviceConfigDaoImpl is output nowhere.

Stefan Wachter February 23, 2022 at 2:29 PM

It seems not to be possible to have features that are available in OpenNMS's Karaf but not in Minion's Karaf. Comparing the repos returned by feature:repo-list in OpenNMS and in Minion showed that there is no suitable repo that is available in OpenNMS only. In particular, mvn:org.opennms.karaf/opennms/<version>/xml/features is also available on Minions.

Stefan Wachter February 22, 2022 at 5:13 PM

Supporting XML responses proved to be difficult. The DeviceConfigRestService would be the first OSGI-wired REST service in OpenNMS. Some basic configuration of the underlying jax-ws features has to be adjusted.

Failed experiments were: add <feature>jax-rs-provider-moxy</feature> or <bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson2Version}</bundle> as a dependency to the opennms-deviceconfig-rest feature.

Fixed

Details

Assignee

Reporter

Labels

Story Points

Sprint

Fix versions

Priority

PagerDuty

Created February 16, 2022 at 4:48 PM
Updated June 7, 2022 at 4:51 PM
Resolved March 2, 2022 at 2:02 PM