In my opinion you must use pkill -P. This fix kill only child so that kill sleep 600 command running under mysql.
post-snap-command = /usr/bin/pkill -P `/usr/bin/cat /tmp/mariadblock.pid`;/usr/bin/rm /tmp/mariadblock.pid
In my case when post-snap-command kill only mysql -e ... the child process sleep 600 still working
Little fix in docs znapzendzetup
In my opinion you must use
pkill -P
. This fix kill only child so that killsleep 600
command running under mysql.post-snap-command = /usr/bin/pkill -P `/usr/bin/cat /tmp/mariadblock.pid`;/usr/bin/rm /tmp/mariadblock.pid
In my case when post-snap-command kill only
mysql -e ...
the child processsleep 600
still workingAll tables is locking until
sleep
ends ;( Probably the system command\\!sleep 600
running inside mariadb keeps the mysql session going.When you
pkill -P parent_pid
system commandsleep
all pre-snap-command return 0, so there should be no problems with exit status testing...(mariadb Ver 15.1 Distrib 10.5.22-MariaDB, for Linux (x86_64) using EditLine wrapper)