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
mongodb """--quiet"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'>${tmp_dir}/horizons-3.json
sleep 10 # give some time for client pod to be ready
47
51
48
-
isMaster=$(run_mongo_tls "db.hello().isWritablePrimary""clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" mongodb """--quiet"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'| grep -v certificateNames)
49
-
if [ "${isMaster}"!="true" ];then
50
-
echo"mongo client should've redirect the connection to primary"
51
-
exit 1
52
-
fi
52
+
run_mongo_tls "rs.conf().members.map(function(member) { return member.horizons }).sort((a, b) => a.external.localeCompare(b.external))" \
mongodb """--quiet"| grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'>"${tmp_dir}"/horizons-3.json
isMaster=$(run_mongo_tls "db.hello().isWritablePrimary""clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" mongodb """--quiet"| grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'| grep -v certificateNames)
58
+
if [ "${isMaster}"!="true" ];then
59
+
echo"mongo client should've redirect the connection to primary"
60
+
exit 1
61
+
fi
58
62
59
-
sleep 10 # give some time for re-election
63
+
# stepping down to ensure we haven't redirected to primary just because primary is pod-0
isMaster=$(run_mongo_tls "db.hello().isWritablePrimary""clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" mongodb """--quiet"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'| grep -v certificateNames)
62
-
if [ "${isMaster}"!="true" ];then
63
-
echo"mongo client should've redirect the connection to primary"
64
-
exit 1
65
-
fi
68
+
sleep 10 # give some time for re-election
66
69
67
-
desc "scaling up the cluster"
70
+
isMaster=$(run_mongo_tls "db.hello().isWritablePrimary""clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" mongodb """--quiet"| grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'| grep -v certificateNames)
71
+
if [ "${isMaster}"!="true" ];then
72
+
echo"mongo client should've redirect the connection to primary"
mongodb """--quiet"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'>${tmp_dir}/horizons-5.json
mongodb """--quiet"| grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'>"${tmp_dir}"/horizons-5.json
mongodb """--quiet"| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'>${tmp_dir}/horizons.json
mongodb """--quiet"| grep -E -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|does not match the remote host name'>"${tmp_dir}"/horizons.json
0 commit comments