Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2210 06/06/15 22:12:05 msvensson@shellback.(none) +1 -0
Add extra parameter to 'ndbcluster_wait_started' so it can be used to wait until ndb_mgmd has started
mysql-test/mysql-test-run.pl
1.137 06/06/15 22:11:58 msvensson@shellback.(none) +27 -21
Add extra parameter to 'ndbcluster_wait_started' so it can be used to wait until ndb_mgmd has started
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-5.1-new-maint
--- 1.136/mysql-test/mysql-test-run.pl 2006-06-15 18:40:12 +02:00
+++ 1.137/mysql-test/mysql-test-run.pl 2006-06-15 22:11:58 +02:00
@@ -348,7 +348,7 @@
sub rm_ndbcluster_tables ($);
sub ndbcluster_start_install ($);
sub ndbcluster_start ($$);
-sub ndbcluster_wait_started ($);
+sub ndbcluster_wait_started ($$);
sub mysqld_wait_started($);
sub run_benchmarks ($);
sub initialize_servers ();
@@ -1669,19 +1669,29 @@
}
-sub ndbcluster_wait_started($){
+sub ndbcluster_wait_started($$){
my $cluster= shift;
+ my $ndb_waiter_extra_opt= shift;
my $path_waiter_log= "$cluster->{'data_dir'}/ndb_waiter.log";
+ my $args;
+
+ mtr_init_args(\$args);
+
+ mtr_add_arg($args, "--no-defaults");
+ mtr_add_arg($args, "--core");
+ mtr_add_arg($args, "--ndb-connectstring=%s", $cluster->{'connect_string'});
+ mtr_add_arg($args, "--timeout=60");
+
+ if ($ndb_waiter_extra_opt)
+ {
+ mtr_add_arg($args, "$ndb_waiter_extra_opt");
+ }
# Start the ndb_waiter which will connect to the ndb_mgmd
# and poll it for state of the ndbd's, will return when
# all nodes in the cluster is started
- my $res= mtr_run($exe_ndb_waiter,
- ["--no-defaults",
- "--core",
- "--ndb-connectstring=$cluster->{'connect_string'}",
- "--timeout=60"],
- "", $path_waiter_log, $path_waiter_log, "");
+ my $res= mtr_run($exe_ndb_waiter, $args,
+ "", $path_waiter_log, $path_waiter_log, "");
mtr_verbose("ndbcluster_wait_started, returns: $res") if $res;
return $res;
}
@@ -1722,19 +1732,16 @@
# FIXME Should not be needed
# Unfortunately the cluster nodes will fail to start
# if ndb_mgmd has not started properly
- sleep(1);
-
- # if (!sleep_until_file_created($cluster->{'path_pid'},
- # 30, # Seconds
- # $pid))
- # {
- # mtr_warning("Failed to start ndb_mgd for $cluster->{'name'} cluster");
- # return 1;
- # }
+ while (ndbcluster_wait_started($cluster, "--no-contact"))
+ {
+ select(undef, undef, undef, 0.1);
+ }
# Remember pid of ndb_mgmd
$cluster->{'pid'}= $pid;
+ mtr_verbose("ndb_mgmd_start, pid: $pid");
+
return $pid;
}
@@ -1991,11 +1998,10 @@
$cluster->{'installed_ok'}= "YES"; # Assume install suceeds
- if (ndbcluster_wait_started($cluster))
+ if (ndbcluster_wait_started($cluster, ""))
{
# failed to install, disable usage and flag that its no ok
- mtr_report("ndbcluster_install of $cluster->{'name'} failed, " .
- "continuing without it");
+ mtr_report("ndbcluster_install of $cluster->{'name'} failed");
$cluster->{"installed_ok"}= "NO";
$cluster_started_ok= 0;
@@ -3314,7 +3320,7 @@
next if !$cluster->{'pid'};
- if (ndbcluster_wait_started($cluster))
+ if (ndbcluster_wait_started($cluster, ""))
{
# failed to start
mtr_report("Start of $cluster->{'name'} cluster failed, ");
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2210) | msvensson | 15 Jun |