summaryrefslogtreecommitdiff
path: root/support-files/mariadb.service.in
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2021-04-291-1/+1
|\
| * Merge 10.4 into 10.5Marko Mäkelä2021-04-271-1/+1
| |\
| | * Merge 10.3 into 10.4Marko Mäkelä2021-04-271-1/+1
| | |\
| | | * Merge 10.2 into 10.3Marko Mäkelä2021-04-271-1/+1
| | | |\
| | | | * MDEV-25513: raise systemd LimitNOFILE limits to match server defaultsDaniel Black2021-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting MDEV reporter Daniel Lewart: Starting MariaDB with default configuration causes the following problems: "[Warning] Could not increase number of max_open_files to more than 16384 (request: 32186)" silently reduces table_open_cache_instances from 8 (default) to 4 Default Server System Variables: extra_max_connections = 1 max_connections = 151 table_open_cache = 2000 table_open_cache_instances = 8 thread_pool_size = 4 LimitNOFILE=16834 is in the following files: support-files/mariadb.service.in support-files/mariadb@.service.in Looking at sql/mysqld.cc lines 3837-3917: wanted_files= (extra_files + max_connections + extra_max_connections + tc_size * 2 * tc_instances); wanted_files+= threadpool_size; Plugging in the default values: wanted_files = (30 + 151 + 1 + 2000 * 2 * 8 + 4) = 32186 However, systemd configuration has LimitNOFILE = 16384, which is far smaller. I suggest increasing LimitNOFILE to 32768.
* | | | | MDEV-24883 add io_uring support for tpoolMarko Mäkelä2021-03-151-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | liburing is a new optional dependency (WITH_URING=auto|yes|no) that replaces libaio when it is available. aio_uring: class which wraps io_uring stuff aio_uring::bind()/unbind(): optional optimization aio_uring::submit_io(): mutex prevents data race. liburing calls are thread-unsafe. But if you look into it's implementation you'll see atomic operations. They're used for synchronization between kernel and user-space only. That's why our own synchronization is still needed. For systemd, we add LimitMEMLOCK=524288 (ulimit -l 524288) because the io_uring_setup system call that is invoked by io_uring_queue_init() requests locked memory. The value was found empirically; with 262144, we would occasionally fail to enable io_uring when using the maximum values of innodb_read_io_threads=64 and innodb_write_io_threads=64. aio_uring::thread_routine(): Tolerate -EINTR return from io_uring_wait_cqe(), because it may occur on shutdown on Ubuntu 20.10 (Groovy Gorilla). This was mostly implemented by Eugene Kosov. Systemd integration and improved startup/shutdown error handling by Marko Mäkelä.
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-08-041-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-08-031-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-08-031-1/+1
| | |\ \ | | | |/
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-1/+1
| | | |\
| | | | * MDEV-23088: Change LimitNOFILE default from 16364 to 16384Daniel Black2020-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct to a true 2^14 rather than some different number that was actually just a number typo. Bug report thanks to Hartmut Holzgraefe.
* | | | | MDEV-22569: Run bin/mariadbd instead of bin/mysqldOtto Kekäläinen2020-06-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all references to /usr/sbin/mysqld (and bin and libexec) with mariadbd, so that the binary server will always be 'mariadbd'. Also update all places that reference the server binary in other ways, such as AppArmor profiles and scripts that previously expected to find a 'mysqld' in process lists.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-251-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-04-161-1/+1
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | In main.index_merge_myisam we remove the test that was added in commit a2d24def8cc42d27c72d833abfb39ef24a2b96ba because it duplicates the test case that was added in commit 5af12e463549e4bbc2ce6ab720d78937d5e5db4e.
| | * | | Merge 10.2 into 10.3Marko Mäkelä2020-04-151-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge 10.1 into 10.2Marko Mäkelä2020-04-141-1/+1
| | | |\ \ | | | | |/
| | | | * MDEV-20676: systemd script not workingJulius Goryavsky2020-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to start mariadb via systemctl, WSREP failed to start mysqld for wsrep recovery, because the binary "galera-recovery" is neither searching the mysqld in the same folder as the binary itself nor in the path variable but instead expects the root to be /usr/local/mysql. This fix changes the current directory to the desired directory before starting mysqld.
* | | | | MDEV-15526 systemd unit files naming and installationFaustin Lammler2020-04-181-2/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop Aliases from the service file directive. Aliases in the service file only take effect when the service is enabled. This is the case because Aliases in service files do not have to be unique across various services. Shipping symlinks guarantees that one can always enable mariadb service using `systemctl enable mysql` or `systemctl enable mysqld` and makes the commands indempotent.
* | | | Merge commit '10.3' into 10.4Oleksandr Byelkin2020-03-111-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-03-061-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2020-03-051-1/+1
| | |\ \ | | | |/
| | | * mariadb{,@}.service comment typo open-file-limit -> open-files-limitDaniel Black2020-02-251-1/+1
| | | |
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-12-271-0/+7
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-12-271-0/+7
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-12-231-0/+7
| | |\ \ | | | |/
| | | * MDEV-17571 Make systemd timeout behavior more compatible with long Galera SSTsAxel Schwenke2019-12-051-0/+7
| | | | | | | | | | | | | | | | | | | | Set an explicit start and stop timeout of 900 seconds for the MariaDB Server systemd service
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-09-251-3/+1
|\ \ \ \ | |/ / /
| * | | Remove --basedir arg from systemd startup scriptsVicențiu Ciorbaru2019-09-241-3/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arg was introduced as part of 75bcf1f9ad4a4bb5fa9cb8818abe6ace52e53d85 to fix a SELinux problem caused by mysqld_safe accessing files it should not be via the my_which function. The root cause for this was fixed in 10.3, via 355ee6877beccf27bcd07d845c985fc1a2845aca which eliminated the my_which function from mysqld_safe entirely. Thus, in 10.3, this --basedir flag is not necessary.
* | | Merge 10.3 into 10.4Marko Mäkelä2019-09-231-9/+18
|\ \ \ | |/ / | | | | | | Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
| * | MDEV-12646: systemd service file changes from FedoraDaniel Black2019-09-201-10/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include comment header that describes overrides. Unit description now includes @VERSION@. After=syslog.target removed - redunant Add --basedir=@prefix to prevent /root/.my.cnf lookups. This is placed after $MYSQLD_OPTIONS in case a user sets a --{no,}default type options which has to be first in the mysqld arguements. Additional changes to multi instance (support-files/mariadb@.service.in): * added @SYSTEMD_EXECSTARTPRE@ / @SYSTEMD_EXECSTARTPOST@ * removed mariadb@bootstrap reference as galera_new_cluster as it's a little too proment. * use_galera_new_cluster.conf updated to override pre/post steps to ensure it has no side effects Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
* | Workaround for https://github.com/systemd/systemd/issues/1221Sergei Golubchik2019-07-051-12/+8
| | | | | | | | | | Put all capabilities in one CapabilityBoundingSet line, otherwise buggy systemd sets CapabilityBoundingSet=0
* | MDEV-19878 pam v2: pam password authentication doesn't work at allSergei Golubchik2019-07-021-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wait() for the child process to die, let it rest in peace * fix incorrect parentheses * if there was no password on the command line or in .cnf file, pkt will be "", and we need to request the user to enter the password * make sure that auth->salt is always allocated on a permanent memroot. when called from set_user_salt_if_needed(), user_copy and its auth_str are on the thd memroot, but auth_copy->salt is then copied to auth->salt * adjust service files so that systemd wouldn't interfere with our setuid executables also * print the pam error message in debug mode
* | MDEV-14900 Upstream 10.3 debian patchesSergei Golubchik2018-08-121-1/+0
|/ | | | | | | | | applied (at least partially): * armhf_mroonga_storage_fail.patch (unaligned write) * mysqld_multi.server_lsb-header.patch (add LSB header) * fix-spelling-errors.patch (tabxml.cpp) * hurd_socket.patch (in Platform.pm) * remove-systemd-obsolete-target.patch
* systemd: revert to KillMode=control-group for galeraDaniel Black2018-01-291-1/+0
| | | | | | When galera is used we want a stop to kill off not only the mysqld process but the entire process group created by galera to perform sst or wsrep_notify_cmd.`
* MDEV-13809: [service] should [Service] in systemd service filesDaniel Black2017-12-191-2/+3
|
* MDEV-12128: systemd - add Documentation= directivesDaniel Black2017-12-191-1/+3
|
* properly set paths in systemd unit filesChristian Hesse2017-03-071-5/+5
| | | | | Use variables in systemd unit file templetes to properly set paths in final systemd unit files.
* spelling fixesklemens2017-03-071-1/+1
|
* MDEV-10507: MariaDB 10.1 + wsrep fails to start under systemd post-rebootNirbhay Choubey2016-08-221-1/+2
| | | | /var/run/mysqld must be created before wsrep recovery.
* MDEV-10538: MariaDB fails to start without galera_recovery in systemd modeNirbhay Choubey2016-08-221-2/+4
| | | | | Update ExecStartPre scripts to not fail if 'galera_recovery' script is not available.
* MDEV-10404 - Improved systemd service hardening causes SELinux problemsSergey Vojtovich2016-08-171-1/+2
| | | | Disabled NoNewPrivileges until SELinux policy is fixed.
* MDEV-10298: Systemd hardeningCraig Andrews2016-07-121-0/+10
| | | | Add ProtectSystem=full, NoNewPrivileges=true, PrivateDevices=true, and ProtectHome=true to the systemd units.
* MDEV-10004: Galera's pc.recovery process fails in 10.1 with systemdNirbhay Choubey2016-06-271-1/+12
| | | | | | | | | | | | | | Galera recovery process works in two phases. In the first phase, mysqld is started as non-daemon with --wsrep-recover to recover and fetch the last logged global transaction ID. This ID is then used in second phase as the start position (--wsrep-start-position=XX) to start mysqld as daemon. As this process was implemented in mysqld_safe script, the recovery did not work when server was started using systemd. Fixed by introducing a shell script (wsrep_recovery.sh) that mimics the first phase of the recovery process.
* MDEV-9095 - [PATCH] systemd capability for --memlockSergey Vojtovich2015-12-221-0/+3
| | | | | | | Adjust systemd files to enable CAP_IPC_LOCK to allow rootless mlockall (triggered by memlock option). This is amended version of a patch originally submitted by Daniel Black.
* MDEV-8995: systemd - 16K open-files-limit by defaultDaniel Black2015-11-071-1/+1
|
* MDEV-427: systemd - use galera_new_cluster instead of bootstrapDaniel Black2015-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use galera_new_cluster instead. systemctl start mariadb@bootstrap will generate error message, use_galera_new_cluster.conf is the name of the file that will generate this error. Output: Job for mariadb@bootstrap.service failed. See "systemctl status mariadb@bootstrap.service" and "journalctl -xe" for details. ● mariadb@bootstrap.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb@.service; disabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/mariadb@bootstrap.service.d └─use_galera_new_cluster.conf Active: failed (Result: exit-code) since Thu 2015-10-15 19:27:52 CEST; 5s ago Process: 24334 ExecStart=/usr/bin/false (code=exited, status=1/FAILURE) Process: 24330 ExecStart=/usr/bin/echo Please use galera_new_cluster to start the mariadb service with --wsrep-new-cluster (code=exited, status=0/SUCCESS) Main PID: 24334 (code=exited, status=1/FAILURE) Oct 15 19:27:52 spaceman systemd[1]: Starting MariaDB database server... Oct 15 19:27:52 spaceman systemd[1]: mariadb@bootstrap.service: main process exited, code=exited, status=1/FAILURE Oct 15 19:27:52 spaceman systemd[1]: Failed to start MariaDB database server. Oct 15 19:27:52 spaceman systemd[1]: Unit mariadb@bootstrap.service entered failed state. Oct 15 19:27:52 spaceman systemd[1]: mariadb@bootstrap.service failed.
* MDEV-426: systemd PermissionsStartOnly=true by defaultDaniel Black2015-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | mariadb-service-convert during migration can create a file containing ExecStartPre=/usr/sbin/sysctl -q -w vm.drop_caches=3 if the users my.cnf contains [mysqld_safe] flush_caches. This sysctl entry change requires root access. No existing ExecStartPre requires execution requires execution as another user. There is a comment in the mariadb{,@}.service.in that indicates mysqld_install which would require -u mysql to explicity change user to mysql from root since PermissionsStartOnly=true. Otherwise the following error would be generated: Oct 14 07:38:38 spaceman systemd[1]: Starting MariaDB database server... -- Subject: Unit mariadb.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mariadb.service has begun starting up. Oct 14 07:38:38 spaceman sysctl[10089]: sysctl: permission denied on key 'vm.drop_caches' Oct 14 07:38:38 spaceman systemd[1]: mariadb.service: control process exited, code=exited status=255 Oct 14 07:38:38 spaceman systemd[1]: Failed to start MariaDB database server.
* MDEV-427/MDEV-5713 Add systemd script with notify functionalitySergey Vojtovich2015-10-121-0/+122
After review/QA fixes.