aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiroslav Miklus <mmiklus@cisco.com>2016-10-24 18:59:12 +0200
committerMiroslav Miklus <mmiklus@cisco.com>2016-10-25 13:34:29 +0000
commitf8b2599f5a64ced7b5232df9a3305ece5d1b4c01 (patch)
treef7b72da7ec402adf5c865e759c20ae639792780b
parentd8f36d0b171606cc8d4c44f798a9ee3244507507 (diff)
Fix interrupted env before uninstalling vpp
Try to continue with previous installation if there is such. Change-Id: I4a757c10243c93f122fbfb3ad9e203fa0ce64606 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
-rwxr-xr-xresources/tools/topo_installation.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/resources/tools/topo_installation.py b/resources/tools/topo_installation.py
index b052a85d34..2931926b15 100755
--- a/resources/tools/topo_installation.py
+++ b/resources/tools/topo_installation.py
@@ -84,6 +84,10 @@ def main():
cmd = "dpkg -l | grep vpp"
ret, _, _ = ssh.exec_command(cmd)
if ret == 0:
+ # Try to fix interrupted installations
+ cmd = 'dpkg --configure -a'
+ stdout = ssh_no_error(ssh, cmd, sudo=True)
+ print "###TI {}".format(stdout)
# Try to remove installed vpp.* packages
cmd = 'apt-get purge -y "vpp.*"'
stdout = ssh_no_error(ssh, cmd, sudo=True)
@@ -102,6 +106,10 @@ def main():
cmd = "dpkg -l | grep vpp"
ret, _, _ = ssh.exec_command(cmd)
if ret == 0:
+ # Try to fix interrupted installations
+ cmd = 'dpkg --configure -a'
+ stdout = ssh_no_error(ssh, cmd, sudo=True)
+ print "###TI {}".format(stdout)
# Try to remove installed vpp.* packages
cmd = 'apt-get purge -y "vpp.*"'
stdout = ssh_no_error(ssh, cmd, sudo=True)