diff options
author | David Storch <david.storch@10gen.com> | 2016-09-21 18:37:43 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-09-23 16:19:52 -0400 |
commit | 85a326b84ce1d1009bfbb97dbce934383d802883 (patch) | |
tree | f63254e416d57d6456eeca51fab8b2cb95291c87 /src/mongo/s/client/sharding_connection_hook.cpp | |
parent | 3103bba2a6250f54af065b55763fef7e9e0b49ea (diff) | |
download | mongo-85a326b84ce1d1009bfbb97dbce934383d802883.tar.gz |
SERVER-25158 fail gracefully when attempting to join a cluster with featureCompatibilityVersion 3.4
Diffstat (limited to 'src/mongo/s/client/sharding_connection_hook.cpp')
-rw-r--r-- | src/mongo/s/client/sharding_connection_hook.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp index bb368f443d1..f1db2092a6f 100644 --- a/src/mongo/s/client/sharding_connection_hook.cpp +++ b/src/mongo/s/client/sharding_connection_hook.cpp @@ -159,6 +159,15 @@ void ShardingConnectionHook::onCreate(DBClientBase* conn) { return; } + // Report a useful error message when we are illegally attempting to connect to 3.4 config + // servers in 3.4 feature compatibility mode. + uassert(ErrorCodes::MustUpgrade, + str::stream() << "Using a 3.2 mongos with a cluster that has " + "featureCompatibilityVersion 3.4 is not a supported " + "configuration. See " + "http://dochub.mongodb.org/core/3.4-feature-compatibility.", + configServerModeNumber < 2); + uassert(28785, str::stream() << "Unrecognized configsvr version number: " << configServerModeNumber << ". Expected either 0 or 1", |