[gavia-ms-commit] r1287 - in branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise: . pkgdata
commit at globus.org
commit at globus.org
Thu Jul 30 14:00:48 CDT 2009
Author: andre
Date: 2009-07-30 14:00:47 -0500 (Thu, 30 Jul 2009)
New Revision: 1287
Modified:
branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/Makefile.am
branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/gavia-resource-advertise.in
branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/pkgdata/pkg_data_src.gpt.in
branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/setup-gavia-resource-advertise.pl
Log:
checkpoint commit to testing branch
Modified: branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/Makefile.am
===================================================================
--- branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/Makefile.am 2009-07-30 17:09:26 UTC (rev 1286)
+++ branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/Makefile.am 2009-07-30 19:00:47 UTC (rev 1287)
@@ -6,7 +6,11 @@
setup_SCRIPTS = \
setup-gavia-resource-advertise \
setup-gavia-resource-advertise.pl \
- find-gavia-resource-advertise-tools
+ find-gavia-resource-advertise-tools \
+ condor_config.in \
+ gavia-resource-advertise.conf.in \
+ gavia-resource-advertise.in \
+ rp-provider-config.xml.in
EXTRA_DIST = $(setup_SCRIPTS)
Modified: branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/gavia-resource-advertise.in
===================================================================
--- branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/gavia-resource-advertise.in 2009-07-30 17:09:26 UTC (rev 1286)
+++ branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/gavia-resource-advertise.in 2009-07-30 19:00:47 UTC (rev 1287)
@@ -15,7 +15,7 @@
# -a | -b [broker_name[, broker_name] ]
# advertise to the borker.
# The broker(s) names are given as comma or space separated list,
-# either after this option or in classad.conf
+# either after this option or in gavia-resource-advertise.conf
# If none of -a -b is present, only generate classAd
# but do not advertise it to the broker
#
@@ -46,14 +46,14 @@
#
# Setup
#
-# 1. Create the file classad.conf (default location ~/.condor) and insert
+# 1. Create the file gavia-resource-advertise.conf (default location ~/.condor) and insert
# in it at least these attributes:
#
# queue_name = "grid" // the queue that the outside world sees
# pbs_home = /path/to/pbs
# condor_home = /path/to/condor
#
-# Other attrs that can be defined in classad.conf are
+# Other attrs that can be defined in gavia-resource-advertise.conf are
#
# grid_type = gt4 // GT version: gt4 || gt2
# lrms_host = "venus" // Name of machine running LRMS, default = localhost
@@ -219,9 +219,9 @@
\$CLASSAD_CONFIG environment variable ||
- /etc/condor/classad.conf ||
+ /etc/condor/gavia-resource-advertise.conf ||
- \$HOME/.condor/classad.conf
+ \$HOME/.condor/gavia-resource-advertise.conf
@@ -243,25 +243,25 @@
# Configurable values
#
-my $classad_config; # path to classad.conf
+my $classad_config; # path to gavia-resource-advertise.conf
-my $pbs_home = undef; # defined in classad.conf
-my $condor_home = undef; # defined in classad.conf
-my $condor_config = undef; # must be defined in classad.conf
+my $pbs_home = undef; # defined in gavia-resource-advertise.conf
+my $condor_home = undef; # defined in gavia-resource-advertise.conf
+my $condor_config = undef; # must be defined in gavia-resource-advertise.conf
# if condor_config is not in the
# places where condor looks for it
my $resource_name = undef; # name of the advertised resource
# if not set on cmd line with -r, look
- # in classad.conf and default to hostname
+ # in gavia-resource-advertise.conf and default to hostname
my $probe_interval = undef; # Period after which the classad is refreshed
my $name_space = undef; # Name space to use for classad attrs
# Legal values: free, glue_xml
-my $queue_name; # exec queue defined on cmdline || in classad.conf
-my $input_queue; # optional input (routing) queue defined in classad.conf
+my $queue_name; # exec queue defined on cmdline || in gavia-resource-advertise.conf
+my $input_queue; # optional input (routing) queue defined in gavia-resource-advertise.conf
# if not defined, assume $input_queue = $queue_name
my $queue_ref; # ref to $queue{$queue_name}{$attr_name}, i.e., to %queue_resource
@@ -284,7 +284,7 @@
my $ncpusReserved = 0; # number of CPUs reserved for other queues
# which cannot be counted as available for this queue
- # may be defined in classad.conf
+ # may be defined in gavia-resource-advertise.conf
my $grid_type = undef; # Default is GT 4
@@ -298,7 +298,7 @@
# NOTE
-# Instead of defining $ncpusReserved in classad.conf with
+# Instead of defining $ncpusReserved in gavia-resource-advertise.conf with
# reserved_cpus = 10
# may extract it from PBS
# Ex: on mercury.uvic.ca the MAUI cfg file is
@@ -311,7 +311,7 @@
-my $broker_name; # defined on cmdline && in classad.conf
+my $broker_name; # defined on cmdline && in gavia-resource-advertise.conf
# Machines running condor_collector
my $advertise = 0; # Flag to enable condor_advertise
@@ -337,12 +337,12 @@
GetOptions(
'grid_type:s' => \$grid_type, # Type of Grid
- 'queue=s' => \$queue_name, # override value in classad.conf
+ 'queue=s' => \$queue_name, # override value in gavia-resource-advertise.conf
'advertise' => \$advertise, # if advertise, must also specify
- # $broker_name here or in classad.conf
+ # $broker_name here or in gavia-resource-advertise.conf
- 'broker:s' => \$broker_name, # given here, or in classad.conf
+ 'broker:s' => \$broker_name, # given here, or in gavia-resource-advertise.conf
'resource=s' => \$resource_name,
@@ -411,12 +411,12 @@
#
-# Look up the file classad.conf in these places:
+# Look up the file gavia-resource-advertise.conf in these places:
#
# 0. option given with -c on cmd line
# 1. CLASSAD_CONFIG env var
-# 2. /etc/condor/classad.conf
-# 3. $HOME/.condor/classad.conf
+# 2. /etc/condor/gavia-resource-advertise.conf
+# 3. $HOME/.condor/gavia-resource-advertise.conf
#
my $search = "/etc/condor/ or \$HOME/.condor/ and \n" .
@@ -432,16 +432,16 @@
$classad_config = $ENV{CLASSAD_CONFIG};
$search = "CLASSAD_CONFIG = $ENV{CLASSAD_CONFIG}";
}
-elsif ( -s "/etc/condor/classad.conf" ) {
- $classad_config = "/etc/condor/classad.conf";
+elsif ( -s "/etc/condor/gavia-resource-advertise.conf" ) {
+ $classad_config = "/etc/condor/gavia-resource-advertise.conf";
}
-elsif ( -s $ENV{HOME}."/.condor/classad.conf" ) {
- $classad_config = $ENV{HOME}."/.condor/classad.conf";
+elsif ( -s $ENV{HOME}."/.condor/gavia-resource-advertise.conf" ) {
+ $classad_config = $ENV{HOME}."/.condor/gavia-resource-advertise.conf";
}
# Make sure the file exists and is not empty
if ( ! $classad_config || ! -f $classad_config ) {
- die "File classad.conf not found in " . $search . "\n";
+ die "File gavia-resource-advertise.conf not found in " . $search . "\n";
}
@@ -452,7 +452,7 @@
#
-# Get all configuration values from classad.conf
+# Get all configuration values from gavia-resource-advertise.conf
#
my %config ;
@@ -461,7 +461,7 @@
chomp $_;
- # Fetch key = value pairs from classad.conf
+ # Fetch key = value pairs from gavia-resource-advertise.conf
my $key;
my $value;
@@ -515,11 +515,11 @@
$show_cn = get_boolean($show_cn, "show_cn" );
# If $probe_interval not defined on cmd line, get it from
-# classad.conf if available, or default to 0 otherwise
+# gavia-resource-advertise.conf if available, or default to 0 otherwise
$probe_interval = $config{probe_interval} if ( !defined($probe_interval) );
$probe_interval = 0 if ( !defined($probe_interval) );
-# Get $name_space from classad.conf if available, or default to "free"
+# Get $name_space from gavia-resource-advertise.conf if available, or default to "free"
$name_space = $config{name_space} if ( !defined($name_space) );
$name_space = "glue_xml" if ( !defined($name_space) );
@@ -543,14 +543,14 @@
#
if ( ! $queue_name ) {
- print "Error: queue_name not set in classad.conf or command line\n";
+ print "Error: queue_name not set in gavia-resource-advertise.conf or command line\n";
exit(1);
}
elsif ( ! $broker_name && $advertise ) {
- die "Error: broker_name not set in classad.conf or command line";
+ die "Error: broker_name not set in gavia-resource-advertise.conf or command line";
}
elsif ( ! $condor_home && $advertise ) {
- die "Error: condor_home not set in classad.conf";
+ die "Error: condor_home not set in gavia-resource-advertise.conf";
}
elsif ( ! -x $condor_home."/sbin" && $advertise ) {
die "Error: the Condor directory $condor_home/sbin is not reachable";
@@ -558,7 +558,7 @@
elsif ( $lrms == LRMS_PBS ) {
if ( ! $pbs_home ) {
- die "Error: pbs_home not set in classad.conf";
+ die "Error: pbs_home not set in gavia-resource-advertise.conf";
}
elsif ( ! -x $pbs_home."/bin" ) {
die "Error: the PBS directory $pbs_home/bin is not reachable";
@@ -622,7 +622,7 @@
("# %s\n# %s\n# %s\n# %s\n",
"WARNING",
" cannot advertise: condor_config not found in either",
- " condor_config attribute in classad.conf or env var",
+ " condor_config attribute in gavia-resource-advertise.conf or env var",
" CONDOR_CONFIG or default locations /etc/condor/ or ~condor/"
);
}
Modified: branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/pkgdata/pkg_data_src.gpt.in
===================================================================
--- branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/pkgdata/pkg_data_src.gpt.in 2009-07-30 17:09:26 UTC (rev 1286)
+++ branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/pkgdata/pkg_data_src.gpt.in 2009-07-30 19:00:47 UTC (rev 1287)
@@ -1,36 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE gpt_package_metadata SYSTEM "package.dtd">
+<?xml version= "1.0" encoding= "UTF-8" ?>
+<!DOCTYPE gpt_package_metadata SYSTEM "package.dtd" >
-<gpt_package_metadata Format_Version="0.02" Name="gavia-resource-advertise-setup" >
+<gpt_package_metadata Format_Version= "0.02" Name= "gavia_resource_advertise" >
- <Aging_Version Age="0" Major="0" Minor="1" />
- <Description >Gavia Resource Information Provider Setup</Description>
- <Functional_Group >ResourceManagement</Functional_Group>
- <Version_Stability Release="Beta" />
-
- <src_pkg >
-
- <With_Flavors build="no" />
-
- <Build_Environment >
- <cflags >@GPT_PKG_CFLAGS@</cflags>
- <external_includes >@GPT_EXTERNAL_INCLUDES@</external_includes>
- <pkg_libs > </pkg_libs>
- <external_libs >@GPT_EXTERNAL_LIBS@</external_libs>
- </Build_Environment>
-
- <Post_Install_Message >
- Run the setup-globus-scheduler-provider-gavia setup script to create the gavia scheduler provider program.
- </Post_Install_Message>
-
- <Post_Install_Program >
- setup-gavia-resource-advertise
- </Post_Install_Program>
-
- <Setup Name="gavia-resource-advertise-setup" >
- <Aging_Version Age="0" Major="0" Minor="1" />
- </Setup>
-
- </src_pkg>
-
-</gpt_package_metadata>
+ <Aging_Version Age= "0" Major= "0" Minor= "1" />
+ <Description >GAVIA Resource Advertise Component</Description>
+ <Functional_Group >ResourceManagement</Functional_Group>
+ <Version_Stability Release= "Beta" />
+ <src_pkg >
+
+ <With_Flavors build= "no" />
+
+ <Build_Environment >
+ <cflags >@GPT_CFLAGS@</cflags>
+ <external_includes >@GPT_EXTERNAL_INCLUDES@</external_includes>
+ <pkg_libs > </pkg_libs>
+ <external_libs >@GPT_EXTERNAL_LIBS@</external_libs>
+ </Build_Environment>
+
+ <Post_Install_Message >
+ </Post_Install_Message>
+
+ <Post_Install_Program >
+ setup-gavia-resource-advertise
+ </Post_Install_Program>
+
+ <Setup Name= "gavia_resource_advertise" >
+ <Aging_Version Age= "0" Major= "0" Minor= "1" />
+ </Setup>
+
+ </src_pkg>
+
+</gpt_package_metadata>
Modified: branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/setup-gavia-resource-advertise.pl
===================================================================
--- branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/setup-gavia-resource-advertise.pl 2009-07-30 17:09:26 UTC (rev 1286)
+++ branches/gavia-resource-advertise_new/MetaScheduling/GridResourceAdvertise/setup-gavia-resource-advertise.pl 2009-07-30 19:00:47 UTC (rev 1287)
@@ -33,8 +33,6 @@
my $libexecdir = "$globusdir/libexec";
my $pgm_file = "$globusdir/libexec/gavia-resource-advertise";
-# create dir for program
-# mkdir $libexecdir . "/gram_providers", 0777;
# Do script relocation
if($condor_os ne '')
@@ -46,7 +44,8 @@
$c_opts .= " --with-condor-arch=$condor_arch";
}
-$c_opts .= " --gavia-resource-advertise-path=$pgm_file"
+$c_opts .= " --gavia-resource-advertise-path=$pgm_file";
+
print `./find-gavia-resource-advertise-tools $c_opts --cache-file=/dev/null`;
if($? != 0)
@@ -58,6 +57,59 @@
# Set executable permissions for script
chmod(0755, $pgm_file) || die "Can't set permissions on $pgm_file\n";
+# Copy rp-provider-config.xml at the right location. Make sure not
+# to override already existing files.
+install_file("rp-provider-config.xml", $globusdir . "/etc/globus_wsrf_mds_index/rp-provider-config.xml");
+
+# Check if the RPProvider seems to be enabled...
+open(FILE,"$globusdir/etc/globus_wsrf_mds_index/server-config.wsdd");
+if (grep{/ResourcePropertyProviderCollection/} <FILE>)
+{
+ print "It looks like your Globus installation has the RPProvider enabled.\nNo changes will be made to $globusdir/etc/globus_wsrf_mds_index/server-config.wsdd\n";
+}
+else
+{
+ print "It looks like your Globus installation does not have the RRProvider enabled.\n";
+ print "Please see the gavia-resource-advertise documentation for instructions on how to enable the RPProvider.\n";
+}
+close FILE;
+
+open(FILE,"$globusdir/etc/globus_wsrf_mds_index/upstream.xml");
+if (grep{/GaviaResourceRP/} <FILE>)
+{
+}
+else
+{
+ print "If you would like to upstream the Gavia resource information to another MDS, simply add the following to $globusdir/etc/globus_wsrf_mds_index/upstream.xml file:\n\n";
+ print <<"VERBATIM";
+ <Content xsi:type="agg:AggregatorContent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:agg="http://mds.globus.org/aggregator/types">
+
+ <agg:AggregatorConfig xsi:type="agg:AggregatorConfig">
+ <agg:GetResourcePropertyPollType
+ xmlns:wssg= "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" >
+ <!-- Specifies that the upstream index should refresh information
+ every 1 minutes -->
+ <agg:PollIntervalMillis>60000</agg:PollIntervalMillis>
+
+ <!-- specified that the upstream index should collect the
+ GaviaResourceRP resource properties from this index -->
+ <agg:ResourcePropertyName xmlns:ns1="http://gavia/resourceInfoProvider">ns1:GaviaResourceRP</agg:ResourcePropertyName>
+
+ </agg:GetResourcePropertyPollType>
+ </agg:AggregatorConfig>
+ <agg:AggregatorData/>
+ </Content>
+VERBATIM
+ print "Also make sure that the MDS to upstream to is listed in $globusdir/etc/globus_wsrf_mds_index/hierarchy.xml\n";
+}
+close FILE;
+
+
+
+print "*** Note that this module requires a container restart. ***\n";
+
$metadata->finish();
sub usage
@@ -68,3 +120,22 @@
" [-condor-arch=CONDOR ARCH]\n";
exit 1;
}
+
+sub install_file
+{
+ # This function is used to simply check if a file already exist
+ # before installing it. If the file already exist, then a
+ # message will be printed and the file with not be overwritten.
+
+ my($source_file, $target_file) = @_;
+ if(-e "$target_file")
+ {
+ print "$target_file already exist; keeping existing version\n";
+ }
+ else
+ {
+ print "Installing $target_file\n";
+ copy("$source_file", "$target_file") or die "File cannot be copied.";
+ }
+}
+
More information about the gavia-ms-commit
mailing list