Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4617 - in trunk/rnp_java-cl-mp: conf conf/scripts doc/schema packaging/deb packaging/rpm src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils src/main/java/perfSONARWebAdmin/admin/wizard/services

Subject: perfsonar development work

List archive

perfsonar: r4617 - in trunk/rnp_java-cl-mp: conf conf/scripts doc/schema packaging/deb packaging/rpm src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils src/main/java/perfSONARWebAdmin/admin/wizard/services


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4617 - in trunk/rnp_java-cl-mp: conf conf/scripts doc/schema packaging/deb packaging/rpm src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils src/main/java/perfSONARWebAdmin/admin/wizard/services
  • Date: Tue, 14 Oct 2008 11:04:22 -0400

Author: fernandes
Date: 2008-10-14 11:04:22 -0400 (Tue, 14 Oct 2008)
New Revision: 4617

Added:
trunk/rnp_java-cl-mp/conf/ls-registration.xml
trunk/rnp_java-cl-mp/conf/scripts/init.sh
Modified:
trunk/rnp_java-cl-mp/conf/eventType-map.xml
trunk/rnp_java-cl-mp/conf/scripts/daemonbwctl.sh
trunk/rnp_java-cl-mp/conf/scripts/daemonntp.sh
trunk/rnp_java-cl-mp/conf/scripts/daemonowamp.sh
trunk/rnp_java-cl-mp/conf/service.properties
trunk/rnp_java-cl-mp/conf/wizard.properties
trunk/rnp_java-cl-mp/doc/schema/owampSummaryResponse.rnc
trunk/rnp_java-cl-mp/packaging/deb/changelog
trunk/rnp_java-cl-mp/packaging/deb/conffiles
trunk/rnp_java-cl-mp/packaging/deb/control
trunk/rnp_java-cl-mp/packaging/deb/dirs
trunk/rnp_java-cl-mp/packaging/deb/install
trunk/rnp_java-cl-mp/packaging/deb/postinst
trunk/rnp_java-cl-mp/packaging/rpm/perfsonar-clmp.specs

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineSelfTest.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Cron.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/OwampSummary.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Constants.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Entries.java

trunk/rnp_java-cl-mp/src/main/java/perfSONARWebAdmin/admin/wizard/services/CLMPHandler.java
Log:
* New: LS Registration now uses a registration file with extra information
to register. This file is populated by a script run during initialization.
Script can be customized.
* Change: new service path /usr/lib/perfsonar/services/perfsonar-clmp/
* Change: Some classes were changed for internal self-testing
(componentsInitialization).
* Change: Authentication eventType configuration can now depend on a parent
eventType (case of OwampSummary and Owamp)
* Bug fix: Fixed cron database removal bug (wrong entry being deleted
sometimes).
* Bug fix: Fixed cron's 'dow' parameter bug (Java considers Sunday 1
through Saturday 7, instead of 0 to 6).

Modified: trunk/rnp_java-cl-mp/conf/eventType-map.xml
===================================================================
--- trunk/rnp_java-cl-mp/conf/eventType-map.xml 2008-10-14 13:00:57 UTC (rev
4616)
+++ trunk/rnp_java-cl-mp/conf/eventType-map.xml 2008-10-14 15:04:22 UTC (rev
4617)
@@ -23,7 +23,7 @@
<eventType>
<name>http://ggf.org/ns/nmwg/tools/owamp/summary/2.0</name>

<class>org.perfsonar.service.measurementPoint.commandLine.tools.OwampSummary</class>
- <authentication>no</authentication>
+
<authentication>http://ggf.org/ns/nmwg/tools/owamp/2.0</authentication>
</eventType>

<eventType>

Added: trunk/rnp_java-cl-mp/conf/ls-registration.xml

Modified: trunk/rnp_java-cl-mp/conf/scripts/daemonbwctl.sh
===================================================================
--- trunk/rnp_java-cl-mp/conf/scripts/daemonbwctl.sh 2008-10-14 13:00:57
UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/conf/scripts/daemonbwctl.sh 2008-10-14 15:04:22
UTC (rev 4617)
@@ -1,9 +1,9 @@
#!/bin/sh

-RESULT=`ps aux | grep -E "[b]wctld" | tr -s ' ' | cut -d " " -f 8`
+RESULT=`ps aux | grep -E "[b]wctld" | tr -s ' ' | cut -d " " -f 8 | cut -f 1`

if [ -n "$RESULT" ]; then
- if [ ${RESULT:0:1} = "T" -o ${RESULT:0:1} = "Z" ]; then
+ if [ $RESULT = "T" -o $RESULT = "Z" ]; then
echo "error"
echo "'bwctld' process is in either stopped or zombie state."
else

Modified: trunk/rnp_java-cl-mp/conf/scripts/daemonntp.sh
===================================================================
--- trunk/rnp_java-cl-mp/conf/scripts/daemonntp.sh 2008-10-14 13:00:57
UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/conf/scripts/daemonntp.sh 2008-10-14 15:04:22
UTC (rev 4617)
@@ -1,9 +1,9 @@
#!/bin/sh

-RESULT=`ps aux | grep -E "[n]tpd" | tr -s ' ' | cut -d " " -f 8`
+RESULT=`ps aux | grep -E "[n]tpd" | tr -s ' ' | cut -d " " -f 8 | cut -f 1`

