Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r744 - in branches/perfsonar-oppd-all-0.53: bin etc etc/oppd-dev etc/oppd.d.example lib/NMWG lib/perfSONAR lib/perfSONAR/Client lib/perfSONAR/DataStruct tools/perfSONAR-client

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/SA2T3-OPPD] r744 - in branches/perfsonar-oppd-all-0.53: bin etc etc/oppd-dev etc/oppd.d.example lib/NMWG lib/perfSONAR lib/perfSONAR/Client lib/perfSONAR/DataStruct tools/perfSONAR-client


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r744 - in branches/perfsonar-oppd-all-0.53: bin etc etc/oppd-dev etc/oppd.d.example lib/NMWG lib/perfSONAR lib/perfSONAR/Client lib/perfSONAR/DataStruct tools/perfSONAR-client
  • Date: Thu, 10 Nov 2011 14:08:47 +0000 (GMT)

Author: dfn.calim
Date: 2011-11-10 14:08:47 +0000 (Thu, 10 Nov 2011)
New Revision: 744

Added:

branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/send_paralellel_echo.sh
Modified:
branches/perfsonar-oppd-all-0.53/bin/oppd.pl
branches/perfsonar-oppd-all-0.53/etc/LS_register.xml
branches/perfsonar-oppd-all-0.53/etc/oppd-dev/oppd.dev.conf
branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/bwctl.conf
branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/hades.conf
branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/owamp.conf
branches/perfsonar-oppd-all-0.53/lib/NMWG/Message.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/Client/LS.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MA.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm
Log:
fix echo request problem with eventtype

Modified: branches/perfsonar-oppd-all-0.53/bin/oppd.pl
===================================================================
--- branches/perfsonar-oppd-all-0.53/bin/oppd.pl 2011-10-05 09:17:15
UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/bin/oppd.pl 2011-11-10 14:08:47
UTC (rev 744)
@@ -647,6 +647,7 @@

my %connections = (); # We hold the pids for all connection processes to keep
# track of the correct number of connections
+my %sigchild_pids = (); #Hold here the killed childs to delete from
connections
my ($conn, $peer); # We need at least $conn outside the main loop
while (1) {
# We cannot use 'while (my ($conn, $peer) = $http_daemon->accept)', because
@@ -708,6 +709,16 @@
$logger->debug(
"Number of connections increased to " . scalar(keys %connections)
);
+ # Sometimes we have the situation that the
+ # The cild kills before parent has init it
+ # We should chekc the list for this childs
+ # look if killed child exist
+ foreach my $child_pid (keys %sigchild_pids){
+ if ($connections{$child_pid}){
+ delete $connections{$child_pid};
+ delete $sigchild_pids{$child_pid};
+ }
+ }
next;
}

@@ -759,13 +770,13 @@
}

