aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam R Bell <a_0x07@protonmail.ch>2020-08-11 16:51:24 -0600
committerJake Hunsaker <jhunsake@redhat.com>2020-08-14 12:40:46 -0400
commit65829aba4bbdd74aa2478b94b393ab53613d4e79 (patch)
treefb163109b8c1f9d368d41e04efdb4c7107914b18
parent3e1dbb201bb619159f38b45d458864331977bd18 (diff)
downloadsos-65829aba4bbdd74aa2478b94b393ab53613d4e79.tar.gz
[ubuntu] Collect /var/log/ubuntu-advantage.log file(s).
This log file is not being collected. Canonical engineers have needed to ask for the file outside of sosreport. This addition will collect the log file, as applicable, as part of sosreport. Resolves: #2199 Signed-off-by: Adam R Bell <adam.bell@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/ubuntu.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/sos/report/plugins/ubuntu.py b/sos/report/plugins/ubuntu.py
index b6b88fcf..020c5c93 100644
--- a/sos/report/plugins/ubuntu.py
+++ b/sos/report/plugins/ubuntu.py
@@ -20,5 +20,15 @@ class Ubuntu(Plugin, UbuntuPlugin):
self.add_cmd_output([
"ubuntu-security-status --thirdparty --unavailable",
"hwe-support-status --verbose",
- "ubuntu-advantage status"
])
+
+ if self.is_installed('ubuntu-advantage-tools'):
+ self.add_cmd_output("ubuntu-advantage status")
+ if not self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/ubuntu-advantage.log",
+ "/var/log/ubuntu-advantage.log.1",
+ "/var/log/ubuntu-advantage.log.2*",
+ ])
+ else:
+ self.add_copy_spec("/var/log/ubuntu-advantage.log*")