From cc9da0492d3d1aafdbeddd84eca526d9d27b316a Mon Sep 17 00:00:00 2001 From: Bilal Baqar Date: Thu, 5 Nov 2015 15:39:53 -0800 Subject: [PATCH 1/3] rmmod iovisor in config changed --- hooks/pg_gw_hooks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hooks/pg_gw_hooks.py b/hooks/pg_gw_hooks.py index e6de5a1..fff1e11 100755 --- a/hooks/pg_gw_hooks.py +++ b/hooks/pg_gw_hooks.py @@ -74,6 +74,7 @@ def config_changed(): log("PLUMgrid LCM Key added") return 1 stop_pg() + remove_iovisor() configure_sources(update=True) pkgs = determine_packages() for pkg in pkgs: From 7bfb10686e7e4c05e2108d9ab145ebca9afe5ad9 Mon Sep 17 00:00:00 2001 From: Bilal Baqar Date: Tue, 10 Nov 2015 18:10:26 -0800 Subject: [PATCH 2/3] change sequence of rmmod --- hooks/pg_gw_hooks.py | 2 +- hooks/pg_gw_utils.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/pg_gw_hooks.py b/hooks/pg_gw_hooks.py index fff1e11..8aa54d3 100755 --- a/hooks/pg_gw_hooks.py +++ b/hooks/pg_gw_hooks.py @@ -74,11 +74,11 @@ def config_changed(): log("PLUMgrid LCM Key added") return 1 stop_pg() - remove_iovisor() configure_sources(update=True) pkgs = determine_packages() for pkg in pkgs: apt_install(pkg, options=['--force-yes'], fatal=True) + remove_iovisor() load_iovisor() ensure_mtu() ensure_files() diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py index 302d913..4b3185a 100644 --- a/hooks/pg_gw_utils.py +++ b/hooks/pg_gw_utils.py @@ -167,6 +167,7 @@ def remove_iovisor(): ''' _exec_cmd(cmd=['rmmod', 'iovisor'], error_msg='Error Loading Iovisor Kernel Module') + time.sleep(1) def get_mgmt_interface(): From 9bf84d290fdabc53acbe49eae5dd9bd71dd4a23f Mon Sep 17 00:00:00 2001 From: Bilal Baqar Date: Wed, 18 Nov 2015 01:12:39 -0800 Subject: [PATCH 3/3] Increasing wait between stop starts --- hooks/pg_gw_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py index 4b3185a..d84cfa3 100644 --- a/hooks/pg_gw_utils.py +++ b/hooks/pg_gw_utils.py @@ -140,10 +140,10 @@ def restart_pg(): Stops and Starts PLUMgrid service after flushing iptables. ''' service_stop('plumgrid') - time.sleep(2) + time.sleep(30) _exec_cmd(cmd=['iptables', '-F']) service_start('plumgrid') - time.sleep(5) + time.sleep(30) def stop_pg():