MySQL restore wait for shutdown before killing
Problem:
MySQL restory strategy in function '_spawn_with_init_file' of '/trove/trove/guestagent/strategies/restore/mysql_impl.py' issues a shutdown command to the mysql process immediatelly followed by 'killall'. The kill call is however necessary only if the soft shutdown fails.
This currently does not cause issues with MySQL (apart from executing unnecessary code), but our internal testers ran into issues with MariDB caused by this defect.
MariaDB's shutdown process does not block. It returns to the caller which then immediatelly proceeds with killall command before the shutdown finishes. This puts the database into a bad state resulting in an automated restart.
Solution:
Poll database status after executing shutdown and follow by 'killall' only if soft shutdown fails.
Here's a proble. Trove doesn't support MariaDB, it is not present at DatastoreCompat ibility matrix. Another thing, there's no steps to reproduce. Also, there are couple things that were filed as MariaDB backlog (list of bugs, BPs that are in order to be fixed or implemented).
So, please concider on adding support of MariaDB to upstream code (Trove, Trove-integration) before actually trying to fix this bug, because this bug is not affecting any of supported datastore.