Just to follow up on this, but I updated the patch against the current master 
branch.

-----Original Message-----
From: Ron Roskens [mailto:rosk...@users.sourceforge.net] 
Sent: Saturday, August 11, 2012 7:01 PM
To: opennms-devel@lists.sourceforge.net
Subject: [opennms-devel] NMS-3872: poll-outages with duplicate names give 
unexpected results

http://issues.opennms.org/browse/NMS-3872

I had opened this bug up back in the summer of 2010, but never got any 
developer responses to the issue. To recap what I saw:

OpenNMS lets you create duplicate outages with the same name as two distinct 
outages, but if/when you try to edit the second one, you will always edit the 
first one found in poll-outages.xml.

The patch I developed and supplied in NMS-3872 added an outage-id attribute to 
the poll-outage and changes the references to the outage to use the outage-id 
attribute instead of the name. From the patch, to show how things change in 
poller-configuration.xml, and collectd-configuration.xml and 
notifd-configuration.xml:

diff --git
a/features/remote-poller-gwt/src/test/resources/poller-configuration.xml
b/features/remote-poller-gwt/src/test/resour
ces/poller-configuration.xml
index 35d0645..a97bb00 100644
--- a/features/remote-poller-gwt/src/test/resources/poller-configuration.xml
+++ b/features/remote-poller-gwt/src/test/resources/poller-configuration
+++ .xml
@@ -19,7 +19,7 @@
                         <parameter key="rrd-repository" 
value="target/test-data"/>
                         <parameter key="ds-name" value="http"/>
                 </service>
-               <outage-calendar>zzz from poll-outages.xml 
zzz</outage-calendar>
+               <outage-id>1</outage-id>

                 <downtime interval="30000" begin="0" 
end="300000"/>             <!-- 30s, 0, 5m -->
                 <downtime interval="300000" begin="300000" 
end="43200000"/>     <!-- 5m, 5m, 12h -->

For the actual outage:

diff --git
a/opennms-base-assembly/src/main/filtered/etc/examples/poll-outages.xml
b/opennms-base-assembly/src/main/filtered/etc/examples/poll-outages.xml
index 8702b37..2d2d729 100644
--- a/opennms-base-assembly/src/main/filtered/etc/examples/poll-outages.xml
+++ b/opennms-base-assembly/src/main/filtered/etc/examples/poll-outages.
+++ xml
@@ -1,6 +1,6 @@
  <?xml version="1.0"?>
  <outages>
-       <outage name="global" type="weekly">
+       <outage outage-id="1" name="global" type="weekly">
                 <time day="sunday" begins="12:30:00" ends="12:45:00"/>
                 <time day="sunday" begins="13:30:00" ends="14:45:00"/>
                 <time day="monday" begins="13:30:00" ends="14:45:00"/>


One thing not coded up in this patch is something for updating an existing 
configuration to add the new attribute & update the references in the other xml 
files.

Should I update this for 1.11?

Ron

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat 
landscape has changed and how IT managers can respond. Discussions will include 
endpoint security, mobile security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to