summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2020-09-10 11:15:26 -0700
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-29 03:43:51 +0000
commit3dc3db0d78d4d8851ad50dd52ee51fed84ecc7e0 (patch)
tree186923ce5d4f12c72268f9d9cba36bbed0540841 /rpm
parent684894759e5bf26d07aa5fe458aa6bed38907d03 (diff)
downloadmongo-3dc3db0d78d4d8851ad50dd52ee51fed84ecc7e0.tar.gz
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.
Diffstat (limited to 'rpm')
-rw-r--r--rpm/mongod.service3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpm/mongod.service b/rpm/mongod.service
index 67ff1879cf6..92b4b123022 100644
--- a/rpm/mongod.service
+++ b/rpm/mongod.service
@@ -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