Comment 10 for bug 1569446

Revision history for this message
Jimmy McCrory (jimmy-mccrory) wrote :

Looks like that's the issue, nice job.

I tried overwriting the init script on secondary nodes with MYSQLD_STARTUP_TIMEOUT hardcoded to 10 and got a failure every time.

The environment being ignored is being caused by the /usr/sbin/service command.

It'll look for an init script in /etc/init/ first, otherwise it goes to /etc/init.d/ (where mysql's is) while completely ignoring existing environment variables...

# Otherwise, use the traditional sysvinit
if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
   exec env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" ${ACTION} ${OPTIONS}

The mysql init script also doesn't seem to source /etc/default/mysql at any point, where we're also setting MYSQLD_STARTUP_TIMEOUT.