From 599b7d42edc015c0c56bfb3ab17201a7bff3e685 Mon Sep 17 00:00:00 2001 From: Andriy Berestovskyy Date: Fri, 29 Apr 2016 15:11:36 +0200 Subject: [PATCH] Cleanup SR-IOV and vhost0 configurations Change-Id: I60ecd3850ee3b3434ca7b5fbe7f632a13f1a08db Closes-bug: #1576680 --- fabfile/tasks/uninstall.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fabfile/tasks/uninstall.py b/fabfile/tasks/uninstall.py index 562ba0178..d9e174c14 100644 --- a/fabfile/tasks/uninstall.py +++ b/fabfile/tasks/uninstall.py @@ -324,6 +324,16 @@ def uninstall_only_vrouter_node(manage_nova_compute='yes', *args): pkgs.append('ceilometer-agent-compute') apt_uninstall(pkgs) sudo("sed -i 's/inet manual/inet dhcp/g' /etc/network/interfaces") + # Delete vhost0 interface + sudo("""sed -ri.bak ' + /^auto vhost0/ d + /^iface vhost0/,/^(\w|$)/ { + /iface vhost0/ d + /^\s/ d + } + ' /etc/network/interfaces""") + # Remove SR-IOV configuration + sudo("sed -i.bak '/sriov_numvfs/ d' /etc/rc.local") else: pkgs = get_pkg_list() yum_uninstall(pkgs)