Merge lp:~abentley/juju-ci-tools/more-logs into lp:juju-ci-tools

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 1363
Proposed branch: lp:~abentley/juju-ci-tools/more-logs
Merge into: lp:juju-ci-tools
Diff against target: 47 lines (+10/-2)
2 files modified
deploy_stack.py (+2/-0)
tests/test_deploy_stack.py (+8/-2)
To merge this branch: bzr merge lp:~abentley/juju-ci-tools/more-logs
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+292040@code.launchpad.net

Commit message

Include syslog and mongodb log when duming logs.

Description of the change

This branch adds syslog and mongodb.log to the list of remote logs we gather.

It does not handle this for the local provider, but this is phased out in 2.0 anyhow.

I have tested it out in AWS and got the expected files:
./abtest
./abtest/machine-1
./abtest/machine-1/cloud-init.log.gz
./abtest/machine-1/unit-dummy-sink-0.log.gz
./abtest/machine-1/machine-1.log.gz
./abtest/machine-1/cloud-init-output.log.gz
./abtest/machine-1/syslog
./abtest/machine-0
./abtest/machine-0/cloud-init.log.gz
./abtest/machine-0/unit-dummy-source-0.log.gz
./abtest/machine-0/machine-0.log.gz
./abtest/machine-0/cloud-init-output.log.gz
./abtest/machine-0/syslog
./admin
./admin/machine-0
./admin/machine-0/logsink.log.gz
./admin/machine-0/cloud-init.log.gz
./admin/machine-0/machine-0.log.gz
./admin/machine-0/cloud-init-output.log.gz
./admin/machine-0/syslog
./admin/machine-0/mongodb.log.gz

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you, this looks familiar with what I wrote, except mine failed on some substrates.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deploy_stack.py'
2--- deploy_stack.py 2016-04-12 20:23:46 +0000
3+++ deploy_stack.py 2016-04-15 19:07:25 +0000
4@@ -303,6 +303,8 @@
5 '/var/log/juju/*.log',
6 # TODO(gz): Also capture kvm container logs?
7 '/var/lib/juju/containers/juju-*-lxc-*/',
8+ '/var/log/syslog',
9+ '/var/log/mongodb/mongodb.log',
10 ]
11
12 try:
13
14=== modified file 'tests/test_deploy_stack.py'
15--- tests/test_deploy_stack.py 2016-04-12 20:23:46 +0000
16+++ tests/test_deploy_stack.py 2016-04-15 19:07:25 +0000
17@@ -433,7 +433,10 @@
18 '10.10.0.1',
19 'sudo chmod -Rf go+r /var/log/cloud-init*.log'
20 ' /var/log/juju/*.log'
21- ' /var/lib/juju/containers/juju-*-lxc-*/'),),
22+ ' /var/lib/juju/containers/juju-*-lxc-*/'
23+ ' /var/log/syslog'
24+ ' /var/log/mongodb/mongodb.log'
25+ ),),
26 cc_mock.call_args_list[0][0])
27 self.assertEqual(
28 (get_timeout_prefix(120) + (
29@@ -445,6 +448,8 @@
30 '10.10.0.1:/var/log/cloud-init*.log',
31 '10.10.0.1:/var/log/juju/*.log',
32 '10.10.0.1:/var/lib/juju/containers/juju-*-lxc-*/',
33+ '10.10.0.1:/var/log/syslog',
34+ '10.10.0.1:/var/log/mongodb/mongodb.log',
35 '/foo'),),
36 cc_mock.call_args_list[1][0])
37
38@@ -475,7 +480,8 @@
39 ["DEBUG ssh -o 'User ubuntu' -o 'UserKnownHostsFile /dev/null' "
40 "-o 'StrictHostKeyChecking no' -o 'PasswordAuthentication no' "
41 "10.10.0.1 'sudo chmod -Rf go+r /var/log/cloud-init*.log "
42- "/var/log/juju/*.log /var/lib/juju/containers/juju-*-lxc-*/'",
43+ "/var/log/juju/*.log /var/lib/juju/containers/juju-*-lxc-*/ "
44+ "/var/log/syslog /var/log/mongodb/mongodb.log'",
45 'WARNING Could not allow access to the juju logs:',
46 'WARNING None',
47 'WARNING Could not retrieve some or all logs:',

Subscribers

People subscribed via source and target branches