Destroy machines before destroying the model
[osm/N2VC.git] / n2vc / provisioner.py
index 243d67d..33c13f1 100644 (file)
@@ -73,6 +73,7 @@ fi
 
 IPTABLES_SCRIPT = """#!/bin/bash
 set -e
 
 IPTABLES_SCRIPT = """#!/bin/bash
 set -e
+apt-get update
 DEBIAN_FRONTEND=noninteractive apt-get install -yqq iptables-persistent
 iptables -t nat -A OUTPUT -p tcp -d {} -j DNAT --to-destination {}
 netfilter-persistent save
 DEBIAN_FRONTEND=noninteractive apt-get install -yqq iptables-persistent
 iptables -t nat -A OUTPUT -p tcp -d {} -j DNAT --to-destination {}
 netfilter-persistent save
@@ -396,6 +397,7 @@ class SSHProvisioner:
         retry = 10
         attempts = 0
         delay = 15
         retry = 10
         attempts = 0
         delay = 15
+
         while attempts <= retry:
             try:
                 attempts += 1
         while attempts <= retry:
             try:
                 attempts += 1