Merge lp:~larryprice/libertine/lxc-log-during-create into lp:libertine

Proposed by Larry Price
Status: Merged
Approved by: Christopher Townsend
Approved revision: 317
Merged at revision: 332
Proposed branch: lp:~larryprice/libertine/lxc-log-during-create
Merge into: lp:libertine
Diff against target: 38 lines (+5/-2)
1 file modified
python/libertine/LxcContainer.py (+5/-2)
To merge this branch: bzr merge lp:~larryprice/libertine/lxc-log-during-create
Reviewer Review Type Date Requested Status
Christopher Townsend Approve
Libertine CI Bot continuous-integration Approve
Review via email: mp+310575@code.launchpad.net

Commit message

Dump the lxc log after a failed create.

Description of the change

Dump the lxc log after a failed create.

I noticed we're not dumping the logs after a failed create while I was working on the snap.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:315
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/229/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/482
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/379
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/379
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/379
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/379
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/379
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/379
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/484
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/464
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/464/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/464
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/464/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/464
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/464/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/464
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/464/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/464
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/464/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/464
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/464/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/229/rebuild

review: Approve (continuous-integration)
316. By Larry Price

only need to dump mid-create

317. By Larry Price

self.

Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:317
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/231/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/485
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/381
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/381
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/381
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/381
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/381
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/381
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/487
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/467
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/467/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/467
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/467/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/467
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/467/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/467
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/467/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/467
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/467/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/467
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/467/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/231/rebuild

review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Ok

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'python/libertine/LxcContainer.py'
2--- python/libertine/LxcContainer.py 2016-10-18 14:01:52 +0000
3+++ python/libertine/LxcContainer.py 2016-11-10 20:43:59 +0000
4@@ -127,7 +127,7 @@
5 del os.environ['http_proxy']
6 del os.environ['https_proxy']
7
8-
9+
10 class LibertineLXC(BaseContainer):
11 """
12 A concrete container type implemented using an LXC container.
13@@ -166,7 +166,7 @@
14
15 def start_container(self):
16 if self.lxc_manager_interface:
17- (result, error) = self.lxc_manager_interface.operation_start(self.container_id, self.lxc_log_file)
18+ (result, error) = self.lxc_manager_interface.operation_start(self.container_id, self.lxc_log_file)
19 else:
20 (result, error) = lxc_start(self.container, self.lxc_log_file)
21
22@@ -241,6 +241,7 @@
23 "release": self.installed_release,
24 "arch": self.architecture}):
25 print("Failed to create container")
26+ self._dump_lxc_log()
27 return False
28
29 self.create_libertine_config()
30@@ -347,6 +348,8 @@
31
32 def _set_lxc_log(self):
33 self.lxc_log_file = os.path.join(tempfile.mkdtemp(), 'lxc-start.log')
34+ self.container.append_config_item("lxc.logfile", self.lxc_log_file)
35+ self.container.append_config_item("lxc.logpriority", "3")
36
37 def _dump_lxc_log(self):
38 if os.path.exists(self.lxc_log_file):

Subscribers

People subscribed via source and target branches