override file with nofile ulimit for new percona cluster

Bug #1962434 reported by Shunde Zhang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
New
Undecided
Unassigned

Bug Description

The bug report is related to 1905366 [1]. Its fix adds an override file /etc/systemd/system/mysql.service.d/charm-nofile.conf with a bigger nofile ulimit value so that mysql can accept more connections.
This is fine if percona cluster already exists and the max connection config is set to a new value.

However, if a new percona cluster is created with a max connection value, the above override file is not used because when the percona cluster is created and started for the first time, the started service is <email address hidden>, therefore the override file it uses is /etc/systemd/system/mysql@.service.d/charm-nofile.conf, which has a '@' symbol in the path.

This is how it looks like when a new percona cluster is just created.

root@juju-fb8079-ost-3:~# systemctl status mysql
● mysql.service - Percona XtraDB Cluster daemon
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mysql.service.d
           └─charm-nofile.conf
   Active: inactive (dead) since Thu 2021-07-01 00:42:27 UTC; 10min ago
  Process: 1932 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
 Main PID: 512 (code=exited, status=0/SUCCESS)

root@juju-fb8079-ost-3:~# systemctl status <email address hidden>
● <email address hidden> - Percona XtraDB Cluster daemon with config /etc/default/mysql.bootstrap
   Loaded: loaded (/lib/systemd/system/mysql@.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-07-01 00:42:34 UTC; 11min ago
  Process: 2145 ExecStart=/etc/init.d/mysql start ${EXTRA_ARGS} (code=exited, status=0/SUCCESS)
  Process: 2043 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 2185 (mysqld_safe)
    Tasks: 102 (limit: 4703)
   CGroup: /<email address hidden>
           ├─2185 /bin/sh /usr/bin/mysqld_safe --wsrep-new-cluster
           └─2808 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/percona-xtradb-cluster --plugin-dir=/usr/lib/mysql/plugin --wsrep-provider=/usr/lib/galera3/libgalera_smm.so --

Therefore the charm should create /etc/systemd/system/mysql@.service.d/charm-nofile.conf for bootstrapping process.

[1] https://bugs.launchpad.net/charm-percona-cluster/+bug/1905366

Tags: sts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.