Skip to content

Commit 95d3a24

Browse files
munirsiddTurboTurtle
authored andcommitted
[microovn] Collect all logs from microovn
Add support for collecting the actual microovn log files in /var/snap/microovn/common/logs/, which is missing in the current implementation. The current implementation only collects journalctl logs. Signed-off-by: Munir Siddiqui <munir.siddiqui@canonical.com>
1 parent 175c4e3 commit 95d3a24

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

sos/report/plugins/microovn.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def setup(self):
4646
)
4747

4848
db_path = "/var/snap/microovn/common/state/database"
49+
log_path = "/var/snap/microovn/common/logs"
4950

5051
# Check for inconsistent dqlite db intervals
5152
self.add_dir_listing(
@@ -54,11 +55,15 @@ def setup(self):
5455
)
5556

5657
self.add_copy_spec([
57-
f"{db_path}/info.yaml",
58-
f"{db_path}/cluster.yaml",
59-
f"{db_path}/../daemon.yaml",
58+
f"{db_path}/info.yaml",
59+
f"{db_path}/cluster.yaml",
60+
f"{db_path}/../daemon.yaml",
61+
f"{log_path}/*.log",
6062
])
6163

64+
if self.get_option('all_logs'):
65+
self.add_copy_spec(f"{log_path}/*.log.*")
66+
6267
queries = [
6368
{
6469
"query": "SELECT * FROM sqlite_master WHERE type=\"table\";",

0 commit comments

Comments
 (0)