if [ -n "$RESULT" ]; then
- if [ ${RESULT:0:1} = "T" -o ${RESULT:0:1} = "Z" ]; then
+ if [ $RESULT = "T" -o $RESULT = "Z" ]; then
echo "error"
echo "'ntpd' process is in either stopped or zombie state."
else

Modified: trunk/rnp_java-cl-mp/conf/scripts/daemonowamp.sh
===================================================================
--- trunk/rnp_java-cl-mp/conf/scripts/daemonowamp.sh 2008-10-14 13:00:57
UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/conf/scripts/daemonowamp.sh 2008-10-14 15:04:22
UTC (rev 4617)
@@ -1,9 +1,9 @@
#!/bin/sh

-RESULT=`ps aux | grep -E "[o]wampd" | tr -s ' ' | cut -d " " -f 8`
+RESULT=`ps aux | grep -E "[o]wampd" | tr -s ' ' | cut -d " " -f 8 | cut -f 1`

if [ -n "$RESULT" ]; then
- if [ ${RESULT:0:1} = "T" -o ${RESULT:0:1} = "Z" ]; then
+ if [ $RESULT = "T" -o $RESULT = "Z" ]; then
echo "error"
echo "'owampd' process is in either stopped or zombie state."
else

Added: trunk/rnp_java-cl-mp/conf/scripts/init.sh

Modified: trunk/rnp_java-cl-mp/conf/service.properties
===================================================================
--- trunk/rnp_java-cl-mp/conf/service.properties 2008-10-14 13:00:57
UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/conf/service.properties 2008-10-14 15:04:22
UTC (rev 4617)
@@ -16,20 +16,24 @@

# Group=Internal
# Description=File which contains the mapping information for parsing the
messages.
-service.sax_parser.config=/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/objects.config
+service.sax_parser.config=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/objects.config

# Group=Internal
# Description=File with configuration for the logger component.
-service.log.log4j.config=/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/log4j.properties
+service.log.log4j.config=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/log4j.properties

# Group=Internal
# Description=File with tools mapping and authentication information.
-service.clmp.tools_map=/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/eventType-map.xml
+service.clmp.tools_map=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/eventType-map.xml

# Group=Internal
# Description=File with selftest mapping.
-service.clmp.selftest_map=/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/selfTest-map.xml
+service.clmp.selftest_map=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/selfTest-map.xml

+# Group=Internal
+# Description=Script executed at startup.
+service.clmp.init_script=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/scripts/init.sh
+
#
-----------------------------------------------------------------------------------------------
# Configuration of the scheduling functionality

@@ -40,11 +44,11 @@

# Group=Cron-Like Scheduler
# Description=Determines where to place locally stored results from the
scheduled measurements. Only used if the default_ma option is 'local'.
-service.clmp.cron.local_storage_dir=/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/local
+service.clmp.cron.local_storage_dir=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/local

# Group=Cron-Like Scheduler
# Description=Determines where the scheduler database and related files will
be stored.
-service.clmp.cron_dir=/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron
+service.clmp.cron_dir=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron

# Group=Cron-Like Scheduler
# Description=General purpose scheduler component used by the cron-like
scheduler. Must exist in components.properties.
@@ -109,11 +113,11 @@

# Group=LS
# Description=(Optional) Absolute path to a file with more information to
register at the LS.
-service.ls.registration_file=
+service.ls.registration_file=/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/ls-registration.xml

# Group=LS
-# Description=The time (miliseconds) between register requests to the LS
service (default value is 43200000 ms; 12 hours).
-component.registrator.interval=43200000
+# Description=The time (miliseconds) between register requests to the LS
service (default value is 43200s; 12 hours).
+component.registrator.interval=43200

# Group=LS
# Description=The name of the scheduler component (the implementation of
this component must also be declared in the components.properties file).

Modified: trunk/rnp_java-cl-mp/conf/wizard.properties
===================================================================
--- trunk/rnp_java-cl-mp/conf/wizard.properties 2008-10-14 13:00:57 UTC (rev
4616)
+++ trunk/rnp_java-cl-mp/conf/wizard.properties 2008-10-14 15:04:22 UTC (rev
4617)
@@ -68,9 +68,9 @@
</property>

<property>
- <entry key="service.clmp.cron.local_storage_dir"
required="true">/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/local</entry>
+ <entry key="service.clmp.cron.local_storage_dir"
required="true">/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/local</entry>
<Comment>Enter directory for local storage</Comment>
-
<ProposedValue>/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/local</ProposedValue>
+
<ProposedValue>/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/local</ProposedValue>
<Group order="2">Cron-Like Scheduler</Group>
</property>

@@ -121,7 +121,7 @@
<AcceptedValue>yes</AcceptedValue>
<AcceptedValue>no</AcceptedValue>
</property>
-
+
<property>
<entry key="authentication.bwctl" required="true">no</entry>
<Comment>Enable authentication for tool BWCTL?:</Comment>
@@ -200,9 +200,9 @@
</property>

<property>
- <entry key="component.registrator.interval">30000</entry>
- <Comment>Give the registration interval</Comment>
- <ProposedValue>30000</ProposedValue>
+ <entry key="component.registrator.interval">300</entry>
+ <Comment>Give the registration interval (in seconds)</Comment>
+ <ProposedValue>300</ProposedValue>
<Group order="6">LS</Group>
</property>


