From ae08ea3211d8cc1b9e9c3a185cb39a49a53454b5 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Mon, 11 Mar 2019 14:12:45 +0000 Subject: [PATCH 1/4] scripts: Add helper function to collect script Add a `have_service()` helper function to the data collection script to simplify the code. Signed-off-by: James O. D. Hunt --- data/kata-collect-data.sh.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/kata-collect-data.sh.in b/data/kata-collect-data.sh.in index 28281b211..38d712705 100644 --- a/data/kata-collect-data.sh.in +++ b/data/kata-collect-data.sh.in @@ -141,6 +141,13 @@ have_cmd() [ $ret -eq 0 ] } +have_service() +{ + local service="$1" + + systemctl status "${service}" >/dev/null 2>&1 +} + show_quoted_text() { local language="$1" @@ -593,7 +600,7 @@ show_throttler_details() "kata-vc-throttler" \ "vc-throttler" do - systemctl status "${unit}" >/dev/null 2>&1 && \ + have_service "${unit}" && \ run_cmd_and_show_quoted_output "" "systemctl show ${unit}" done } From 30f9776e60c78b9569b42319af09c8c9a17c579f Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Mon, 11 Mar 2019 14:14:47 +0000 Subject: [PATCH 2/4] scripts: Create separate section for crio in collect script Rather than folding crio under k8s, move it to a separate sub-section. Signed-off-by: James O. D. Hunt --- data/kata-collect-data.sh.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data/kata-collect-data.sh.in b/data/kata-collect-data.sh.in index 38d712705..79ffdabf2 100644 --- a/data/kata-collect-data.sh.in +++ b/data/kata-collect-data.sh.in @@ -337,11 +337,12 @@ show_container_mgr_details() run_cmd_and_show_quoted_output "" "kubectl version" run_cmd_and_show_quoted_output "" "kubectl config view" run_cmd_and_show_quoted_output "" "systemctl show kubelet" + fi - if have_cmd "crio"; then - run_cmd_and_show_quoted_output "" "crio --version" - run_cmd_and_show_quoted_output "" "systemctl show crio" - fi + if have_cmd "crio"; then + subheading "crio" + run_cmd_and_show_quoted_output "" "crio --version" + run_cmd_and_show_quoted_output "" "systemctl show crio" fi separator From 7266d31813c06b22f7725097f1470cf1ab95e04a Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Mon, 11 Mar 2019 14:16:02 +0000 Subject: [PATCH 3/4] scripts: Log crio config file in collect script Add details of the crio config to the data collection script. Partially fixes #1349. Signed-off-by: James O. D. Hunt --- data/kata-collect-data.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/data/kata-collect-data.sh.in b/data/kata-collect-data.sh.in index 79ffdabf2..a0392778c 100644 --- a/data/kata-collect-data.sh.in +++ b/data/kata-collect-data.sh.in @@ -343,6 +343,7 @@ show_container_mgr_details() subheading "crio" run_cmd_and_show_quoted_output "" "crio --version" run_cmd_and_show_quoted_output "" "systemctl show crio" + run_cmd_and_show_quoted_output "" "cat /etc/crio/crio.conf" fi separator From f2a506affafffeacc1be3479bd9a62316f819068 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Mon, 11 Mar 2019 14:17:36 +0000 Subject: [PATCH 4/4] scripts: Add containerd details to collect script Add a new sub-section for containerd details. Fixes #1349. Signed-off-by: James O. D. Hunt --- data/kata-collect-data.sh.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/kata-collect-data.sh.in b/data/kata-collect-data.sh.in index a0392778c..5e6ddc895 100644 --- a/data/kata-collect-data.sh.in +++ b/data/kata-collect-data.sh.in @@ -346,6 +346,14 @@ show_container_mgr_details() run_cmd_and_show_quoted_output "" "cat /etc/crio/crio.conf" fi + + if have_cmd "containerd"; then + subheading "containerd" + run_cmd_and_show_quoted_output "" "containerd --version" + run_cmd_and_show_quoted_output "" "systemctl show containerd" + run_cmd_and_show_quoted_output "" "cat /etc/containerd/config.toml" + fi + separator }