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 2014/11/19 20:40:03 UTC
svn commit: r1640621 - /vcl/trunk/managementnode/lib/VCL/Module/OS.pm
Author: fapeeler
Date: Wed Nov 19 19:40:03 2014
New Revision: 1640621
URL: http://svn.apache.org/r1640621
Log:
VCL-799
renamed routine update_cluster
for each cluster node's IPaddress update the current reservation's node firewall
Modified:
vcl/trunk/managementnode/lib/VCL/Module/OS.pm
Modified: vcl/trunk/managementnode/lib/VCL/Module/OS.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS.pm?rev=1640621&r1=1640620&r2=1640621&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS.pm Wed Nov 19 19:40:03 2014
@@ -3666,15 +3666,16 @@ sub firewall_compare_update {
#/////////////////////////////////////////////////////////////////////////////
-=head2 update_cluster_info
+=head2 update_cluster
Parameters :data hash
Returns : 0 or 1
- Description :
+ Description : creates or updates the cluster_info file
+ updates firewall so each node can communicate
=cut
-sub update_cluster_info {
+sub update_cluster {
my $self = shift;
if (ref($self) !~ /VCL::Module/i) {
@@ -3711,6 +3712,14 @@ sub update_cluster_info {
push(@cluster_string, "child= $request_data->{reservation}{$rid}{computer}{IPaddress}" . "\n");
notify($ERRORS{'DEBUG'}, 0, "writing child= $request_data->{reservation}{$rid}{computer}{IPaddress}");
}
+
+ #Create iptables rule for each node in cluster on the node being processed
+ # Could slow things down for large clusters, but they can communicate with each other
+ if ($self->can('enable_firewall_port')) {
+ if (!$self->enable_firewall_port("tcp", "any", $request_data->{reservation}{$rid}{computer}{IPaddress}, 0)) {
+ notify($ERRORS{'DEBUG'}, 0, "adding $request_data->{reservation}{$rid}{computer}{IPaddress} to iptables");
+ }
+ }
}
if (open(CLUSTERFILE, ">$cluster_info")) {