Modified: trunk/rnp_java-cl-mp/doc/schema/owampSummaryResponse.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/owampSummaryResponse.rnc 2008-10-14
13:00:57 UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/doc/schema/owampSummaryResponse.rnc 2008-10-14
15:04:22 UTC (rev 4617)
@@ -105,6 +105,6 @@
attribute ttl { xsd:unsignedInt } &
attribute count { xsd:unsignedInt }
} +
- }
+ }?
}


Modified: trunk/rnp_java-cl-mp/packaging/deb/changelog
===================================================================
--- trunk/rnp_java-cl-mp/packaging/deb/changelog 2008-10-14 13:00:57
UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/packaging/deb/changelog 2008-10-14 15:04:22
UTC (rev 4617)
@@ -3,9 +3,14 @@
* New: Added a new eventType for summarized owamp measurements (-M
switch), http://ggf.org/ns/nmwg/tools/owamp/summary/2.0
* New: SelfTest functionality added. Works modularly - calls external
scripts defined in conf/selfTest-map.xml and expects "success" or "error" on
the first line and the reasons next.
* New: Log4j properties file for logging to a Syslog server added
+ * New: LS Registration now uses a registration file with extra information
to register. This file is populated by a script run during initialization.
Script can be customized.
+ * Change: new service path /usr/lib/perfsonar/services/perfsonar-clmp/
* Change: Some classes were changed for internal self-testing
(componentsInitialization).
- * Change: Using nmwg-1.0.20080916, perfsonar-base-1.0.20080902 and
perfsonar-web-admin-0.9.2b
-
+ * Change: Using nmwg-1.0.20080916, perfsonar-base-1.0.20080902 and
perfsonar-web-admin-0.9.6b
+ * Change: Authentication eventType configuration can now depend on a
parent eventType (case of OwampSummary and Owamp)
+ * Bug fix: Fixed cron database removal bug (wrong entry being deleted
sometimes).
+ * Bug fix: Fixed cron's 'dow' parameter bug (Java considers Sunday 1
through Saturday 7, instead of 0 to 6).
+
-- Guilherme Fernandes
<>
Tue, 16 Sep 2008 12:00:00 +0200

perfsonar-clmp (2.0-1) stable; urgency=low

Modified: trunk/rnp_java-cl-mp/packaging/deb/conffiles
===================================================================
--- trunk/rnp_java-cl-mp/packaging/deb/conffiles 2008-10-14 13:00:57
UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/packaging/deb/conffiles 2008-10-14 15:04:22
UTC (rev 4617)
@@ -1,13 +1,13 @@
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/components.properties
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/eventType-map.xml
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/selfTest-map.xml
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/log4j.properties
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/log4j.syslog.properties
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/objects.config
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/service.properties
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/servlet.properties
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/wizard.properties
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/wizardproperties.dtd
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/clmpcron
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/web.xml
-/opt/perfsonar/services/perfsonar-clmp/WEB-INF/server-config.wsdd
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/components.properties
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/eventType-map.xml
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/selfTest-map.xml
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/log4j.properties
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/log4j.syslog.properties
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/objects.config
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/service.properties
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/servlet.properties
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/wizard.properties
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf/wizardproperties.dtd
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron/clmpcron
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/web.xml
+/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/server-config.wsdd

Modified: trunk/rnp_java-cl-mp/packaging/deb/control
===================================================================
--- trunk/rnp_java-cl-mp/packaging/deb/control 2008-10-14 13:00:57 UTC (rev
4616)
+++ trunk/rnp_java-cl-mp/packaging/deb/control 2008-10-14 15:04:22 UTC (rev
4617)
@@ -7,6 +7,6 @@

Package: perfsonar-clmp
Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, tomcat5.5,
geant2-tomcat5.5-runscript
+Depends: ${shlibs:Depends}, ${misc:Depends}, tomcat5.5
Description: perfSONAR Command Line Measurement Point


Modified: trunk/rnp_java-cl-mp/packaging/deb/dirs
===================================================================
--- trunk/rnp_java-cl-mp/packaging/deb/dirs 2008-10-14 13:00:57 UTC (rev
4616)
+++ trunk/rnp_java-cl-mp/packaging/deb/dirs 2008-10-14 15:04:22 UTC (rev
4617)
@@ -1 +1 @@
-/opt/perfsonar/services/perfsonar-clmp
+/usr/lib/perfsonar/services/perfsonar-clmp
\ No newline at end of file

