svn commit: r982350 - in /incubator/vcl/trunk/managementnode: etc/vcl/vcld.conf lib/VCL/Module/OS/Linux.pm lib/VCL/Module/OS/Linux/Ubuntu.pm lib/VCL/utils.pm

2010-08-04 Thread fapeeler
Author: fapeeler
Date: Wed Aug  4 18:25:34 2010
New Revision: 982350

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

removed ETHDEVICE from vcld.conf
utils.pm: set failover routine setstaticaddress to use eth1
OS modules use the network_configuration data to determine the public
interface name

VCL-352
Ubuntu.pm - added pre-capture calls to set rc.local,sshd config and ext_sshd 
startup script


Modified:
incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm
incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Modified: incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf?rev=982350r1=982349r2=982350view=diff
==
--- incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf (original)
+++ incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf Wed Aug  4 18:25:34 
2010
@@ -151,8 +151,6 @@ jabResource=vcl
 # Windows node root password
 WINDOWS_ROOT_PASSWORD=cl0udy
 
-#ETHDEVICE=eth1
-
 # 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

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=982350r1=982349r2=982350view=diff
==
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Wed Aug  4 
18:25:34 2010
@@ -152,29 +152,9 @@ sub pre_capture {
}
 
if ($ip_configuration eq static) {
-   #so we don't have conflicts we should set the public adapter 
back to dhcp
-   # reset ifcfg-eth1 back to dhcp
-   # when boot strap it will be set to dhcp
-   my @ifcfg;
-   my $tmpfile = /tmp/createifcfg$computer_node_name;
-   push(@ifcfg, DEVICE=eth1\n);
-   push(@ifcfg, BOOTPROTO=dhcp\n);
-   push(@ifcfg, STARTMODE=onboot\n);
-   push(@ifcfg, ONBOOT=yes\n);
-   #write to tmpfile
-   if (open(TMP, $tmpfile)) {
-   print TMP @ifcfg;
-   close(TMP);
-   }
-   else {
-   #print could not write $tmpfile $!\n;
-   notify($ERRORS{'OK'}, 0, could not write $tmpfile $!);
-   }
-   #copy to node
-   if (run_scp_command($tmpfile, 
$computer_node_name:/etc/sysconfig/network-scripts/ifcfg-$ETHDEVICE, 
$management_node_keys)) {
-   }
-   if (unlink($tmpfile)) {
-   }
+   if ($self-can(set_static_public_address)  
$self-set_static_public_address()) {
+notify($ERRORS{'DEBUG'}, 0, set static public IP 
address on $computer_node_name using set_static_public_address() method);
+}
} ## end if ($ip_configuration eq static)
 
#Write /etc/rc.local script
@@ -468,7 +448,7 @@ sub set_static_public_address {
notify($ERRORS{'OK'}, 0, initiating Linux set_static_public_address on 
$computer_short_name);
my @eth1file;
my $tmpfile = /tmp/ifcfg-eth_device-$computer_short_name;
-   push(@eth1file, DEVICE=eth1\n);
+   push(@eth1file, DEVICE=$public_interface_name\n);
push(@eth1file, BOOTPROTO=static\n);
push(@eth1file, IPADDR=$public_ip_address\n);
push(@eth1file, NETMASK=$subnet_mask\n);
@@ -496,7 +476,7 @@ sub set_static_public_address {
 
#confirm it got there
undef @sshcmd;
-   @sshcmd = run_ssh_command($computer_short_name, 
$management_node_keys, cat /etc/sysconfig/network-scripts/ifcfg-$ETHDEVICE, 
root);
+   @sshcmd = run_ssh_command($computer_short_name, 
$management_node_keys, cat 
/etc/sysconfig/network-scripts/ifcfg-$public_interface_name, root);
my $success = 0;
foreach my $i (@{$sshcmd[1]}) {
if ($i =~ /$public_ip_address/) {

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm?rev=982350r1=982349r2=982350view=diff
==
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux/Ubuntu.pm Wed 
Aug  4 18:25:34 2010
@@ -103,30 +103,36 @@ sub capture_prepare {

svn commit: r982363 - /incubator/vcl/trunk/web/.ht-inc/computers.php

2010-08-04 Thread fapeeler
Author: fapeeler
Date: Wed Aug  4 18:58:02 2010
New Revision: 982363

URL: http://svn.apache.org/viewvc?rev=982363view=rev
Log:
VCL-335

set maxlength to 6 and limit to 512000MB


Modified:
incubator/vcl/trunk/web/.ht-inc/computers.php

Modified: incubator/vcl/trunk/web/.ht-inc/computers.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/computers.php?rev=982363r1=982362r2=982363view=diff
==
--- incubator/vcl/trunk/web/.ht-inc/computers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/computers.php Wed Aug  4 18:58:02 2010
@@ -696,7 +696,7 @@ function editOrAddComputer($state) {
}
print   TR\n;
print TH align=rightRAM (MB):/TH\n;
-   print TDINPUT type=text name=ram maxlength=5 value=;
+   print TDINPUT type=text name=ram maxlength=6 value=;
print $data[ram] . /TD\n;
print TD;
printSubmitErr(RAMERR);
@@ -1215,7 +1215,7 @@ function bulkAddComputer() {
print   /TR\n;
print   TR\n;
print TH align=right nowrapRAM (MB)*:/TH\n;
-   print TDINPUT type=text name=ram maxlength=5 value=;
+   print TDINPUT type=text name=ram maxlength=6 value=;
print $data[ram] . /TD\n;
print TD;
printSubmitErr(RAMERR);
@@ -2928,9 +2928,9 @@ function processComputerInput($checks=1)
   $submitErr |= IPADDRERR;
   $submitErrMsg[IPADDRERR] = There is already a computer with this IP 
address.;
}*/
-   if($return[ram]  32 || $return[ram]  20480) {
+   if($return[ram]  32 || $return[ram]  512000) {
   $submitErr |= RAMERR;
-  $submitErrMsg[RAMERR] = RAM must be between 32 and 20480;
+  $submitErrMsg[RAMERR] = RAM must be between 32 and 512000;
}
if($return[procspeed]  500 || $return[procspeed]  2) {
   $submitErr |= PROCSPEEDERR;
@@ -3156,9 +3156,9 @@ function processBulkComputerInput($check
}
}
}
-   if($return[ram]  32 || $return[ram]  20480) {
+   if($return[ram]  32 || $return[ram]  512000) {
   $submitErr |= RAMERR;
-  $submitErrMsg[RAMERR] = RAM must be between 32 and 20480;
+  $submitErrMsg[RAMERR] = RAM must be between 32 and 512000;
}
if($return[procspeed]  500 || $return[procspeed]  2) {
   $submitErr |= PROCSPEEDERR;