Bug #19325 Run IM/NDB not as daemons in test suite
Submitted: 25 Apr 2006 8:18 Modified: 3 Aug 2006 10:47
Reporter: Kristian Nielsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0 OS:Any (All)
Assigned to: Magnus Blåudd CPU Architecture:Any

[25 Apr 2006 8:18] Kristian Nielsen
Description:
Pushbuild currently uses a fairly robust method to clean up any hanging processes after running tests. It uses the 'ps' command to find all processes that run in the same session as the parent do-remote.pl process, and kills those (first with SIGTERM, and then SIGKILL if that fails).

However, this currently does not work for NDB and instance manager processes, since they detach themselves from the current session to become daemons (calling setsid() to get a new session id). So pushbuild has to rely on PID files to find these processes, which is not quite as reliable (due to pid files being not written/overwritten/deleted, and races).

NDB provides the --nodaemon option for this, but it is not exposed by the mysql-test/ndb/ndbcluster.sh script, and hence not by mysql-test-run.pl.

Instance manager similarly has the --skip-run-as-service option, also not exposed in mysql-test-run.pl.

If the test suite could use these options to run NDB and IM not as daemons, pushbuild cleanup would become more robust (and it would also be easier to clean up a local, manual test, as simple 'ps' would show hanging processes after terminating mysql-test-run.pl).

How to repeat:
Feature request.
[3 Aug 2006 10:47] Magnus Blåudd
IM as not daemon will not happen.