Modified: trunk/rnp_java-cl-mp/packaging/deb/install
===================================================================
--- trunk/rnp_java-cl-mp/packaging/deb/install 2008-10-14 13:00:57 UTC (rev
4616)
+++ trunk/rnp_java-cl-mp/packaging/deb/install 2008-10-14 15:04:22 UTC (rev
4617)
@@ -1,6 +1,6 @@
-build/perfsonar-clmp/* /opt/perfsonar/services/perfsonar-clmp
-doc /opt/perfsonar/services/perfsonar-clmp/WEB-INF
-samples /opt/perfsonar/services/perfsonar-clmp/WEB-INF
+build/perfsonar-clmp/* /usr/lib/perfsonar/services/perfsonar-clmp
+doc /usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF
+samples /usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF




Modified: trunk/rnp_java-cl-mp/packaging/deb/postinst
===================================================================
--- trunk/rnp_java-cl-mp/packaging/deb/postinst 2008-10-14 13:00:57 UTC (rev
4616)
+++ trunk/rnp_java-cl-mp/packaging/deb/postinst 2008-10-14 15:04:22 UTC (rev
4617)
@@ -24,12 +24,12 @@
then
rm /var/lib/tomcat5.5/webapps/perfsonar-clmp
fi
- ln -s /opt/perfsonar/services/perfsonar-clmp
/var/lib/tomcat5.5/webapps/perfsonar-clmp || true
+ ln -s /usr/lib/perfsonar/services/perfsonar-clmp
/var/lib/tomcat5.5/webapps/perfsonar-clmp || true
if [ -h /etc/perfsonar-clmp ]
then
rm /etc/perfsonar-clmp
fi
- ln -s
/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf
/etc/perfsonar-clmp || true
+ ln -s
/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf
/etc/perfsonar-clmp || true

if [ -h /var/log/perfsonar-clmp ]
then
@@ -41,12 +41,12 @@
then
rm /usr/share/doc/perfsonar-clmp/spec
fi
- ln -s /opt/perfsonar/services/perfsonar-clmp/WEB-INF/doc
/usr/share/doc/perfsonar-clmp/spec || true
+ ln -s /usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/doc
/usr/share/doc/perfsonar-clmp/spec || true

- chown -R tomcat55
/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf
- chown -R tomcat55
/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron
- chmod a+x
/opt/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/scripts/*
- /etc/init.d/geant2-tomcat5.5 restart
+ chown -R tomcat55
/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/conf
+ chown -R tomcat55
/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/cron
+ chmod a+x
/usr/lib/perfsonar/services/perfsonar-clmp/WEB-INF/classes/perfsonar/scripts/*
+ /etc/init.d/tomcat5.5 restart
;;

abort-upgrade|abort-remove|abort-deconfigure)

Modified: trunk/rnp_java-cl-mp/packaging/rpm/perfsonar-clmp.specs
===================================================================
--- trunk/rnp_java-cl-mp/packaging/rpm/perfsonar-clmp.specs 2008-10-14
13:00:57 UTC (rev 4616)
+++ trunk/rnp_java-cl-mp/packaging/rpm/perfsonar-clmp.specs 2008-10-14
15:04:22 UTC (rev 4617)
@@ -1,4 +1,4 @@
-%define prefix /opt/perfsonar/services/%{name}
+%define prefix /usr/lib/perfsonar/services/%{name}

Name: perfsonar-clmp
Version: 2.1
@@ -114,11 +114,16 @@

%changelog
* Wed Sep 16 2008 Guilherme Fernandes
<>
2.1-1
-- NEW: Added a new eventType for summarized owamp measurements (-M switch),
http://ggf.org/ns/nmwg/tools/owamp/summary/2.0
-- NEW: SelfTest functionality added. Works modularly - calls external
scripts defined in conf/selfTest-map.xml and expects "success" or "error" on
the first line and the reasons next.
-- NEW: Log4j properties file for logging to a Syslog server added
+- New: Added a new eventType for summarized owamp measurements (-M switch),
http://ggf.org/ns/nmwg/tools/owamp/summary/2.0
+- New: SelfTest functionality added. Works modularly - calls external
scripts defined in conf/selfTest-map.xml and expects "success" or "error" on
the first line and the reasons next.
+- New: Log4j properties file for logging to a Syslog server added
+- New: LS Registration now uses a registration file with extra information
to register. This file is populated by a script run during initialization.
Script can be customized.
+- Change: new service path /usr/lib/perfsonar/services/perfsonar-clmp/
- Change: Some classes were changed for internal self-testing
(componentsInitialization).
-- Change: Using nmwg-1.0.20080916, perfsonar-base-1.0.20080902 and
perfsonar-web-admin-0.9.2b
+- Change: Using nmwg-1.0.20080916, perfsonar-base-1.0.20080902 and
perfsonar-web-admin-0.9.6b
+- Change: Authentication eventType configuration can now depend on a parent
eventType (case of OwampSummary and Owamp)
+- Bug fix: Fixed cron database removal bug (wrong entry being deleted
sometimes).
+- Bug fix: Fixed cron's 'dow' parameter bug (Java considers Sunday 1 through
Saturday 7, instead of 0 to 6).

* Wed Sep 16 2008 Guilherme Fernandes
<>
2.1-1
- New: Authentication Functionality added.

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -154,28 +154,31 @@
byte dow = 0;
dow = BitManipulation.setBit(dow,
now.get(Calendar.DAY_OF_WEEK));

+ logger.debug(CNAME+ ": Running new cycle.");
+
Entries entry = database;
-
+
+
+ int countEntries = 0;
while (!entry.isEmpty()) {
-
- /*
- * logger.debug(CNAME + ".runAction: --> minutes: " +
minutes + "
- * --> hours: " + hours + " --> dom: " + dom + " -->
months: " +
- * months + " --> dow: " + dow + "----> Entry: " +
entry);
- */
+
if (BitManipulation.test(entry.getMinutes(), minutes))
if (BitManipulation.test(entry.getHours(),
hours))
if
(BitManipulation.test(entry.getDom(), dom))
if
(BitManipulation.test(entry.getMonths(), months))
if
(BitManipulation.test(entry.getDow(), dow)) {
+
logger.debug(CNAME
+
+ ": Running Job "+entry.getAction()+".");
(new
Thread(new Job(entry.getAction(), entry

.getMa(), defaultMa, cronPath, logger,

configuration))).start();
}

entry = entry.getNext();
+ countEntries++;
}

+ logger.debug(CNAME+ ": Cycle finished, "+countEntries+"
checked.");
}

