added ssl support based on default.
[joid.git] / ci / 03-maasdeploy.sh
index 869d97e..7ccb72d 100755 (executable)
@@ -61,9 +61,9 @@ if [ "$snapinstall" -eq "0" ]; then
     sudo apt-add-repository ppa:maas/stable -y
 fi
 if [ "bionic" != "$opnfvdistro" ]; then
-        sudo apt-add-repository cloud-archive:pike -y
+        sudo apt-add-repository cloud-archive:queens -y
     if [ "aarch64" == "$NODE_ARCTYPE" ]; then
-        sudo add-apt-repository ppa:ubuntu-cloud-archive/pike-staging -y
+        sudo add-apt-repository ppa:ubuntu-cloud-archive/queens-staging -y
     fi
 fi
 
@@ -579,7 +579,20 @@ addnodes(){
         done
     fi
 
-    maas $PROFILE pods create type=virsh power_address="$VIRSHURL" power_user=$USER
+     # Iterate to avoid "Conflict error" issue
+     for ii in 1 2 3 4 5 6 7 8 9 10
+     do
+       echo "Try $ii"
+       maas $PROFILE pods create type=virsh power_address="$VIRSHURL" power_user=$USER > /tmp/deploy.out 2>&1 || true
+       cat /tmp/deploy.out
+       if ! fgrep -q 'Conflict' /tmp/deploy.out
+       then
+         break
+       else
+         continue
+       fi
+     done
+
 
     # Make sure nodes are added into MAAS and none of them is in commissioning state
     i=0