Skip to content

Commit

Permalink
Merge branch 'GDO-746' into 'master'
Browse files Browse the repository at this point in the history
GDO-760 mismatch of seed server

Closes GDO-746

See merge request devops-program/docker-builds!434
  • Loading branch information
timothynguyen90 committed Apr 1, 2021
2 parents b1e503e + c657f29 commit e92e770
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion pingdatacommon/opt/staging/hooks/pingdata.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,32 @@ prepareToJoinTopology ()
return 1
fi

#Change the seed build out for pingDirectory-0 server that has been restarted and it's pvc lost
if test "${_podInstanceName}" = "${_seedInstanceName}" &&
test "${PD_STATE}" = "SETUP" && test "${ORCHESTRATION_TYPE}" = "KUBERNETES"
then
if test -z "${K8S_CLUSTERS}" &&
test -z "${K8S_CLUSTER}" &&
test -z "${K8S_SEED_CLUSTER}"
then
_IPList=$( getIPsForDomain "${K8S_STATEFUL_SET_SERVICE_NAME}" )
else
_IPList=$( getIPsForDomain "${K8S_CLUSTER}" )
fi

for ip in ${_IPList}
do
if test "$(getIP "${_podHostname}")" != "${ip}"
then
_seedHostname=${ip}
_seedInstanceName=${ip}
waitUntilLdapUp "${_seedHostname}" "${_seedLdapsPort}" "" 2>&1 > /dev/null
echo_yellow "This seed server is out of sync with the topology. Using alternative seed server: ${_seedHostname}:${_seedLdapsPort}"
export_container_env _seedInstanceName _seedHostname
fi
done
fi

#
#- * Ensure the Seed Server is accepting queries
#
Expand Down Expand Up @@ -1423,7 +1449,7 @@ set_server_unavailable ()

if test "$( isImageVersionGtEq 8.2.0 )" -eq 0
then
_jsonMsg="{ \"status\":\"${_status}\", \"source\":\"${0}\", \"udpated\":\"$(date)\" }"
_jsonMsg="{ \"status\":\"${_status}\", \"source\":\"${0}\", \"updated\":\"$(date)\" }"

_dsconfigOptions=$(get_dsconfig_options "$2")
_batchFile=$(mktemp)
Expand Down

0 comments on commit e92e770

Please sign in to comment.