Bug 768594 - mysqld.service is overwritten on update losing LimitNOFILE
Summary: mysqld.service is overwritten on update losing LimitNOFILE
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-17 10:20 UTC by ziggyh
Modified: 2011-12-19 08:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-17 16:00:44 UTC
Type: ---


Attachments (Terms of Use)

Description ziggyh 2011-12-17 10:20:27 UTC
Description of problem:
In order to increase the amount of open files allowed in mysql, one has to enter LimitNOFILE in mysqld.service as the value of open-files-limit is not read from my.cnf any more. On upgrading mysql, the mysqld.service file is overwritten, losing any changes.

Version-Release number of selected component (if applicable):
Any version included in fc14 onwards.

How reproducible:
Always on upgrade/update.

Steps to Reproduce:
1.Edit mysqld.service adding LimitNOFILE (or supposedly anything else)
2.Upgrade to newer version
3.
  
Actual results:
Changes are lost as the mysqld.service file is overwritten.

Expected results:
Changes are kept and mysqld.service is created as .rpmnew or similar.

Additional info:
This has happened on fc14/fc15/fc16.
I am unsure if this should be classified under mysql or systemd, but I have chosen the former assuming this could be fixed in the packaging of said RPM.

Comment 1 Tom Lane 2011-12-17 16:00:44 UTC
This is not a bug; you are not supposed to modify systemd service files directly.  The correct procedure for making a custom service definition is to create your own file in /lib/systemd/system/.  You can just copy-and-paste the system-supplied version, but it's probably a better plan to "include" the supplied version and then define just the settings you need.

Comment 2 Honza Horak 2011-12-19 08:50:24 UTC
(In reply to comment #1)
> The correct procedure for making a custom service definition is to
> create your own file in /lib/systemd/system/.

This was a typo probably, you should use /etc/systemd/system/ for your locally modified unit files. For more info see:
https://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F


Note You need to log in before you can comment on or make changes to this bug.