From d432d14f22ec65e88a164e2a76c455f5722c4c9d Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Thu, 19 Jun 2014 21:35:49 -0700 Subject: [PATCH] When checking replicaset and error message is "can't get local.system.replset config from self or any seed", then initiate replicaset. --- providers/replica_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/replica_set.rb b/providers/replica_set.rb index 93d1bd3..e574d47 100644 --- a/providers/replica_set.rb +++ b/providers/replica_set.rb @@ -60,7 +60,7 @@ replica_set_initiated = true rescue ::Mongo::OperationFailure => ex # unless it's telling us to initiate the replica set - unless ex.message.include? 'run rs.initiate' + unless ex.message.include?('run rs.initiate') || ex.message.include?("can't get local.system.replset config from self or any seed") raise # re-raise the error - we want to know about it end end