forked from evolix/ansible-roles
dump-server-state: upstream release 22.04.3
This commit is contained in:
parent
49e4e67c2c
commit
381a71aca1
|
@ -23,7 +23,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
* evocheck: upstream release 22.04.1
|
* evocheck: upstream release 22.04.1
|
||||||
* evolinux-base: Add non-free repos & install non-free firmware on dedicated hardware
|
* evolinux-base: Add non-free repos & install non-free firmware on dedicated hardware
|
||||||
* evolinux-base: rename backup-server-state to dump-server-state
|
* evolinux-base: rename backup-server-state to dump-server-state
|
||||||
* dump-server-state: upstream release 22.04.2
|
* dump-server-state: upstream release 22.04.3
|
||||||
* generate-ldif: Add services check for bkctld
|
* generate-ldif: Add services check for bkctld
|
||||||
* minifirewall: restore "force-restart" and fix "restart-if-needed"
|
* minifirewall: restore "force-restart" and fix "restart-if-needed"
|
||||||
* minifirewall: tail template follows symlinks
|
* minifirewall: tail template follows symlinks
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
PROGNAME="dump-server-state"
|
PROGNAME="dump-server-state"
|
||||||
REPOSITORY="https://gitea.evolix.org/evolix/dump-server-state"
|
REPOSITORY="https://gitea.evolix.org/evolix/dump-server-state"
|
||||||
|
|
||||||
VERSION="22.04.2"
|
VERSION="22.04.3"
|
||||||
readonly VERSION
|
readonly VERSION
|
||||||
|
|
||||||
dump_dir=
|
dump_dir=
|
||||||
|
@ -76,7 +76,8 @@ END
|
||||||
}
|
}
|
||||||
debug() {
|
debug() {
|
||||||
if [ "${VERBOSE}" = "1" ]; then
|
if [ "${VERBOSE}" = "1" ]; then
|
||||||
echo "$1"
|
msg="${1:-$(cat /dev/stdin)}"
|
||||||
|
echo "${msg}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,16 +718,20 @@ task_mysql_processes() {
|
||||||
if [ -n "${mysqladmin_bin}" ]; then
|
if [ -n "${mysqladmin_bin}" ]; then
|
||||||
# Look for local MySQL or MariaDB process
|
# Look for local MySQL or MariaDB process
|
||||||
if pgrep mysqld > /dev/null || pgrep mariadbd > /dev/null; then
|
if pgrep mysqld > /dev/null || pgrep mariadbd > /dev/null; then
|
||||||
last_result=$(${mysqladmin_bin} --verbose processlist > "${dump_dir}/mysql-processlist.txt")
|
if ${mysqladmin_bin} ping > /dev/null 2>&1; then
|
||||||
|
${mysqladmin_bin} --verbose processlist > "${dump_dir}/mysql-processlist.txt" 2> "${dump_dir}/mysql-processlist.err"
|
||||||
last_rc=$?
|
last_rc=$?
|
||||||
|
|
||||||
if [ ${last_rc} -eq 0 ]; then
|
if [ ${last_rc} -eq 0 ]; then
|
||||||
debug "* mysqladmin OK"
|
debug "* mysqladmin OK"
|
||||||
else
|
else
|
||||||
debug "* mysqladmin ERROR"
|
debug "* mysqladmin ERROR"
|
||||||
debug "${last_result}"
|
debug < "${dump_dir}/mysql-processlist.err"
|
||||||
# Ignore errors because we don't know how to deal with multiple instances
|
rm "${dump_dir}/mysql-processlist.err"
|
||||||
# rc=10
|
rc=10
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
debug "* unable to ping with mysqladmin"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
debug "* no mysqld or mariadbd process is running"
|
debug "* no mysqld or mariadbd process is running"
|
||||||
|
|
Loading…
Reference in a new issue