You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Puppet.debug"Checking replicaset member #{host} ..."
156
-
status=rs_status(host)
157
-
raisePuppet::Error,"Can't configure replicaset #{name}, host #{host} is not supposed to be part of a replicaset."ifstatus.key?('errmsg') && status['errmsg'] == 'not running with --replSet'
Puppet.warning"Host #{host} is available, but you are unauthorized because of authentication is enabled: #{auth_enabled}"
161
-
alive.push(member)
162
-
end
163
-
164
-
ifstatus.key?('errmsg') && status['errmsg'].include?('no replset config has been received')
165
-
Puppet.debug'Mongo v4 rs.status() RS not initialized output'
166
-
alive.push(member)
167
-
end
168
-
169
-
ifstatus.key?('set')
170
-
raisePuppet::Error,"Can't configure replicaset #{name}, host #{host} is already part of another replicaset."ifstatus['set'] != name
171
-
172
-
# This node is alive and supposed to be a member of our set
173
-
Puppet.debug"Host #{host} is available for replset #{status['set']}"
174
-
alive.push(member)
175
-
elsifstatus.key?('info')
176
-
Puppet.debug"Host #{host} is alive but unconfigured: #{status['info']}"
177
-
alive.push(member)
156
+
begin
157
+
status=rs_status(host)
158
+
159
+
ifstatus.key?('set')
160
+
raisePuppet::Error,"Can't configure replicaset #{name}, host #{host} is already part of another replicaset."ifstatus['set'] != name
161
+
162
+
# This node is alive and supposed to be a member of our set
163
+
Puppet.debug"Host #{host} is available for replset #{status['set']}"
164
+
alive.push(member)
165
+
elsifstatus.key?('info')
166
+
Puppet.debug"Host #{host} is alive but unconfigured: #{status['info']}"
167
+
alive.push(member)
168
+
end
169
+
rescuePuppet::ExecutionFailure=>e
170
+
raisePuppet::Error,"Can't configure replicaset #{name}, host #{host} is not supposed to be part of a replicaset."ife.message =~ %r{not running with --replSet}
0 commit comments