Description of problem:
systemd overrides in /etc/systemd/system/name.service cause the service to fail, when the parameters work in /usr/lib/systemd/system/name.service. Failed when trying to customise mysql.service.
Version-Release number of selected component (if applicable):
systemd 0:44-17
mysql-server mysql-server-5.5.28-1
How reproducible: every time
Steps to Reproduce:
1. In /etc/systemd/system/mysql.service, add the following:
.include /usr/lib/systemd/system/mysqld.service
[Service]
LimitNOFILE=100000
ExecStart=/usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --basedir=/usr
2. systemctl --system daemon-reload
3. service mysqld start
Actual results:
[root@localhost sysconfig]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to issue method call: Unit mysqld.service failed to load: Invalid argument. See system logs and 'systemctl status mysqld.service' for details.
[root@localhost sysconfig]# systemctl status mysqld.service
mysqld.service - MySQL database server
Loaded: error (Reason: Invalid argument)
Active: inactive (dead) since Thu, 08 Nov 2012 08:51:25 +0000; 5min ago
Main PID: 27719 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/mysqld.service
Nov 08 00:45:54 localhost.localdomain mysqld_safe[27719]: 121108 00:45:54 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
Nov 08 00:45:54 localhost.localdomain mysqld_safe[27719]: 121108 00:45:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Expected results:
MySQL starts up with values specified in /usr/lib/systemd/system/mysql.service
Additional info:
When I set the values from /etc/systemd/system/mysql.service directly in /usr/lib/systemd/system/mysqld.service MySQL starts correctly. As a workaround, I have kept the values in /usr/lib/systemd/system/mysqld.service
Comment 1Jóhann B. Guðmundsson
2012-11-08 13:54:33 UTC
Parts of systemd might be a bit more tolerant against spelling errors in units which resides under /usr/lib/systemd/system/ directory in anycase the error message more descriptive as in show which argument is considered invalid ( think we have this on the Fit and Finish tracker already )