From 880ff10f4842099854bfa8e24251f8216166ce9e Mon Sep 17 00:00:00 2001 From: Dominik Fleischmann Date: Mon, 7 Sep 2020 14:58:10 +0200 Subject: [PATCH] Add minor delay to docker reset - Squid KNF This adds a delay to the docker reset command so that the action doesn't fail. This change is for the Squid KNF used in the Hackfest. Signed-off-by: Dominik Fleischmann --- magma/hackfest_squid_cnf/charms/squid/src/charm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magma/hackfest_squid_cnf/charms/squid/src/charm.py b/magma/hackfest_squid_cnf/charms/squid/src/charm.py index f15c42e4..663410e5 100755 --- a/magma/hackfest_squid_cnf/charms/squid/src/charm.py +++ b/magma/hackfest_squid_cnf/charms/squid/src/charm.py @@ -110,7 +110,7 @@ class SquidK8SCharm(CharmBase): if line_deleted: event.set_results({"output": "URL deleted succesfully"}) - subprocess.check_output("kill -HUP `cat /var/run/squid.pid`", shell=True) + subprocess.Popen("sleep 1 && kill -HUP `cat /var/run/squid.pid`", shell=True) else: event.fail("No URL was deleted") -- GitLab