unable to add node/interface meta-data through requisition ui

Description

meta-data is added anymore in new version 27.0.4. In v27.0.3 there was only a issue with db only sync but now the function is completely broken.

No matter which sync option in requisition ui used - meta-data for node or interface is no longer added.

Meta-data for service is added.
Currently one solution for node meta-data is a requisition policy (see example 2).

Installed a new fresh OpenNMS and add a node in a requisition:

Example:

Add meta-data directly in requisition does not work (neither for interface) - but it works for service

<model-import xmlns="http://xmlns.opennms.org/xsd/config/model-import" date-stamp="2021-02-03T09:31:58.570+01:00" foreign-source="meta-test" last-import="2021-02-03T09:40:38.398+01:00"> <node foreign-id="1612340597434" node-label="localhost"> <interface ip-addr="127.0.0.1" status="1" snmp-primary="P"> <monitored-service service-name="ICMP"> <meta-data context="requisition" key="servicetestkey" value="servicetestvalue"/> </monitored-service> <meta-data context="requisition" key="iftestkey" value="iftestvalue"/> </interface> <meta-data context="requisition" key="testkey" value="testvalue"/> </node> </model-import>

Synced Requisition.

Values in database - only meta-data in ifservices_metadata is added:

opennms=# select nodeid,nodelabel,foreignsource from node; nodeid | nodelabel | foreignsource --------+-----------+--------------- 1 | localhost | meta-test (1 row) opennms=# select * from node_metadata; id | context | key | value ----+---------+-----+------- (0 rows) opennms=# select * from ifservices_metadata; id | context | key | value ----+-------------+----------------+------------------ 5 | requisition | servicetestkey | servicetestvalue (1 row) opennms=# select * from ipinterface_metadata; id | context | key | value ----+---------+-----+------- (0 rows)

Example 2

Using a requisition policy to add node meta-data works as expected:

<policy name="Meta-data-policy" class="org.opennms.netmgt.provision.persist.policies.NodeMetadataSettingPolicy"> <parameter key="metadataValue" value="Meta-data-policy-Value"/> <parameter key="metadataKey" value="Meta-data-policy-Key"/> <parameter key="sysObjectId" value=".1.3.6.1.4.1.8072.3.2.10"/> <parameter key="matchBehavior" value="ALL_PARAMETERS"/> </policy>
opennms=# select * from node_metadata; id | context | key | value ----+-------------+----------------------+------------------------ 1 | requisition | Meta-data-policy-Key | Meta-data-policy-Value (1 row)

 

Acceptance / Success Criteria

None

Attachments

1
  • 04 Feb 2021, 12:30 PM

Lucidchart Diagrams

Activity

Show:

Christian Pape February 9, 2021 at 3:55 PM

Merged.

Christian Pape February 8, 2021 at 11:05 AM
Edited

Ronny Trommer February 4, 2021 at 6:43 PM

That helps a lot, I’ll test it tomorrow morning and provide feedback.

Martin Lärcher February 4, 2021 at 3:22 PM

- can you reproduce the problem now with the new steps i mentioned?

Martin Lärcher February 4, 2021 at 3:10 PM

Tested again and got new knowledge

  • please add a node and sync with option Yes

  • edit the node in requisition and add meta-data at node level

  • sync with option Yes

  • no meta-data is added

For completely new nodes and meta-data it works but not for nodes with meta-data added after initial sync...

Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created February 3, 2021 at 8:53 AM
Updated October 28, 2021 at 8:45 PM
Resolved February 9, 2021 at 3:55 PM

Flag notifications