diff options
author | Kshitij Gupta <kshitij.gupta@mongodb.com> | 2022-01-17 19:35:13 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-03 06:34:22 +0000 |
commit | 1d8aaed7f9286ce90317d03fc1815bb58b43e31d (patch) | |
tree | c0ef354434941aa446bad53f9b9f10741c1c2fe3 /src/mongo/s/sharding_uptime_reporter.cpp | |
parent | 3b73633480220630507435a4edc3fb141739e93c (diff) | |
download | mongo-1d8aaed7f9286ce90317d03fc1815bb58b43e31d.tar.gz |
SERVER-59384: Should provide ability to perform periodic DNS health checks
Diffstat (limited to 'src/mongo/s/sharding_uptime_reporter.cpp')
-rw-r--r-- | src/mongo/s/sharding_uptime_reporter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/s/sharding_uptime_reporter.cpp b/src/mongo/s/sharding_uptime_reporter.cpp index 31fd4bc6162..a12d4d84e73 100644 --- a/src/mongo/s/sharding_uptime_reporter.cpp +++ b/src/mongo/s/sharding_uptime_reporter.cpp @@ -75,8 +75,10 @@ void reportStatus(OperationContext* opCtx, // balancer is never active in mongos. Here for backwards compatibility only. mType.setWaiting(true); mType.setMongoVersion(VersionInfoInterface::instance().version().toString()); - mType.setAdvisoryHostFQDNs( - getHostFQDNs(hostName, HostnameCanonicalizationMode::kForwardAndReverse)); + auto statusWith = getHostFQDNs(hostName, HostnameCanonicalizationMode::kForwardAndReverse); + if (statusWith.isOK()) { + mType.setAdvisoryHostFQDNs(statusWith.getValue()); + } try { // Field "created" should not be updated every time. |