Skip to content

Commit

Permalink
retry weave (#1462)
Browse files Browse the repository at this point in the history
* retry weave

* separate connection errors from install errors, and add a timeout

* add version

* infra version
  • Loading branch information
jlmorris3827 authored and venkytv committed Apr 29, 2021
1 parent 06e2cfb commit 15760de
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openstack-tenant/packages/mobiledgex/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE = mobiledgex
VERSION = 4.3.2
VERSION = 4.3.5
DISTRIBUTION = cirrus
COMPONENT = main

Expand Down
23 changes: 23 additions & 0 deletions openstack-tenant/packages/mobiledgex/install-k8s-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,30 @@ done
# exit 1
#fi
# the pod network plugin has to be done for coredns to come up


echo Checking Weave CNI download URL is available
TIMEOUT=$((SECONDS+300))
nc cloud.weave.works 443 -v -z -w 5
while [ $? -ne 0 ] ; do
# retry until timeout
if [ $SECONDS -gt $TIMEOUT ] ; then
echo Timed out waiting for Weave CNI
exit 1
fi
echo Waiting to check Weave URL available - now $SECONDS timeout $TIMEOUT
sleep 5
nc cloud.weave.works 443 -v -z -w 5
done

echo Weave URL is reachable, install CNI

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
if [ $? -ne 0 ] ; then
echo Failed to install Weave
exit 1
fi

kubectl get pods --all-namespaces
kubectl get nodes | grep NotReady
while [ $? -eq 0 ] ; do
Expand Down
2 changes: 1 addition & 1 deletion vmlayer/props.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type VMProperties struct {
var ImageFormatQcow2 = "qcow2"
var ImageFormatVmdk = "vmdk"

var MEXInfraVersion = "4.3.2"
var MEXInfraVersion = "4.3.5"
var ImageNamePrefix = "mobiledgex-v"
var DefaultOSImageName = ImageNamePrefix + MEXInfraVersion

Expand Down

0 comments on commit 15760de

Please sign in to comment.