// ---------------------- component that loads action to scheduler
@@ -386,73 +389,80 @@
public Message remove(ScheduleRequest scheduleRequest)
throws PerfSONARException {

- List<String> keys = scheduleRequest.getKeys();
int count = 0;
- for (String key : keys) {
- Entries entry = database.getEntry(key);
- String actionFile = "";
- if (entry != null)
- actionFile = entry.getAction();
+ if(!database.isEmpty()){
+ List<String> keys = scheduleRequest.getKeys();
+ for (String key : keys) {
+ Entries entry = database.getEntry(key);
+ String actionFile = "";
+ if (entry != null)
+ actionFile = entry.getAction();

- int pos = database.removeEntry(key);
+ int pos = database.removeEntry(key);

- if (pos >= 0) {
- try {
+ if (pos >= 0) {
+ try {

- File db = new File(cronPath + "/" +
DBFILE);
- FileChannel outChannel = (new
RandomAccessFile(db, "rw"))
- .getChannel();
+ File db = new File(cronPath +
"/" + DBFILE);
+ FileChannel outChannel = (new
RandomAccessFile(db, "rw"))
+ .getChannel();

- long channelSize = outChannel.size()
- ENTRYSIZE;
+ ByteBuffer temp =
ByteBuffer.allocate(ENTRYSIZE);
+ long channelSize =
outChannel.size();

- ByteBuffer temp =
ByteBuffer.allocate(ENTRYSIZE);
- outChannel.position(channelSize);
- outChannel.read(temp);
+ while(channelSize >
(ENTRYSIZE * (totalEntries - pos))){
+ temp.position(0);
+ outChannel.read(temp,
ENTRYSIZE * (totalEntries - pos));
+ temp.position(0);
+
outChannel.write(temp, ENTRYSIZE * (totalEntries - 1 - pos));
+ --pos;
+ }

- temp.position(0);
- outChannel.position(ENTRYSIZE *
(totalEntries - 1 - pos));
- outChannel.write(temp);
- outChannel.truncate(channelSize);
+
outChannel.truncate(channelSize - ENTRYSIZE);
+ outChannel.close();

- outChannel.close();
+ totalEntries--;
+ } catch (Exception e) {

- totalEntries--;
- } catch (Exception e) {
+ logger
+ .debug(CNAME
+ +
".removeEntry: "
+ + "Exception
caught while trying to access cron database file."
+ +
e.getMessage());

- logger
- .debug(CNAME
- +
".removeEntry: "
- +
"Exception caught while trying to access cron database file."
- +
e.getMessage());
+ throw new PerfSONARException(
+
"error.mp.clmp.cron.database_error",
+ CNAME
+ +
".removeEntry: "
+ + "Exception
caught while trying to access cron database file. "
+ +
e.getMessage());
+ }

- throw new PerfSONARException(
-
"error.mp.clmp.cron.database_error",
- CNAME
- +
".removeEntry: "
- +
"Exception caught while trying to access cron database file. "
- +
e.getMessage());
- }
+ try {
+ File file = new File(cronPath
+ "/" + actionFile);
+ file.delete();
+ } catch (Exception e) {

- try {
- File file = new File(cronPath + "/" +
actionFile);
- file.delete();
- } catch (Exception e) {
+ logger
+ .debug(CNAME
+ +
".removeEntry: "
+ + "Exception
caught while trying to access/delete action file."
+ +
e.getMessage());

- logger
- .debug(CNAME
- +
".removeEntry: "
- +
"Exception caught while trying to access/delete action file."
- +
e.getMessage());
-
- throw new PerfSONARException(
-
"error.mp.clmp.cron.database_error",
- CNAME
- +
".removeEntry: "
- +
"Exception caught while trying to access/delete action file."
- +
e.getMessage());
+ throw new PerfSONARException(
+
"error.mp.clmp.cron.database_error",
+ CNAME
+ +
".removeEntry: "
+ + "Exception
caught while trying to access/delete action file."
+ +
e.getMessage());
+ }
+ count++;
}
- count++;
}
+ }else{
+ return ResultCodesUtil.createResultCodeMetadata(null,
+ new
PerfSONARException("failure.mp.clmp.cron.remove", CNAME
+ + ": Database is
already empty."));
}

if(count > 0)
@@ -532,9 +542,14 @@
iS.close();

} catch (Exception e) {
- logger
-
.debug("CommandLineCronComponent.list: Error trying to read "
- +
cronPath + "/" + entry.getAction() + ".");
+ logger.debug(CNAME+".list: Error
trying to read "
+ + cronPath + "/" +
entry.getAction() + ".");
+ throw new PerfSONARException(
+
"error.mp.clmp.cron.database_error",
+ CNAME
+ +
".list: Error trying to read "
+ +
cronPath + "/" + entry.getAction() + ": "
+ +
e.getMessage());
}

Message actionMessage = null;
@@ -546,11 +561,15 @@

} catch (Exception e) {

-
logger.debug("CommandLineCronComponent.Job: "
- + "Parse/validation
error, "
- + "Cannot convert
action to Message. "
+ logger.debug(CNAME+".list:
Parse/validation error for action "
+ + entry.getAction() +
". Cannot convert action to Message. "
+ "Nested error
messsage was " + e.getMessage());

+ throw new PerfSONARException(
+
"error.mp.clmp.cron.validation_error",
+ CNAME+".list:
Parse/validation error for action "
+ + entry.getAction() +
". Cannot convert action to Message. "
+ + "Nested error
messsage was " + e.getMessage());
}
byte[] bytes = new byte[temp.capacity()];
temp.position(0);
@@ -563,12 +582,21 @@

cron.getSubject().setMetadataIdRef(data.getMetadataIdRef());
data.setMetadataIdRef(cron.getId());

- if(actionMetadata.getMetadataIdRef() != null
&& actionMetadata.getMetadataIdRef().length() > 0)
-
response.addChild(actionMessage.getMetadata(actionMetadata.getMetadataIdRef()));
- else if(actionMetadata.getSubject() != null
+ if(actionMetadata.getMetadataIdRef() != null
+ &&
actionMetadata.getMetadataIdRef().length() > 0){
+
+ response.addChild(
+
actionMessage.getMetadata(
+
actionMetadata.getMetadataIdRef()));
+
+ }else if(actionMetadata.getSubject() != null
&&
actionMetadata.getSubject().getMetadataIdRef() != null
- &&
actionMetadata.getSubject().getMetadataIdRef().length() > 0)
-
response.addChild(actionMessage.getMetadata(actionMetadata.getSubject().getMetadataIdRef()));
+ &&
actionMetadata.getSubject().getMetadataIdRef().length() > 0){
+
+ response.addChild(
+
actionMessage.getMetadata(
+
actionMetadata.getSubject().getMetadataIdRef()));
+ }

response.addChild(actionMetadata);
response.addChild(cron);
@@ -631,7 +659,6 @@
File db = new File(cronPath + "/" + DBFILE);
FileChannel inChannel = (new RandomAccessFile(db,
"r"))
.getChannel();
- System.out.println();

total = (int) (inChannel.size() / ((long) ENTRYSIZE));
logger.debug("total: " + total);
@@ -900,10 +927,10 @@
if (dofw.startsWith("*")) {
if (dofw.length() > 1) {
int div =
Integer.parseInt(dofw.substring(2));
- for (int count = 0; count <= 6; count
+= div)
+ for (int count = 0; count <= 7; count
+= div)
dow =
BitManipulation.setBit(dow, count);
} else
- for (int count = 0; count <= 6;
count++)
+ for (int count = 0; count <= 7;
count++)
dow =
BitManipulation.setBit(dow, count);
} else {

@@ -990,6 +1017,7 @@
logger

.debug("CommandLineCronComponent.Job: Error trying to read "
+ path + "/"
+ action + ".");
+ return;
}

Message actionMessage = null;
@@ -1001,9 +1029,10 @@
} catch (Exception e) {

logger.debug("CommandLineCronComponent.Job: "
- + "Parse/validation error, "
- + "Cannot convert action to
Message. "
+ + "Parse/validation error for
action "+action
+ + ". Cannot convert action to
Message. "
+ "Nested error messsage was
" + e.getMessage());
+ return;

}


Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -1,5 +1,8 @@
package org.perfsonar.service.measurementPoint.commandLine;

+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -15,6 +18,7 @@
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.registration.PropertiesServiceDescription;
+import org.perfsonar.service.measurementPoint.commandLine.utils.Constants;


public class CommandLineResourceProtector implements AuxiliaryComponent {
@@ -26,6 +30,8 @@
// ------------------------------------------------- components

private LoggerComponent logger = null;
+
+ private ConfigurationComponent configuration = null;

// -------------------------------------------- class fields

@@ -49,9 +55,20 @@
initializationErrorMessages.add(
CNAME+": Couldn't get logger component.");
throw new PerfSONARException("error.common.no_logger",
- CNAME+".initComponent: Cannot get logger component");
+ CNAME+": Cannot get logger component");
}

+ try {
+ configuration = (ConfigurationComponent)
AuxiliaryComponentManager
+
.getInstance().getComponent(ComponentNames.CONFIG);
+ } catch (PerfSONARException e) {
+ initializationSuccesful = false;
+ initializationErrorMessages.add(
+ CNAME+": Couldn't get configuration
component: "+
+ e.getMessage());
+ throw new PerfSONARException("error.common.no_configuration",
+ CNAME+": Cannot get configuration component");
+ }
}

// ---------------------------------- public methods
@@ -120,6 +137,37 @@

if(initializationSuccesful == null)
initializationSuccesful = true;
+
+ /*
+ * XXX: This is here for lack of a better place.
+ * It tries to find and execute a script to do initialization tasks.
+ * Initially intended to externally update the LS registration file.
+ */
+ String initializationScript = null;
+ try{
+ initializationScript =
+
configuration.getProperty(Constants.InitializationScriptProperty);
+ }catch(PerfSONARException e){
+ logger.error(CNAME + ": Couldn't get '" +
+
Constants.InitializationScriptProperty + "' " +
+ "property: " + e.getMessage());
+ }
+ if(initializationScript != null){
+ CommandLineExec cl = null;
+ try {
+ cl = new
CommandLineExec("initializationScript");
+ cl.run_synchronous(5000,
initializationScript.split(" "));
+ } catch (Exception ex1) {
+ logger.error(CNAME + ": Something wrong
happened while " +
+ "executing initialization
script: "+
+ ex1.getMessage());
+ }finally{
+ if(cl != null){
+ if(cl.getOsFile() != null)
cl.getOsFile().delete();
+ if(cl.getEsFile() != null)
cl.getEsFile().delete();
+ }
+ }
+ }
}



Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineSelfTest.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineSelfTest.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineSelfTest.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -282,16 +282,21 @@

e.setEventType(testUnit.getEventType()+"/"+line);
while((line = br.readLine()) != null)
addTestResult(d, line);
- }else if(line.equalsIgnoreCase("error")){
+ }else if(line.equalsIgnoreCase("error") ||
+
line.equalsIgnoreCase("warning")){
+ String result = line;

e.setEventType(testUnit.getEventType()+"/"+line);
String reason = new String();
while((line = br.readLine()) != null){
reason += line + " ";
addTestResult(d, line);
}
- if(line.equalsIgnoreCase("error"))
- logger.error("Self-Test
type=["+testUnit.getEventType()+
- "]
result=[error] reason=["+reason+"]");
+ String logMessage = "Self-Test
type=["+testUnit.getEventType()+
+ "]
result=["+result+"] reason=["+reason+"]";
+ if(result.equalsIgnoreCase("error"))
+ logger.error(logMessage);
+ else
+ logger.warn(logMessage);
}else{

e.setEventType(testUnit.getEventType()+"/unknown");
addTestResult(d, "Test returned
unexpected results. " +

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -145,7 +145,10 @@
.contains("CronComponent")){
// Check if tool needs authentication
String authentication = (String)
m2a.get(eventString.toUpperCase());
-
+
+ if(authentication != null &&
authentication.startsWith("http"))
+ authentication = (String)
m2a.get(authentication.toUpperCase());
+
if(authentication != null &&
authentication.equalsIgnoreCase("yes")){
SecurityToken st= new SecurityToken(

SecTokenManagerFactory.getDefaultSecTokenManager());
@@ -170,6 +173,7 @@
}
}
}
+
// try to create a tool for the given event type.
CommandLineToolBundle tool = null;
try {

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Cron.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Cron.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Cron.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -407,11 +407,11 @@
String errorString = CNAME
+ ".validateMessageRequest: Parameter 'dow'
syntax error. "
+ "dow (DayOfWeek) should be separated by ','
and ranges defined by '-'. "
- + "Examples: '1,2' '3-6', '*/2', '1,3-5,6'.
min=0 (sunday), max=6 (saturday)";
+ + "Examples: '1,2' '3-6', '*/2', '1,3-5,6'.
min=1 (sunday), max=7 (saturday)";

String dow =
params.getParameterByName("dow").getParameterValue();

- if (validateField(dow, 0, 6))
+ if (validateField(dow, 1, 7))
entry.append(padding(dow, 6));
else {
logger.fatal(errorString);

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/OwampSummary.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/OwampSummary.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/OwampSummary.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -298,7 +298,7 @@

// MAXERR 0.000120267
Float f = new Float(getFirstMatchedGroup(
- "MAXERR\\s*([0-9\\.\\-]+)",
br.readLine()));
+ "MAXERR\\s*([0-9\\.\\-e]+)",
br.readLine()));
datum.setMaxError(f);

// DUPS 0
@@ -311,57 +311,62 @@
"LOST\\s*([0-9]+)", br.readLine()));
datum.setLoss(i);

- // MIN 0.00172043
- f = new Float(getFirstMatchedGroup(
- "MIN\\s*([0-9\\.\\-]+)",
br.readLine()));
- datum.setMinDelay(f);
-
- // MAX 0.00189638
- f = new Float(getFirstMatchedGroup(
- "MAX\\s*([0-9\\.\\-]+)",
br.readLine()));
- datum.setMaxDelay(f);
-
- br.readLine(); // BUCKETWIDTH 1e-04
-
- ValueBuckets valueBuckets = new ValueBuckets();
- /* <BUCKETS>
+ line = br.readLine(); // MIN 0.00172043
+ if(line != null && line.startsWith("MIN")){
+ // The rest only exists if at least one
packet was received
+ f = new Float(getFirstMatchedGroup(
+ "MIN\\s*([0-9\\.\\-e]+)",
line));
+ datum.setMinDelay(f);
+
+ // MAX 0.00189638
+ f = new Float(getFirstMatchedGroup(
+ "MAX\\s*([0-9\\.\\-e]+)",
br.readLine()));
+ datum.setMaxDelay(f);
+
+ br.readLine(); // BUCKETWIDTH 1e-04
+
+ ValueBuckets valueBuckets = new
ValueBuckets();
+ /* <BUCKETS>
18 38
19 62
</BUCKETS>
- */
- br.readLine();
- while(!(line = br.readLine()).equals("</BUCKETS>")){
- ValueBucket vb = new ValueBucket();
- vb.setValue(getFirstMatchedGroup(
- "\\s*([0-9\\-]+)\\s+[0-9]+",
line));
- i = new Integer(getFirstMatchedGroup(
- "\\s*[0-9\\-]+\\s+([0-9]+)",
line));
- vb.setCount(i);
- valueBuckets.addChild(vb);
+ */
+ br.readLine();
+ while(!(line =
br.readLine()).equals("</BUCKETS>")){
+ ValueBucket vb = new ValueBucket();
+ vb.setValue(getFirstMatchedGroup(
+
"\\s*([0-9\\-]+)\\s+[0-9]+", line));
+ i = new Integer(getFirstMatchedGroup(
+
"\\s*[0-9\\-]+\\s+([0-9]+)", line));
+ vb.setCount(i);
+ valueBuckets.addChild(vb);
+ }
+ datum.addChild(valueBuckets);
+
+ line = br.readLine(); // MINTTL 253
+ // We might not have TTL information
+ if(line != null &&
line.startsWith("MINTTL")){
+ br.readLine(); // MAXTTL 253
+
+ TTLBuckets ttlBuckets = new
TTLBuckets();
+ /* <TTLBUCKETS>
+ 253 100
+ </TTLBUCKETS>
+ */
+ br.readLine();
+ while(!(line =
br.readLine()).equals("</TTLBUCKETS>")){
+ TTLBucket tb = new
TTLBucket();
+ i = new
Integer(getFirstMatchedGroup(
+
"\\s*([0-9]+)\\s+[0-9]+", line));
+ tb.setTtl(i);
+ i = new
Integer(getFirstMatchedGroup(
+
"\\s*[0-9]+\\s+([0-9]+)", line));
+ tb.setCount(i);
+ ttlBuckets.addChild(tb);
+ }
+ datum.addChild(ttlBuckets);
+ }
}
- datum.addChild(valueBuckets);
-
- br.readLine(); // MINTTL 253
- br.readLine(); // MAXTTL 253
-
- TTLBuckets ttlBuckets = new TTLBuckets();
- /* <TTLBUCKETS>
- 253 100
- </TTLBUCKETS>
- */
- br.readLine();
- while(!(line =
br.readLine()).equals("</TTLBUCKETS>")){
- TTLBucket tb = new TTLBucket();
- i = new Integer(getFirstMatchedGroup(
- "\\s*([0-9]+)\\s+[0-9]+",
line));
- tb.setTtl(i);
- i = new Integer(getFirstMatchedGroup(
- "\\s*[0-9]+\\s+([0-9]+)",
line));
- tb.setCount(i);
- ttlBuckets.addChild(tb);
- }
- datum.addChild(ttlBuckets);
-
datumList.add(datum);

br.close();

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Constants.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Constants.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Constants.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -3,4 +3,5 @@
public class Constants {
public static final String RPComponent = "clmprp";
public static final String CronComponent = "clmp_cron";
+ public static final String InitializationScriptProperty =
"service.clmp.init_script";
}

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Entries.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Entries.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils/Entries.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -26,8 +26,9 @@
this.ma = ma;
this.key = key;
this.action = action;
+ prevEntry = null;
nextEntry = new Entries();
- prevEntry = null;
+ nextEntry.setPrev(this);
}

public Entries(long m, int h, int dom, short mon, byte dow,
@@ -41,6 +42,8 @@
this.key = key;
this.action = action;
this.nextEntry = nextEntry;
+ if(nextEntry != null)
+ nextEntry.setPrev(this);
}

public String getAction() {
@@ -137,7 +140,7 @@

public void insertEntry(Entries newEntry) {
nextEntry = new Entries(minutes, hours, dom, months,
dow,
- ma, key, action, nextEntry);

+ ma, key, action, nextEntry);
nextEntry.setPrev(this);
minutes = newEntry.getMinutes();
hours = newEntry.getHours();
@@ -166,8 +169,10 @@
nextEntry = nextEntry.nextEntry;
} else if (isLast())
prevEntry.setNext(new Entries());
- else
+ else{
prevEntry.setNext(nextEntry);
+ nextEntry.setPrev(prevEntry);
+ }
return pos;
} else if (!nextEntry.isEmpty())
return nextEntry.removeEntry(key, pos+1);

Modified:
trunk/rnp_java-cl-mp/src/main/java/perfSONARWebAdmin/admin/wizard/services/CLMPHandler.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/perfSONARWebAdmin/admin/wizard/services/CLMPHandler.java
2008-10-14 13:00:57 UTC (rev 4616)
+++
trunk/rnp_java-cl-mp/src/main/java/perfSONARWebAdmin/admin/wizard/services/CLMPHandler.java
2008-10-14 15:04:22 UTC (rev 4617)
@@ -353,7 +353,7 @@
WizardProperties groupProperties =
groupedProperties.get("Authentication");

if(groupProperties == null)
- throw new Exception("There must a group
Authentication in wizard.properties.\n");
+ throw new Exception("There must be a group
Authentication in wizard.properties.\n");


if("yes".equals(request.getParameter("authentication.enable").trim())){
groupProperties.remove("authentication.enable");
@@ -374,7 +374,7 @@
for(String line = br.readLine(); line != null; line =
br.readLine()){
if(line.contains("<name>")){
for(String key : keys)
- if(line.contains(key)){
+ if(line.contains(key+"/2.0")){
contents.append(line
+ "\n");

contents.append(br.readLine()+"\n"); /* read <class> */
line = br.readLine();
@@ -387,7 +387,8 @@
else
if("yes".equals(value))
line =
line.replace("no", "yes");
else
- throw new
Exception("Unrecognized option '"+value+"' for authentication configuration
of tools.\n");
+ throw new
Exception("Unrecognized option '"+value+
+
"' for authentication configuration of tools.\n");


groupProperties.remove("authentication."+key);
break;



  • perfsonar: r4617 - in trunk/rnp_java-cl-mp: conf conf/scripts doc/schema packaging/deb packaging/rpm src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools src/main/java/org/perfsonar/service/measurementPoint/commandLine/utils src/main/java/perfSONARWebAdmin/admin/wizard/services, svnlog, 10/14/2008

Archive powered by MHonArc 2.6.16.

Top of Page