¿Mysql se reinicia aleatoriamente con diferentes argumentos?

¿Mysql se reinicia aleatoriamente con diferentes argumentos?

Me enfrento a un problema bastante extraño y no estoy seguro de cómo solucionarlo. Parece que el proceso mysqld se está iniciando con diferentes argumentos mediante algo distinto a systemd después de que el servicio mysql systemd ya se esté ejecutando. Esto hace que el servidor mysql deje de funcionar y el nuevo proceso deje de responder.

Cuando se inicia a través de systemd: /usr/sbin/mysqld

¿Cuando empezó por? mysqld --user=mysql --init-file=/var/lib/mysql-files/tmp.Ld6xyAe3qb --socket=/tmp/tmp.obBArlPCj2/mysqld.sock --pid-file=/tmp/tmp.obBArlPCj2/mysqld.pid

No está claro por qué se reinicia mysql, quién y de dónde provienen los nuevos argumentos.

/var/lib/mysql-files/tmp.Ld6xyAe3qb(que es el archivo de inicio proporcionado anteriormente) contiene el siguiente texto:

USE mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';
SHUTDOWN;

Lo único que puedo ver en los registros es:

2020-08-08T06:57:31.123013Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.21-0ubuntu0.20.04.4).
... [group replication, InnoDB, normal logs] ...
2020-08-08T06:57:49.954754Z 8 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.21-0ubuntu0.20.04.4).

El primer registro se produce de forma aleatoria; no hay nada antes que indique un recuerdo o cualquier otro tipo de error (que pueda ver). El segundo cierre parece provenir del archivo de inicio. Sin embargo, el aspecto más confuso es que no hay ningún usuario booten el sistema ni en mysql.

El único servicio que utiliza mysql es OpenStack Keystone para el almacenamiento de objetos Swift y ningún otro servicio OpenStack.

Hasta donde puedo decir, no hay ningún otro servicio cron o systemd que haga referencia a mysql, pero no estoy positivo en esa prueba. El comando fue: systemctl list-units --all --no-legend | awk '{print $1}' | xargs -n1 systemctl cat 2>/dev/null | grep mysql lo que da:

After=postgresql.service mysql.service keystone.service rabbitmq-server.service ntp.service network-online.target local-fs.target remote-fs.target 
# /lib/systemd/system/mysql.service
User=mysql
Group=mysql
PIDFile=/run/mysqld/mysqld.pid
ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
ExecStart=/usr/sbin/mysqld
RuntimeDirectory=mysqld

La primera línea es de /lib/systemd/system/cinder-volume.service, que debe eliminarse, pero no creo que esté relacionada con este problema, ya que el problema ocurre en servidores que nunca tuvieron instalado Cinder.

Este problema ocurre en 4 servidores configurados para replicación de grupo.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
# mysql --version
mysql  Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))
# cat /etc/mysql/mysql.conf.d/mysqld.cnf 
#
# The MySQL database server configuration file.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
[mysqld]
log-error-verbosity = 5
#
# * Basic Settings
#
user        = mysql
# pid-file  = /var/run/mysqld/mysqld.pid
# socket    = /var/run/mysqld/mysqld.sock
# port      = 3306
# datadir   = /var/lib/mysql
# If MySQL is running as a replication slave, this should be
# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir
# tmpdir        = /tmp
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 0.0.0.0
#
# * Fine Tuning
#
key_buffer_size     = 16M
# max_allowed_packet    = 64M
# thread_stack      = 256K
# thread_cache_size       = -1
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options  = BACKUP
# max_connections        = 151
# table_open_cache       = 4000
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
#
# Log all queries
# Be aware that this log type is a performance killer.
# general_log_file        = /var/log/mysql/query.log
# general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
# slow_query_log        = 1
# slow_query_log_file   = /var/log/mysql/mysql-slow.log
# long_query_time = 2
# log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
# server-id     = 1
# log_bin           = /var/log/mysql/mysql-bin.log
# binlog_expire_logs_seconds    = 2592000
max_binlog_size   = 100M
# binlog_do_db      = include_database_name
# binlog_ignore_db  = include_database_name
# disable non innodb storage engines for group replication
# https://dev.mysql.com/doc/refman/8.0/en/group-replication-configuring-instances.html
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
# use native password auth
default_authentication_plugin=mysql_native_password
# replication framework settings
server_id = 1
gtid_mode = ON
enforce_gtid_consistency = ON
log_bin = binlog
log_slave_updates = ON
binlog_format = ROW
master_info_repository = TABLE
relay_log_info_repository = TABLE
binlog_checksum = NONE
# group replication settings
plugin_load_add = 'group_replication.so'
plugin-load-add = 'mysql_clone.so'
group_replication_group_name = "xxx"
group_replication_start_on_boot = on
group_replication_local_address = "xxx:33061"
group_replication_ip_whitelist="xxx"
group_replication_group_seeds = "xxx:33061"
group_replication_bootstrap_group = off
group_replication_enforce_update_everywhere_checks = off
group_replication_single_primary_mode = off
## tls
# required encrypted remote connections
# require_secure_transport = ON
tls_version=TLSv1.3
ssl_ca = "/etc/mysql/certs/eons.dev.pem"
ssl_cert = "/etc/mysql/certs/skyrim-mysql.pem"
ssl_key = "/etc/mysql/certs/skyrim-mysql.key"
ssl_cipher = "DHE-RSA-AES256-SHA"
##ssl_crl = "crl-server-revoked.crl"
##ssl_crlpath = "/.../crl_directory"
mysqlx_ssl_ca = "/etc/mysql/certs/eons.dev.pem"
mysqlx_ssl_cert = "/etc/mysql/certs/skyrim-mysql.pem"
mysqlx_ssl_key = "/etc/mysql/certs/skyrim-mysql.key"
mysqlx_ssl_cipher = "DHE-RSA-AES256-SHA"
# group replication tls
group_replication_ssl_mode = REQUIRED
group_replication_recovery_use_ssl = on
group_replication_recovery_ssl_ca = "/etc/mysql/certs/eons.dev.pem"
group_replication_recovery_ssl_cert = "/etc/mysql/certs/skyrim-mysql.pem"
group_replication_recovery_ssl_key = "/etc/mysql/certs/skyrim-mysql.key"
group_replication_recovery_ssl_cipher = "DHE-RSA-AES256-SHA"

información relacionada