SERVER-50866 SystemD unit should wait for network-online.target
We were previously waiting for network.target, which does not actually mean the network interface will be up and have an IP address assigned. During some reboots, it's possible that mongod would start up before the network interface was fully online, and this caused startup failures if mongod was configured to listen on a specific IP address. Now we wait for network-online.target instead to ensure the IP address is available when mongod starts.
This commit is contained in:
committed by
Evergreen Agent
parent
684894759e
commit
3dc3db0d78
3
debian/mongod.service
vendored
3
debian/mongod.service
vendored
@@ -1,7 +1,8 @@
|
||||
[Unit]
|
||||
Description=MongoDB Database Server
|
||||
Documentation=https://docs.mongodb.org/manual
|
||||
After=network.target
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
User=mongodb
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[Unit]
|
||||
Description=MongoDB Database Server
|
||||
Documentation=https://docs.mongodb.org/manual
|
||||
After=network.target
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
User=mongod
|
||||
|
||||
Reference in New Issue
Block a user