#Create a DataStruct
- my $ds = perfSONAR::DataStruct->new($soap_message->uri,
$nmwg_message);
+ my $ds = perfSONAR::DataStruct->new($soap_message->uri,
$nmwg_message,\%services);
my $nmwg_response;
if ($ds->{ERROROCCUR}){
#Do here response on error
$logger->error("A error occured in creating data struct");
}else{
- $ds->{SERVICES} = \%services;
+ #$ds->{SERVICES} = \%services;
#Run $ds
perfSONAR->handle_request($ds);
}
@@ -955,6 +966,8 @@
"Connection process $pid for connection $connections{$pid} exited"
. $reason
);
+ #save childpid for deleting
+ $sigchild_pids{$pid} = 1;
delete $connections{$pid};
$logger->debug(
"Number of connections decreased to " . scalar(keys %connections)

Modified: branches/perfsonar-oppd-all-0.53/etc/LS_register.xml
===================================================================
--- branches/perfsonar-oppd-all-0.53/etc/LS_register.xml 2011-10-05
09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/etc/LS_register.xml 2011-11-10
14:08:47 UTC (rev 744)
@@ -1,17 +1,12 @@
-<?xml version="1.0"?>
<nmwg:message type="LSRegisterRequest"
id="msg1"
xmlns="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";

xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
-
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";>
+ xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
+
xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
+
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";>

- <!--
-
xmlns:nmtl3="http://ogf.org/schema/network/topology/l3/20070828/";
-
xmlns:nmtb="http://ogf.org/schema/network/topology/base/20070828/";>
- -->
-
<!-- Contains service description with accessPoint which will be the key
in the database! -->

<nmwg:metadata id="serviceLookupInfo">

Modified: branches/perfsonar-oppd-all-0.53/etc/oppd-dev/oppd.dev.conf
===================================================================
--- branches/perfsonar-oppd-all-0.53/etc/oppd-dev/oppd.dev.conf 2011-10-05
09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/etc/oppd-dev/oppd.dev.conf 2011-11-10
14:08:47 UTC (rev 744)
@@ -182,7 +182,7 @@
# Example:
# max_proc 20
#
-#max_proc 5
+max_proc 50



###############################################################################
@@ -219,7 +219,7 @@
# Example:
# keepalive 7200
#
-keepalive 300
+keepalive 3600


#
@@ -243,11 +243,12 @@
# ls_url "http://dc211.internet2.edu:9995/perfSONAR_PS/services/hLS";
# ls_url
"http://loco4.man.poznan.pl:8180/geant2-java-xml-ls/services/LookupService";
#
-ls_url
"http://ls.perfsonar.pionier.net.pl:8180/geant2-java-xml-ls/services/LookupService";
+#ls_url
"http://ls.perfsonar.pionier.net.pl:8180/geant2-java-xml-ls/services/LookupService";
#ls_url "http://psmsu05.aglt2.org:9995/perfSONAR_PS/services/hLS";
#ls_url "http://bby-e-sonar.sfu.ca:8095/perfSONAR_PS/services/hLS";
#ls_url
"http://perfmonc.cesnet.cz:8070/XML-LS-1.1.2/services/LookupService";
#ls_url
"http://ls.sonar.net.switch.ch:8180/XML-LS-1.1.1/services/LookupService";
+ls_url "http://ps3.es.net:8095/perfSONAR_PS/services/hLS";

#
# hostname - Host name sent to the Lookup Service.

Modified: branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/bwctl.conf
===================================================================
--- branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/bwctl.conf
2011-10-05 09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/bwctl.conf
2011-11-10 14:08:47 UTC (rev 744)
@@ -29,10 +29,16 @@
#
<module_param>

+ # Command to execute e.g. "/usr/bin/bwctl" or "/bin/bwctl".
+ # Omitting path searches $PATH.
command "bwctl"
- # Command to execute e.g. "/usr/bin/bwctl" or "/bin/bwctl".
- # Omitting path searches $PATH.
+

+ # service
+ # This is to get different service setting
+ # For example eventtpye
+ service "bwctl"
+
#
# Store functionality
#

Modified: branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/hades.conf
===================================================================
--- branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/hades.conf
2011-10-05 09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/hades.conf
2011-11-10 14:08:47 UTC (rev 744)
@@ -31,11 +31,17 @@
#
<module_param>

+ # Hades domain for which data should be available via this service
config "/etc/hades/hades.conf"
- # Hades domain for which data should be available via this service

+ # service
+ # This is to get different service setting
+ # For example eventtpye
+ service "hades"
+
# You can add further Hades configuration parameters here.
# TODO: pointer to useful documentation
+
</module_param>

</service MA/HADES/MYDOMAIN>

Modified: branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/owamp.conf
===================================================================
--- branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/owamp.conf
2011-10-05 09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/etc/oppd.d.example/owamp.conf
2011-11-10 14:08:47 UTC (rev 744)
@@ -30,11 +30,15 @@
#
<module_param>

+ # Command to execute e.g. "/usr/bin/owping" or "/bin/owping".
+ # Omitting path searches $PATH.
command "owping"
- # Command to execute e.g. "/usr/bin/owping" or "/bin/owping".
- # Omitting path searches $PATH.
-
- #
+
+ # service
+ # This is to get different service setting
+ # For example eventtpye
+ service "owamp"
+
# Store functionality
#
store off # Enable/disable store functionality

Modified: branches/perfsonar-oppd-all-0.53/lib/NMWG/Message.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/NMWG/Message.pm 2011-10-05
09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/lib/NMWG/Message.pm 2011-11-10
14:08:47 UTC (rev 744)
@@ -58,12 +58,12 @@
# ignoring any SOAP header that might be there...
sub parse_xml {
my $self = shift;
- my $source = shift;
- croak "No XML source to parse!" unless $source;
- my $parser = XML::LibXML->new();
+ my $file = shift;
+ croak "No XML source to parse!" unless $file;
+
my $dom;
- eval {
- $dom = $parser->parse_string($source);
+ eval{
+ $dom = XML::LibXML->load_xml(location => $file);
};
if ($@){
#TODO The following should be sent as NMWG error, not SOAP error
@@ -87,10 +87,7 @@
sub parse_xml_from_file {
my $self = shift;
my $file = shift;
- open XMLFILE, "<$file" or croak "Cannot open $file: $!";
- my $result = join "", <XMLFILE>;
- close XMLFILE;
- return $self->parse_xml($result);
+ return $self->parse_xml($file);
}

sub dump {

Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/Client/LS.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/Client/LS.pm 2011-10-05
09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/Client/LS.pm 2011-11-10
14:08:47 UTC (rev 744)
@@ -213,10 +213,14 @@
value => $addr,
);
}
-
- foreach my $et (@{$services{$service}{"eventtype"}}){
- $message->add_element_NS($metanode, "eventType", "$et", $nmwg);
- }
+
+ #We need eventypes only
+ # at the moment nothing more to do
+ my $ds_nmwg = perfSONAR::DataStruct::NMWG->new();
+ #$log->info(Dumper($services{$service}));
+ my $et =
$ds_nmwg->getEventtypeforservice($services{$service}->{handler}{MAINSERVICE});
+ $message->add_element_NS($metanode, "eventType", "$et", $nmwg);
+
my $paramnode = $message->add_attribute (namespace => $nmwg,
parent => $metanode,
nodename => "parameters",
@@ -230,7 +234,6 @@
);
}

-
if ($service =~/MA/){
$services{$service}->{handler}->get_meta_info($message);
}

Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
2011-10-05 09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
2011-11-10 14:08:47 UTC (rev 744)
@@ -86,23 +86,20 @@

push @{$self->{"supportedEventtypes"}},

- ("http://ggf.org/ns/nmwg/tools/bwctl/2.0/";,
- "http://ggf.org/ns/nmwg/tools/iperf/2.0/";,
- "http://ggf.org/ns/nmwg/tools/owamp/2.0/";,
- "http://ggf.org/ns/nmwg/tools/hades/";,
- "http://ggf.org/ns/nmwg/characteristic/delay/summary/";,
- "http://ggf.org/ns/nmwg/tools/owd/raw/";,
- "http://ggf.org/ns/nwmg/tools/hades/aggregated/";,
- "http://ggf.org/ns/nmwg/characteristic/delay/one-way/";,
- "http://ggf.org/ns/nmwg/ops/select/";,
- "http://ggf.org/ns/nmwg/tools/hades/traceroute/hoplist/2.0/";,
- "hades",
- "owamp",
- "bwctl",
- "store",
- "http://schemas.perfsonar.net/tools/admin/echo/2.0";,
- "http://schemas.perfsonar.net/tools/admin/selftest/1.0";
- );
+ {
+ bwctl => "http://ggf.org/ns/nmwg/tools/bwctl/2.0";,
+ iperf => "http://ggf.org/ns/nmwg/tools/iperf/2.0";,
+ owamp => "http://ggf.org/ns/nmwg/tools/owamp/2.0";,
+ hades => "http://ggf.org/ns/nmwg/tools/hades";,
+ summary => "http://ggf.org/ns/nmwg/characteristic/delay/summary/";,
+ owd_raw => "http://ggf.org/ns/nmwg/tools/owd/raw";,
+ hades_agg => "http://ggf.org/ns/nwmg/tools/hades/aggregated";,
+ one_way_delay => "http://ggf.org/ns/nmwg/characteristic/delay/one-way/";,
+ select => "http://ggf.org/ns/nmwg/ops/select/";,
+ hoplist => "http://ggf.org/ns/nmwg/tools/hades/traceroute/hoplist/2.0/";,
+ echo => "http://schemas.perfsonar.net/tools/admin/echo/2.0";,
+ selftest => "http://schemas.perfsonar.net/tools/admin/selftest/1.0";
+ };

bless $self, $class;
return $self;
@@ -139,8 +136,8 @@
#Now get the new messagetype
$messagetype = $ds->{REQUESTMSG}->get_message_type();

- my @module_ets = @{$self->{"supportedEventtypes"}};
-
+ my %module_ets = %{pop(@{$self->{"supportedEventtypes"}})};
+
#create {"dataIDs"} and {"metadataIDs"}
#hashes from document
my ($errorstring, $metaid) = $ds->{REQUESTMSG}->parse_all;
@@ -184,15 +181,15 @@
}

my $found = undef;
- foreach my $sup_et (@module_ets){
- next unless ($sup_et =~ /$et/);
+ foreach my $key (keys %module_ets){
+ next unless ($module_ets{$key} =~ /$et/);
$found = 1;
}

if (!defined $found){
my $errorstring = "Unknown eventType: $et";
$self->{LOGGER}->error($errorstring);
-
$ds->{REQUESTMSG}->return_result_code("error.common.parse_error",
$errorstring, $meta);
+
$ds->{REQUESTMSG}->return_result_code("error.common.event_type_not_supported",
$errorstring, $meta);
$ds->{ERROROCCUR} = 1;
return;
}
@@ -727,6 +724,31 @@

}

+=head2 getEventtypeforservice(string service)
+For every service is a eventtpye defined. this eventtype can be get here.
+to get the eventtype this function needs the service. Service can be:
+ owamp : OWAMP MP, owampd or owamp2hades
+ bwctl : BWCTL MP and bwctld
+ iperf : for iperf tool
+ hades : HADES MA
+ summary : For summary
+ ...
+ have a look to supportedEventypes hash above

+The function return the full eventtype URL liek
+=cut
+sub getEventtypeforservice{
+ my ($self, $service) = @_;
+ my %module_ets = %{pop(@{$self->{"supportedEventtypes"}})};
+
+ if ($service){
+ return $module_ets{$service};
+ }else{
+ return -1;
+ }

+}
+
+
+
1;

Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct.pm
2011-10-05 09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct.pm
2011-11-10 14:08:47 UTC (rev 744)
@@ -85,14 +85,14 @@
=cut

sub new {
- my ( $class, $uri, $msg ) = @_;
+ my ( $class, $uri, $msg, $services_ref ) = @_;
my $self = {};
$self->{LOGGER} = get_logger(__PACKAGE__);
$self->{ERROROCCUR} = 0; #If error occur set to 1
$self->{STORE}->{DOIT} = undef;
$self->{ERRMSG} = ""; #If error occur look here for error message at
the moment only string message is supported
$self->{SERVICE} = undef; #The request message
- $self->{SERVICES} = ();
+ $self->{SERVICES} = $services_ref;
$self->{RETURNMSG} = undef;
$self->{PARAMS} = {}; #The measurement parameters defined by a ID
$self->{DOECHO} = 0; #Do a status report for the selected service

Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MA.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MA.pm 2011-10-05
09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MA.pm 2011-11-10
14:08:47 UTC (rev 744)
@@ -52,6 +52,7 @@
my $self = {};
$self->{LOGGER} = get_logger(__PACKAGE__);
$self->{MODPARAM} = %module_param;
+ $self->{MAINSERVICE} = $module_param{service};
bless $self, $class;
return $self;
}

Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm 2011-10-05
09:17:15 UTC (rev 743)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm 2011-11-10
14:08:47 UTC (rev 744)
@@ -105,6 +105,7 @@
$self->{LOGGER} = get_logger(__PACKAGE__);
if (exists $module_param{command}){
$self->{COMMAND} = $module_param{command};
+ $self->{MAINSERVICE} = $module_param{service};
my $ret = `which $self->{COMMAND} 2>/dev/null`;
if ( length $ret <= 0 ){
my @errmsg;

Added:
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/send_paralellel_echo.sh
===================================================================
---
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/send_paralellel_echo.sh
(rev 0)
+++
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/send_paralellel_echo.sh
2011-11-10 14:08:47 UTC (rev 744)
@@ -0,0 +1,7 @@
+#!/bin/bash
+for i in {10..40}
+ do
+ OUTFILE="$i.txt"
+ ./bwctl-test-calim ../../lib/NMWG/examples/2.0/EchoRequest.xml >
$OUTFILE &
+ done
+


Property changes on:
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/send_paralellel_echo.sh
___________________________________________________________________
Added: svn:executable
+ *



  • [pS-dev] [GEANT/SA2/SA2T3-OPPD] r744 - in branches/perfsonar-oppd-all-0.53: bin etc etc/oppd-dev etc/oppd.d.example lib/NMWG lib/perfSONAR lib/perfSONAR/Client lib/perfSONAR/DataStruct tools/perfSONAR-client, svn-noreply, 11/10/2011

Archive powered by MHonArc 2.6.16.

Top of Page