[SERVER-71380] Restart mongod upon RPM update conditionally Created: 15/Nov/22 Updated: 29/Oct/23 Resolved: 06/Dec/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Torsten Spindler | Assignee: | Ryan Egesdahl (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: |
This was tested on Amazon Linux 2, but should hold true on other distros using the RPM. |
| Participants: |
| Description |
|
In the RPM spec the mongod service is (re)started upon an update, no matter if mongod service is running or not: With help of systemctl is-active this can be changed to restart only a running mongod service:
|
| Comments |
| Comment by Githook User [ 06/Dec/22 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: |
| Comment by Ryan Egesdahl (Inactive) [ 05/Dec/22 ] |
|
systemd also has a try-restart action, which is essentially the same as is-active followed by restart. |