[SERVER-42113] Stop overwriting systemd configuration on update with aptitude Created: 08/Jul/19 Updated: 27/Oct/23 Resolved: 30/Sep/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Chad Kreimendahl | Assignee: | Mathew Robinson (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | Dev Tools 2019-10-07 |
| Participants: |
| Description |
|
When an existing install has a manually updated mongod.service configuration file for systemd, it should not be overwritten by an update process. This both causes a pain for administrators and causes mongod to start up with wrong configuration, causing cleanup and other annoying tasks. Worst case it should ask if you want to modify the existing or keep it.
|
| Comments |
| Comment by Chad Kreimendahl [ 29/Sep/19 ] |
|
Typically, yes. We do all of our mounting from /lib as well. While we've been doing this for decades (though obv systemd a bit less time), the man pages had never made that obvious to us. We were well aware of the order of precedence, but figured overwriting (much like /etc/mongod.conf) would be checked. |
| Comment by Mathew Robinson (Inactive) [ 26/Sep/19 ] |
|
Hey sallgeud, Are you editting the files in /lib/systemd/system/mongod.service? This file is not expected to be editted according to SystemD best practices. If you want to edit or create a custom service file for a SystemD service it's expected that you copy the service file from /lib/systemd/system to /etc/systemd/system which takes precedence. You can find more information on this in the manpage for systemd.unit. I also recommend the man page for systemd.service. A good overview of SystemD is this blog post from Leonnart Pottering (the author of SystemD). If you are editting service files in /etc/systemd and having them overwritten by our packages please let me know as that would be a major bug but I was not able to reproduce that behavior. However, edits to the /lib service files were overwritten and this is what I would expect to happen. |
| Comment by Chad Kreimendahl [ 28/Jul/19 ] |
|
mongodb-org-server |
| Comment by Eric Sedor [ 22/Jul/19 ] |
|
Thanks mongo@phish.org, can you clarify the exact package name for the repo being updated/upgraded? |
| Comment by Chad Kreimendahl [ 13/Jul/19 ] |
|
apt-get update; apt-get upgrade – on an unrelated note, it made me create a new account on here. any way to tie my old account with my new one? |
| Comment by Eric Sedor [ 09/Jul/19 ] |
|
Hi sallgeud, Can you clarify the command used to install the package and the update command you're running that's causing the service file to be overwritten? |