From 20d0487753b045a0a0af19dffd0d5deec25fd672 Mon Sep 17 00:00:00 2001
From: liyuanr <liyuanrong1@huawei.com>
Date: Wed, 14 Jun 2023 16:00:03 +0800
Subject: [PATCH] KubeOS:support generate coredump

For Go language applications, generating coredump
requires declaring the environment variable GOTRACEBACK=crash,
so the service of os agent adds Environment=GOTRACEBACK=crash
to support generating coredump

Signed-off-by: liyuanr <liyuanrong1@huawei.com>
---
 files/os-agent.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/files/os-agent.service b/files/os-agent.service
index cf71d08..f778804 100644
--- a/files/os-agent.service
+++ b/files/os-agent.service
@@ -12,6 +12,7 @@
 Description=Agent For KubeOS
 
 [Service]
+Environment=GOTRACEBACK=crash
 ExecStart=/usr/bin/os-agent
 KillMode=process
 Restart=on-failure
-- 
2.33.0.windows.2

