From 353ec2d4294c744ffe864d5e7c63b9f1fc0d6e3b Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 15 Mar 2019 15:13:00 +0000 Subject: [PATCH] service: Fix user initiated shutdown with static tracing Partially revert commit 272f273961e70096938ac7a3fe6477023c8f715a to stop a user-initiated shutdown (typing `exit` or control-d for example at a shall prompt) from hanging and leaving the hypervisor running. This issue only occurs when static agent tracing is in operation. Fixes #479. Signed-off-by: James O. D. Hunt --- kata-agent.service.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kata-agent.service.in b/kata-agent.service.in index 28d26587f5..468c6f9042 100644 --- a/kata-agent.service.in +++ b/kata-agent.service.in @@ -16,4 +16,7 @@ StandardOutput=tty Type=simple ExecStart=@bindir@/@kata-agent@ LimitNOFILE=infinity -ExecStop=/bin/sync +# ExecStop is required for static agent tracing; in all other scenarios +# the runtime handles shutting down the VM. +ExecStop=/bin/sync ; /usr/bin/systemctl --force poweroff +FailureAction=poweroff