Skip to content

Commit

Permalink
check ETCD records instead of api
Browse files Browse the repository at this point in the history
  • Loading branch information
dav1x committed Mar 28, 2019
1 parent 9261bf8 commit f48896e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions upi/vsphere/network/cidr_to_ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function error_exit() {
function check_deps() {
test -f $(which jq) || error_exit "jq command not detected in path, please install it"
test -f $(which ipcalc) || error_exit "ipcalc command not detected in path, please install it"
test -f $(which dig) || error_exit "dig command not detected in path, please install it"

}

Expand Down Expand Up @@ -41,9 +42,12 @@ function produce_output() {
w_count=0

# check cluster_domain DNS first
DNS_RECORDS=$(dig +short api.${cluster_domain}| sort)
for ETCD in 0 1 2
do

DNS_RECORDS+="$(dig +short etcd-$ETCD.${cluster_domain}) "
done


for ENTRY in ${DNS_RECORDS}
do
ping -c1 -w1 $ENTRY > /dev/null 2>&1
Expand Down

0 comments on commit f48896e

Please sign in to comment.