I had installed and started Percona XtraDB Cluster 5.7 on 3 nodes. Everything went fine, until I had rebooted my first node. From then mysql.service couldn't be (re)started normally:
[root@percona1]# systemctl restart mysql.service
Failed to restart mysql.service: Unit not found.
I want to properly start mysql (percona server) on this node, as on my other nodes. This is what I'm getting on the first node:
[root@percona1]# systemctl status mysql.service
● mysql.service
Loaded: not-found (Reason: Invalid argument)
Active: active (running) since Tue 2019-08-13 16:24:31 CEST; 24h ago
Main PID: 1931 (mysqld_safe)
CGroup: /system.slice/mysql.service
├─1931 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─2515 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --wsrep-provider=/usr/lib64/galera3/libgalera_smm.so --log-error=/var/log/my...
Aug 13 16:23:47 percona1 systemd[1]: Starting Percona XtraDB Cluster...
Aug 13 16:23:48 percona1 mysqld_safe[1931]: 2019-08-13T14:23:48.456697Z mysqld_safe Logging to '/var/log/mysqld.log'.
Aug 13 16:23:48 percona1 mysqld_safe[1931]: 2019-08-13T14:23:48.463619Z mysqld_safe Logging to '/var/log/mysqld.log'.
Aug 13 16:23:48 percona1 mysqld_safe[1931]: 2019-08-13T14:23:48.524311Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Aug 13 16:23:48 percona1 mysqld_safe[1931]: 2019-08-13T14:23:48.553983Z mysqld_safe Skipping wsrep-recover for af1dd70d-b928-11e9-a530-aa3807a48b86:9 pair
Aug 13 16:23:48 percona1 mysqld_safe[1931]: 2019-08-13T14:23:48.557526Z mysqld_safe Assigning af1dd70d-b928-11e9-a530-aa3807a48b86:9 to wsrep_start_position
Aug 13 16:23:51 percona1 mysql-systemd[1932]: State transfer in progress, setting sleep higher
Aug 13 16:24:31 percona1 mysql-systemd[1932]: SUCCESS!
Aug 13 16:24:31 percona1 systemd[1]: Started Percona XtraDB Cluster.
Aug 14 14:28:10 percona1 systemd[1]: Current command vanished from the unit file, execution of the command list won't be resumed.
[root@percona1]# journalctl -xe
Aug 14 17:05:59 percona1 polkitd[572]: Registered Authentication Agent for unix-process:12131:9882093 (system bus name :1.106 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 14 17:06:00 percona1 polkitd[572]: Unregistered Authentication Agent for unix-process:12131:9882093 (system bus name :1.106, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
[root@percona1]# systemd-analyze verify mysql.service
Error: org.freedesktop.systemd1.NoSuchUnit: Unit not found.
Failed to create mysql.service/start: No such file or directory
Note: percona3 has been bootstrapped and percona2 has been started normally (systemctl start mysql.service). The problem is only with percona1 and to me it looks like it is systemd related.