SQUASH : Samba3.pm clusteredmember
authorMichael Adam <obnox@samba.org>
Thu, 20 Oct 2011 10:54:29 +0000 (12:54 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 20 Oct 2011 11:17:17 +0000 (13:17 +0200)
selftest/target/Samba3.pm

index 4be766663f3ead502c784cb55314b784c55bfcde..993b55940475e657012c93f98ec6fd6900011557 100755 (executable)
@@ -1238,11 +1238,7 @@ sub setup_ctdb($$)
 
        print "PROVISIONING CTDB...";
 
-       # Give it a high ip that is (hopfully) not used elsewhere.
-       # What is the mechanism here?
-       my $private_if = 100;
-
-       my $vars = $self->provision_ctdb($prefix, $public_if, $private_if);
+       my $vars = $self->provision_ctdb($prefix, $public_if);
 
        $vars or return undef;
 
@@ -1269,6 +1265,8 @@ sub check_or_start_ctdb($$) {
                open STDOUT, ">$env_vars->{CTDBD_TEST_LOG}";
                open STDERR, '>&STDOUT';
 
+               SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE});
+
                my @preargs = (Samba::bindir_path($self, "timelimit"), $self->{server_maxtime});
                if(defined($ENV{CTDBD_VALGRIND})) {
                        @preargs = split(/ /, $ENV{CTDBD_VALGRIND});
@@ -1294,14 +1292,15 @@ sub check_or_start_ctdb($$) {
        return 0;
 }
 
-sub provision_ctdb($$$$$)
+sub provision_ctdb($$$$)
 {
-       my ($self, $prefix, $priviface, $pubiface, $no_delete_prefix) = @_;
+       my ($self, $prefix, $pub_iface, $no_delete_prefix) = @_;
 
        my %ret = ();
 
-       my $internal_ip = "127.0.0.$priviface";
-       my $public_ip = "127.0.0.$pubiface";
+       # use the same address for internal and public:
+       my $internal_ip = "127.0.0.$pub_iface";
+       my $public_ip = "127.0.0.$pub_iface";
 
        my @dirs = ();