#At file:///home/jonas/src/telco-6.2/
2667 Jonas Oreland 2008-08-27
ndb - atrt -
save logs if servers fails to start
to help track problem found trondheim
modified:
storage/ndb/test/run-test/atrt.hpp
storage/ndb/test/run-test/db.cpp
storage/ndb/test/run-test/main.cpp
=== modified file 'storage/ndb/test/run-test/atrt.hpp'
--- a/storage/ndb/test/run-test/atrt.hpp 2008-02-21 13:57:42 +0000
+++ b/storage/ndb/test/run-test/atrt.hpp 2008-08-27 11:42:30 +0000
@@ -32,6 +32,7 @@ enum ErrorCodes
ERR_SERVERS_FAILED = 102,
ERR_MAX_TIME_ELAPSED = 103,
ERR_COMMAND_FAILED = 104,
+ ERR_FAILED_TO_START = 105
};
struct atrt_host
=== modified file 'storage/ndb/test/run-test/db.cpp'
--- a/storage/ndb/test/run-test/db.cpp 2008-02-21 13:57:42 +0000
+++ b/storage/ndb/test/run-test/db.cpp 2008-08-27 11:42:30 +0000
@@ -460,3 +460,7 @@ setup_repl(atrt_config& config)
}
return true;
}
+
+template static int find(atrt_host* obj, Vector<atrt_host*>& arr);
+template static int find(atrt_cluster* obj, Vector<atrt_cluster*>& arr);
+
=== modified file 'storage/ndb/test/run-test/main.cpp'
--- a/storage/ndb/test/run-test/main.cpp 2008-02-21 13:57:42 +0000
+++ b/storage/ndb/test/run-test/main.cpp 2008-08-27 11:42:30 +0000
@@ -273,7 +273,33 @@ main(int argc, char ** argv)
goto end;
if (!start(g_config, p_ndb | p_servers))
- goto end;
+ {
+ g_logger.info("Failed to start server processes");
+ g_logger.info("Gathering logs and saving them as test %u", test_no);
+
+ int tmp;
+ if(!gather_result(g_config, &tmp))
+ goto end;
+
+ if(g_report_file != 0)
+ {
+ fprintf(g_report_file, "%s ; %d ; %d ; %d\n",
+ "start servers", test_no, ERR_FAILED_TO_START, 0);
+ fflush(g_report_file);
+ }
+
+ BaseString resdir;
+ resdir.assfmt("result.%d", test_no);
+ remove_dir(resdir.c_str(), true);
+
+ if(rename("result", resdir.c_str()) != 0)
+ {
+ g_logger.critical("Failed to rename %s as %s",
+ "result", resdir.c_str());
+ goto end;
+ }
+ goto end;
+ }
if (!setup_db(g_config))
goto end;
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (jonas:2667) | Jonas Oreland | 27 Aug |