#At file:///data0/magnus/mysql/6.3/ based on revid:magnus.blaudd@stripped
3434 Magnus Blåudd 2011-05-16
ndb
- add patch to mtr.pl which print out ndbd and ndb_mgmd log files
when mtr.pl detect that cluster has failed to start
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 09:11:50 +0000
+++ b/mysql-test/mysql-test-run.pl 2011-05-16 09:59:05 +0000
@@ -2582,6 +2582,41 @@ sub ndbcluster_wait_started($$){
}
+sub ndbcluster_dump($) {
+ my ($cluster)= @_;
+
+ print "\n== Dumping cluster log files\n\n";
+
+ # ndb_mgmd(s)
+ foreach my $ndb_mgmd ( in_cluster($cluster, ndb_mgmds()) )
+ {
+ my $datadir = $ndb_mgmd->value('DataDir');
+
+ # Should find ndb_<nodeid>_cluster.log and ndb_mgmd.log
+ foreach my $file ( glob("$datadir/ndb*.log") )
+ {
+ print "$file:\n";
+ mtr_printfile("$file");
+ print "\n";
+ }
+ }
+
+ # ndb(s)
+ foreach my $ndbd ( in_cluster($cluster, ndbds()) )
+ {
+ my $datadir = $ndbd->value('DataDir');
+
+ # Should find ndbd.log
+ foreach my $file ( glob("$datadir/ndbd.log") )
+ {
+ print "$file:\n";
+ mtr_printfile("$file");
+ print "\n";
+ }
+ }
+}
+
+
sub ndb_mgmd_wait_started($) {
my ($cluster)= @_;
@@ -5033,6 +5068,13 @@ sub start_servers($) {
{
# failed to start
$tinfo->{'comment'}= "Start of '".$cluster->name()."' cluster failed";
+
+ #
+ # Dump cluster log files to log file to help analyze the
+ # cause of the failed start
+ #
+ ndbcluster_dump($cluster);
+
return 1;
}
}
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110516095905-exprv631k0evqp5o.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (magnus.blaudd:3434) | Magnus Blåudd | 16 May |