- BUG#15934: Instance manager fails to work;
- BUG#18020: IM connect problem;
- BUG#18027: IM: Server_ID differs;
- BUG#18033: IM: Server_ID not reported;
- BUG#21331: Instance Manager: Connect problems in tests;
The only test suite has been changed
(server codebase has not been modified).
tests fail on FreeBSD.
The patch contains of the following:
- make Instance Manager, running in the daemon mode, dump
the pid of angel-process in the special file;
- default value of angel-pid-file-name is 'mysqlmanager.angel.pid';
- if ordinary (IM) pid-file-name is specified in the configuration,
angel-pid-file-name is updated according to the following
rule: extension of the basename of pid-file-name is replaced by
'.angel.pid.
For example:
- pid-file-name: /tmp/im.pid
=> angel-pid-file-name: /tmp/im.angel.pid
- pid-file-name: /tmp/im.txt
=> angel-pid-file-name: /tmp/im.angel.pid
- pid-file-name: /tmp/5.0/im
=> angel-pid-file-name: /tmp/5.0/im.angel.pid
- add support for configuration option to customize angel
pid file name;
- fix test suite to use angel pid to kill Instance Manager
by all means if something went wrong.
Background
----------
The problem is that on some OSes (FreeBSD for one) Instance
Manager does not get SIGTERM, so can not shutdown gracefully.
Test suite wasn't able to cope with it, so this leads to the
mess in test results.
The problem should be split into two:
- fix signal handling;
- fix test suite.
This patch fixes test suite so that it will be able to kill
uncooperative Instance Manager. In order to achieve this,
test suite needs to know PID of IM Angel process.
errorneously abort reporting failure to kill child processes, where in
reality the problem was merely that the child had become a zombie because
of missing waitpid() call.
Added --skip-im option handling
Don't terminate script if IM fails to create PID file
mtr_cases.pl:
Added --skip-im option handling
mtr_process.pl:
Kill left over 'mysqld' processes started by IM
Call mtr_timer_stop_all() at exit
mtr_report.pl, mysql-test-run.pl:
Added default/ps-protocol/embedded to abort and summary line
mtr_timer.pl:
Added function mtr_timer_stop_all()
Bug#11792: Check all of status code, to catch a crash as a failure
mtr_cases.pl:
Code cleanup for skipped/disabled handling
mtr_process.pl:
In debug mode, report if mysqladmin did not at least
make the server stop listening to the port.
Increased the time waiting for terminating to 20 seconds,
to wait for really slow slave shutdown.
Added call to start_reap_all(), to avoid zombies.
mtr_report.pl:
Removed prototype for unused function mtr_report_test_disabled()
Added a sleep for 5 seconds when shuting down,
work around for strange problem with server restarts
mtr_cases.pl:
Set default time zone as opt to mysqld
mysql-test-run.pl:
Enabled --mysqld=<flags> to work
Put some Windows path names into environment,
to be used in --replace_result
mysql-test-run.sh:
Make shell script tolerant to Windows change in test cases
Try kill all children to the mysql-test-run process when exiting
mtr_process.pl:
Added new function mtr_exit() that try kill all children to the mysql-test-run process when exiting
mysql-test-run.pl:
Try kill all children to the mysql-test-run process when exiting
New --vardir caused problems on Windows
Changed faulty calls to error() to mtr_error()
Let --start-and-exit actually start a server
Added that test case names can be specified on the comman line
Added embedded server support
Added environment variables UMASK, UMASK_DIR
Added missing MASTER_MYSOCK1, MASTER_MYPORT1, USE_RUNNING_SERVER
Added missing CHARSETSDIR, MYSQL_FIX_SYSTEM_TABLES, MYSQL_CLIENT_TEST
Pass on return value from sleep_until_file_created(), to fail test
Fail test if early termination of mysqld servers
Create intial databases for the second master, and two additional slaves
mtr_process.pl:
Find out if port is still in use, using simple TCP connect
Use non blocking waitpid() to catch terminations early
Make a special case spawning the 'mysqltest' application
Redo the fork() if it returns EAGAIN
Make sure to record if master or slave terminated
Improved debugging output
Improved code that remove PID files to avoid race
Abort if we can't stop all mysqld servers using our ports
Many improvements in killing mysqld servers
Let sleep_until_file_created() catch if server died early
mtr_report.pl:
Added option to disable test cases using <testcase>.disabled file
If --timer, only try to open file with time data if it exists
mtr_io.pl:
Remove starting/ending space reading server options from file
Catch more fork() errors.
Moved sleep_until_file_created() here from "mysql-test-run.pl".
Improved debug output.
mtr_io.pl:
Improved mtr_get_opts_from_file(), try to mimic some sh.
mysql-test-run.pl:
Cleaned up the timeout handling.
Created new function environment_setup().
Corrected time zone handling.
Moved sleep_until_file_created() to "lib/mtr_process.pl".
Improved debug output.
Added missing stop_reap_all() if returns early from function
mysql-test-run.pl:
Improved output from --script-debug
Initial Cygwin support
Improved mysqld process termination