Update robot test tag from sanity to daily
[osm/devops.git] / installers / full_install_osm.sh
index a742155..b9330b3 100755 (executable)
@@ -137,7 +137,7 @@ function remove_iptables() {
 
     if [ -z "$DEFAULT_IP" ]; then
         DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
-        [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}')
+        [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
         [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0"
         DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a[1]}'`
         [ -z "$DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route"
@@ -838,6 +838,7 @@ function install_kube() {
     sudo apt-get update
     echo "Installing Kubernetes Packages ..."
     sudo apt-get install -y kubelet=1.15.0-00 kubeadm=1.15.0-00 kubectl=1.15.0-00
+    sudo apt-mark hold kubelet kubeadm kubectl
 }
 
 #initializes kubernetes control plane
@@ -1198,7 +1199,7 @@ function install_lightweight() {
     DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
     [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}')
     [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0"
-    DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]}'`
+    DEFAULT_IP=`ip -o -4 a s ${DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]}'`
     [ -z "$DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route"
     DEFAULT_MTU=$(ip addr show ${DEFAULT_IF} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}')
 
@@ -1932,5 +1933,3 @@ export OSM_USE_LOCAL_DEVOPS=true
 wget -q -O- https://osm-download.etsi.org/ftp/osm-9.0-nine/README2.txt &> /dev/null
 track end
 echo -e "\nDONE"
-
-