List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:June 15 2011 2:37pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4458)
View as plain text  
#At file:///home/msvensson/mysql/7.0-bug12352191/ based on revid:magnus.blaudd@stripped

 4458 magnus.blaudd@stripped	2011-06-15
      ndb
       - add support for more than one ndb_mgmd in mtr.pl

    modified:
      mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-05-16 10:02:42 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-06-15 14:37:07 +0000
@@ -2707,6 +2707,24 @@ sub ndb_mgmd_start ($$) {
   mtr_add_arg($args, "--nodaemon");
   mtr_add_arg($args, "--configdir=%s", "$dir");
 
+  if ( in_cluster($cluster, ndb_mgmds()) > 1)
+  {
+    # Need to pass nodeid when starting ndb_mgmd
+    # in cluster with more than one ndb_mgmd
+
+    my $nodeid;
+
+    if ( !$ndb_mgmd->if_exist("NodeId") )
+    {
+      mtr_error("Couldn't find NodeId for " . $ndb_mgmd->name() .
+		" in configuration, it must be specified when using" .
+		" more than one ndb_mgmd per cluster");
+    }
+
+    $nodeid= $ndb_mgmd->value("NodeId");
+    mtr_add_arg($args, "--ndb-nodeid=$nodeid");
+  }
+
   my $path_ndb_mgmd_log= "$dir/ndb_mgmd.log";
 
   $ndb_mgmd->{'proc'}= My::SafeProcess->new
@@ -2722,15 +2740,6 @@ sub ndb_mgmd_start ($$) {
     );
   mtr_verbose("Started $ndb_mgmd->{proc}");
 
-  # FIXME Should not be needed
-  # Unfortunately the cluster nodes will fail to start
-  # if ndb_mgmd has not started properly
-  if (ndb_mgmd_wait_started($cluster))
-  {
-    mtr_warning("Failed to wait for start of ndb_mgmd");
-    return 1;
-  }
-
   return 0;
 }
 
@@ -2792,6 +2801,15 @@ sub ndbcluster_start ($) {
     ndb_mgmd_start($cluster, $ndb_mgmd);
   }
 
+  # FIXME Should not be needed
+  # Unfortunately the cluster nodes will fail to start
+  # if ndb_mgmd has not started properly
+  if (ndb_mgmd_wait_started($cluster))
+  {
+    mtr_warning("Failed to wait for start of ndb_mgmd");
+    return 1;
+  }
+
   foreach my $ndbd ( in_cluster($cluster, ndbds()) )
   {
     next if started($ndbd);


Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110615143707-j0kof1ltf9m1h98i.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4458) magnus.blaudd16 Jun