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.
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 /${SERVICE} " ]; then $SERVICE" ${ACTION} ${OPTIONS}
if [ -x "${SERVICEDIR}
exec env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/
The mysql init script also doesn't seem to source /etc/default/mysql at any point, where we're also setting MYSQLD_ STARTUP_ TIMEOUT.