diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-06-18 19:45:08 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-06-18 21:44:19 -0400 |
commit | 770e0ab727a053a69873fecc55844ff5b7e6d5db (patch) | |
tree | d0248cc948d43d12d35f8cc0b330ca76802d31f3 | |
parent | 272625228597da9c04aa9843b8128585da16390a (diff) | |
download | mongo-770e0ab727a053a69873fecc55844ff5b7e6d5db.tar.gz |
SERVER-35579 Improve user experience for db.enableFreeMonitoring() when endpoint is down
(cherry picked from commit 2fedb546eab17b0e6e6329f72428e5c979b3e624)
-rw-r--r-- | src/mongo/shell/db.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js index 016dcdb48a5..32e6900754b 100644 --- a/src/mongo/shell/db.js +++ b/src/mongo/shell/db.js @@ -1960,7 +1960,7 @@ var DB; // but is not allowed to inspect it. print("Successfully initiated free monitoring, but unable to determine status " + "as you lack the 'checkFreeMonitoringStatus' privilege."); - return null; + return; } assert.commandWorked(cmd); @@ -1968,10 +1968,10 @@ var DB; print("Successfully initiated free monitoring. The registration is " + "proceeding in the background. "); print("Run db.getFreeMonitoringStatus() at any time to check on the progress."); - return null; + return; } - return cmd; + print(tojson(cmd)); }; DB.prototype.disableFreeMonitoring = function() { |