From: Adam Israel Date: Mon, 7 Oct 2019 21:01:16 +0000 (-0400) Subject: Fix provisoner timeout X-Git-Tag: v7.0.0rc1~25 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=commitdiff_plain;h=e8e6de12ba5fb659891be3181cca4b48776bc193;ds=sidebyside Fix provisoner timeout Run `apt-get update` before attempting to install a package, for cloud images without an apt cache. Change-Id: Id67a347d90edbaa862a6d9c48ed1613f3fe2ad0d Signed-off-by: Adam Israel --- diff --git a/n2vc/provisioner.py b/n2vc/provisioner.py index 243d67d..33c13f1 100644 --- a/n2vc/provisioner.py +++ b/n2vc/provisioner.py @@ -73,6 +73,7 @@ fi 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 @@ -396,6 +397,7 @@ class SSHProvisioner: retry = 10 attempts = 0 delay = 15 + while attempts <= retry: try: attempts += 1