You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2010/08/06 18:46:14 UTC

svn commit: r983047 - in /incubator/vcl/trunk: managementnode/etc/vcl/vcld.conf managementnode/lib/VCL/DataStructure.pm managementnode/lib/VCL/utils.pm mysql/vcl.sql

Author: fapeeler
Date: Fri Aug  6 16:46:14 2010
New Revision: 983047

URL: http://svn.apache.org/viewvc?rev=983047&view=rev
Log:
VCL-224

Moved NOT_STANDALONE to db


Modified:
    incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf
    incubator/vcl/trunk/managementnode/lib/VCL/DataStructure.pm
    incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
    incubator/vcl/trunk/mysql/vcl.sql

Modified: incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf?rev=983047&r1=983046&r2=983047&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf (original)
+++ incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf Fri Aug  6 16:46:14 2010
@@ -132,10 +132,3 @@ jabResource=vcl
 
 # Windows node root password
 WINDOWS_ROOT_PASSWORD=cl0udy
-
-# NOT_STANDALONE:
-# Used to specify affiliations whose users should NOT have the STANDALONE flag set
-# This causes users accounts to NOT be added to Linux reservations for the affiliations specified
-# The format is a comma-separated list of affiliation names
-# Notice: this property should NOT be configured for most deployments
-NOT_STANDALONE=

Modified: incubator/vcl/trunk/managementnode/lib/VCL/DataStructure.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/DataStructure.pm?rev=983047&r1=983046&r2=983047&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/DataStructure.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/DataStructure.pm Fri Aug  6 16:46:14 2010
@@ -468,6 +468,7 @@ $SUBROUTINE_MAPPINGS{management_node_pub
 
 $SUBROUTINE_MAPPINGS{management_node_sysadmin_email}	= '$ENV{management_node_info}{SYSADMIN_EMAIL}';
 $SUBROUTINE_MAPPINGS{management_node_shared_email_box}    = '$ENV{management_node_info}{SHARED_EMAIL_BOX}';
+$SUBROUTINE_MAPPINGS{management_node_not_standalone}    = '$ENV{management_node_info}{NOT_STANDALONE}';
 
 $SUBROUTINE_MAPPINGS{management_node_predictive_module_name}         = '$ENV{management_node_info}{predictive_name}';
 $SUBROUTINE_MAPPINGS{management_node_predictive_module_pretty_name}  = '$ENV{management_node_info}{predictive_prettyname}';

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=983047&r1=983046&r2=983047&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Fri Aug  6 16:46:14 2010
@@ -219,7 +219,6 @@ our @EXPORT = qw(
   $LOGFILE
   $MYSQL_SSL
   $MYSQL_SSL_CERT
-  $NOT_STANDALONE
   $PIDFILE
   $PROCESSNAME
   $WINDOWS_ROOT_PASSWORD
@@ -257,9 +256,6 @@ INIT {
 	# Set the VERBOSE flag to 0 by default
 	our $VERBOSE = 0;
 	
-	# Set the NOT_STANDALONE flag to an empty string by default
-	our $NOT_STANDALONE = "";
-	
 	# Set the SETUP_MODE flag to 0 by default
 	our $SETUP_MODE = 0;
 	
@@ -426,9 +422,6 @@ INIT {
 				$VERBOSE = $1;
 			}
 			
-			if ($l =~ /^NOT_STANDALONE=(.*)/i) {
-				$NOT_STANDALONE = $1;
-			}
 		}    # Close foreach line in conf file
 	}    # Close open conf file
 
@@ -491,7 +484,6 @@ our $VERBOSE;
 our $CONF_FILE_PATH;
 our $WINDOWS_ROOT_PASSWORD;
 our ($XMLRPC_USER, $XMLRPC_PASS, $XMLRPC_URL);
-our $NOT_STANDALONE;
 our $DAEMON_MODE;
 our $SETUP_MODE;
 our $BIN_PATH;
@@ -4582,7 +4574,11 @@ sub get_request_info {
 	
 	# Affiliation specific changes
 	# Check if the user's affiliation is listed in the $NOT_STANDALONE variable
-	if (grep(/$request_info{user}{affiliation}{name}/, split(/,/, $NOT_STANDALONE))) {
+	my $not_standalone_list = "";
+	if(defined($ENV{management_node_info}{NOT_STANDALONE}) && $ENV{management_node_info}{NOT_STANDALONE}){
+		$not_standalone_list = $ENV{management_node_info}{NOT_STANDALONE};
+	} 
+	if (grep(/$request_info{user}{affiliation}{name}/, split(/,/, $not_standalone_list))) {
 		notify($ERRORS{'DEBUG'}, 0, "non-standalone affiliation found: $request_info{user}{affiliation}{name}");
 	}
 	else {
@@ -6087,6 +6083,9 @@ AND managementnode.id != $management_nod
 	$management_node_info->{SYSADMIN_EMAIL} = $management_node_info->{sysadminEmailAddress};
 	$management_node_info->{SHARED_EMAIL_BOX} = $management_node_info->{sharedMailBox};
 	
+	# Add affiliations that are not to use the standalone passwords
+	$management_node_info->{NOT_STANDALONE}	= $management_node_info->{NOT_STANDALONE};
+	
 	# Set the management_node_info environment variable if the info was retrieved for this computer
 	$ENV{management_node_info} = $management_node_info if ($management_node_identifier eq $hostname);
 

Modified: incubator/vcl/trunk/mysql/vcl.sql
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/mysql/vcl.sql?rev=983047&r1=983046&r2=983047&view=diff
==============================================================================
--- incubator/vcl/trunk/mysql/vcl.sql (original)
+++ incubator/vcl/trunk/mysql/vcl.sql Fri Aug  6 16:46:14 2010
@@ -502,6 +502,7 @@ CREATE TABLE IF NOT EXISTS `managementno
   `publicDNSserver` varchar(56) default NULL,
   `sysadminEmailAddress` varchar(128) default NULL,
   `sharedMailBox` varchar(128) default NULL,
+  `NOT_STANDALONE` varchar(128) default NULL,
   PRIMARY KEY  (`id`),
   KEY `stateid` (`stateid`),
   KEY `ownerid` (`ownerid`),