Merge lp:~ursinha/landscape-charm/add-etc-hosts-and-friends into lp:~landscape/landscape-charm/tools

Proposed by Ursula Junque
Status: Merged
Approved by: Ursula Junque
Approved revision: 29
Merged at revision: 29
Proposed branch: lp:~ursinha/landscape-charm/add-etc-hosts-and-friends
Merge into: lp:~landscape/landscape-charm/tools
Diff against target: 45 lines (+11/-0)
3 files modified
Makefile (+4/-0)
collect-logs (+3/-0)
test_collect-logs.py (+4/-0)
To merge this branch: bzr merge lp:~ursinha/landscape-charm/add-etc-hosts-and-friends
Reviewer Review Type Date Requested Status
Alberto Donato (community) Approve
Review via email: mp+305767@code.launchpad.net

Commit message

Adding /etc/hosts and /etc/network to the list of collected logs.

Description of the change

Adding /etc/hosts and /etc/network to the list of collected logs.

Also added a Makefile so we can just "make test" to run unit tests.

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'Makefile'
2--- Makefile 1970-01-01 00:00:00 +0000
3+++ Makefile 2016-09-14 22:31:07 +0000
4@@ -0,0 +1,4 @@
5+test:
6+ python -m unittest test_collect-logs
7+
8+.PHONY: test
9
10=== modified file 'collect-logs'
11--- collect-logs 2016-08-31 15:32:04 +0000
12+++ collect-logs 2016-09-14 22:31:07 +0000
13@@ -18,7 +18,10 @@
14 log = logging.getLogger("collect-logs")
15 PRG = os.path.abspath(__file__)
16 LOGS = [
17+ # Basics
18 "/var/log",
19+ "/etc/hosts",
20+ "/etc/network",
21 # for the landscape client
22 "/var/lib/landscape/client",
23 # for the landscape server charm
24
25=== modified file 'test_collect-logs.py'
26--- test_collect-logs.py 2016-08-29 18:26:55 +0000
27+++ test_collect-logs.py 2016-09-14 22:31:07 +0000
28@@ -325,6 +325,8 @@
29 ).format(
30 tarfile,
31 " ".join(["/var/log",
32+ "/etc/hosts",
33+ "/etc/network",
34 "/var/lib/landscape/client",
35 "/etc/apache2",
36 "/etc/haproxy",
37@@ -396,6 +398,8 @@
38 ).format(
39 tarfile,
40 " ".join(["/var/log",
41+ "/etc/hosts",
42+ "/etc/network",
43 "/var/lib/landscape/client",
44 "/etc/apache2",
45 "/etc/haproxy",

Subscribers

People subscribed via source and target branches

to all changes: