Details
Description
Overview Description:
When you insert a node through the webui, a new entry is added in the node,
ipinterface and snmpinterface
tables, and the setsnmpinterfacekeysoninserttrigger in the ipinterface table is
triggered to insert the correct snmpinterfaceid
in the ipinterface.snmpinterfaceid field. If you Delete the node, the node
itself, the ipinterface and the snmpinterface
entry related to this node are marked as 'D' (Deleted). Now, if you add again
the same node, you get a new entry related
to this node in the node, ipinterface, snmpinterface tables, and the old entry
in node, ipinterface and snmpinterface
is still there even if marked as 'D'.
The problem is that the new entry in ipinterface.snmpinterfaceid remains empty
and it is not updated by the
setsnmpinterfacekeysoninserttrigger (I'm not sure if this problem is also
present for setsnmpinterfacekeysonupdatetrigger).
Steps to Reproduce:
be sure that the Vacuumd is not going to run in the time you do the
following steps, otherwise it will
remove the node marked as 'D' and to reproduce the bug you must have both
the nodes (the one marked as 'D' and
the new added node) in the database.
1) add a node with SNMP support using the webui Admin-->Add Interface.
2) wait that the node is discovered and correcly added with SNMP service on.
3) verify that the ipinterface.snmpinterfaceid in postgres is correctly updated
by the trigger.
4) now delete the node using the webui Admin-->Delete Nodes.
5) add again the same node using the webui Admin-->Add Interface.
6) wait that the node is added correctly in node, ipinterface and snmpinterface.
7) now you have old entries (marked as 'D') and new entries, but the new entry
in ipinterface.snmpinterfaceid is not
updated by the setsnmpinterfacekeysoninserttrigger and is left empty.
Actual Results:
The ipinterface.snmpinterfaceid is empty so the entry is not correct.
Expected Results:
The setsnmpinterfacekeysoninserttrigger should update the
ipinterface.snmpinterfaceid of the new added node.
Build Date & Platform:
Opennms1.3.2_RELEASE, postgresql 8.1.5, Debian etch kernel 2.6.18-3-686
When you insert a node through the webui, a new entry is added in the node,
ipinterface and snmpinterface
tables, and the setsnmpinterfacekeysoninserttrigger in the ipinterface table is
triggered to insert the correct snmpinterfaceid
in the ipinterface.snmpinterfaceid field. If you Delete the node, the node
itself, the ipinterface and the snmpinterface
entry related to this node are marked as 'D' (Deleted). Now, if you add again
the same node, you get a new entry related
to this node in the node, ipinterface, snmpinterface tables, and the old entry
in node, ipinterface and snmpinterface
is still there even if marked as 'D'.
The problem is that the new entry in ipinterface.snmpinterfaceid remains empty
and it is not updated by the
setsnmpinterfacekeysoninserttrigger (I'm not sure if this problem is also
present for setsnmpinterfacekeysonupdatetrigger).
Steps to Reproduce:
be sure that the Vacuumd is not going to run in the time you do the
following steps, otherwise it will
remove the node marked as 'D' and to reproduce the bug you must have both
the nodes (the one marked as 'D' and
the new added node) in the database.
1) add a node with SNMP support using the webui Admin-->Add Interface.
2) wait that the node is discovered and correcly added with SNMP service on.
3) verify that the ipinterface.snmpinterfaceid in postgres is correctly updated
by the trigger.
4) now delete the node using the webui Admin-->Delete Nodes.
5) add again the same node using the webui Admin-->Add Interface.
6) wait that the node is added correctly in node, ipinterface and snmpinterface.
7) now you have old entries (marked as 'D') and new entries, but the new entry
in ipinterface.snmpinterfaceid is not
updated by the setsnmpinterfacekeysoninserttrigger and is left empty.
Actual Results:
The ipinterface.snmpinterfaceid is empty so the entry is not correct.
Expected Results:
The setsnmpinterfacekeysoninserttrigger should update the
ipinterface.snmpinterfaceid of the new added node.
Build Date & Platform:
Opennms1.3.2_RELEASE, postgresql 8.1.5, Debian etch kernel 2.6.18-3-686
Issue Links
- depends on
-
NMS-3863
provisiond has issues with two IPs on the same ifIndex - I think
-
looks like something that would be easy to write a unit test for