summaryrefslogtreecommitdiff
path: root/support-files/mariadb@.service.in
Commit message (Collapse)AuthorAgeFilesLines
* 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-18841: /var/run -> /run for apparmor/systemd serviceDaniel Black2020-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Match 10.5 path changes in: * b2feb030014f5ff7d71cd55326a93cc709386407 * aaaf005ce61a543f1a1470b179ccb535698b36ef * bb8477778b72f047437b2a03a2bd38997e155f10
* | | | 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.
| | * | | Merge 10.2 into 10.3Marko Mäkelä2020-04-151-2/+2
| | |\ \ \ | | | |/ /
| | | * | Merge 10.1 into 10.2Marko Mäkelä2020-04-141-2/+2
| | | |\ \ | | | | |/
| | | | * MDEV-20676: systemd script not workingJulius Goryavsky2020-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-22569: Run bin/mariadbd instead of bin/mysqldOtto Kekäläinen2020-06-161-8/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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
| | | * systemd: mariadb@bootstrap doesn't bootstrap, galera_new_cluster doesDaniel Black2019-11-141-1/+1
| | | | | | | | | | | | | | | | Closes #1106
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-09-251-6/+4
|\ \ \ \ | |/ / /
| * | | Remove --basedir arg from systemd startup scriptsVicențiu Ciorbaru2019-09-241-4/+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-1/+16
|\ \ \ | |/ / | | | | | | Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
| * | Merge 10.1 into 10.2Marko Mäkelä2019-09-231-1/+1
| |\ \ | | |/
| | * MDEV-19207 systemd service: add instance name in descriptionChristian Hesse2019-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit files made systemd print: systemd[1]: Started MariaDB 10.3.13 database server (multi-instance). Let's add the instance name, so starting mariadb@foo.service makes it print: systemd[1]: Started MariaDB 10.3.13 database server (multi-instance foo).
| * | MDEV-12646: systemd service file changes from FedoraDaniel Black2019-09-201-13/+26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | systemd multiinstance - doc fix - version numberDaniel Black2019-07-011-2/+2
| |
* | fix typo support-files/mariadb@.service.infaust2019-06-141-1/+1
| | | | | | Co-Authored-By: grooverdan <daniel@linux.ibm.com>
* | MDEV-11670: mariadb@.service remove alias, clean up documentation/orderDaniel Black2019-06-141-36/+62
| |
* | systemd: multi-instance not for Galera, User/Group flexibleDaniel Black2019-06-141-33/+26
| | | | | | | | | | | | By removing Galera functionality, we remove PermissionsStartOnly=true and hence make this service more flexible for running multiple instances each on a different user.
* | systemd: multi-instance changes to -defaults-group-suffix=.%IDaniel Black2019-06-141-35/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the multi-instance systemd service file was chosen it effectively relied on /etc/my.cnf.d/my{instancename}.cnf file to define its configuration file. This is problematic if running along side a single instance mariadb service which has /etc/my.cnf that reads all configuration file /etc/my.cnf.d/*.cnf. To prevent the service from auto starting up if a user has this previous configuration ConditionPathExists=!@sysconf2dir@/my%I.cnf to ensure that a user with the previous configuration isn't started in a non-intended mode. Documentation in the service file (should be release notes too), described a recommended migration. A new approach was to use --defaults-group-suffix=.%I as an arguement to mysqld and let the user define a [mysqld.{instancename}] group within the configuration file. This way existing global mysqld configuration options are read with the instance name having special overrides of datadir, port, socket etc. A systemd environment variable MYSQLD_MULTI_INSTANCE is used in the defination as it give the user flexability to use multiple segregation mechanisms between services. This is used multiple times within the service which all needed to be kept consistent. Another notable change is mysql_install_db being part of the ExecStartPre. This provides and auto-initialization for users that run multiple instances.
* | 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-10/+10
| | | | | Use variables in systemd unit file templetes to properly set paths in final systemd unit files.
* spelling fixesklemens2017-03-071-2/+2
|
* MDEV-10538: MariaDB fails to start without galera_recovery in systemd modeNirbhay Choubey2016-08-221-6/+9
| | | | | 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-2/+20
| | | | | | | | | | | | | | 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-10145: Systemd fails to start mysqld in multi-instance modeNirbhay Choubey2016-06-271-2/+6
| | | | | | --defaults-xxx options must be placed before all other options in the command line. Also moved MYSQLD_OPTS at the end so that its options take precedence.
* 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-9007: systemd - service mariadb bootstrapDaniel Black2015-11-021-1/+0
| | | | Now this error out and refers to galera_new_cluster.