Merge lp:~townsend/libertine/fix-lxc-create-fail into lp:libertine

Proposed by Christopher Townsend
Status: Merged
Approved by: Larry Price
Approved revision: 250
Merged at revision: 250
Proposed branch: lp:~townsend/libertine/fix-lxc-create-fail
Merge into: lp:libertine
Diff against target: 18 lines (+5/-3)
1 file modified
python/libertine/LxcContainer.py (+5/-3)
To merge this branch: bzr merge lp:~townsend/libertine/fix-lxc-create-fail
Reviewer Review Type Date Requested Status
Libertine CI Bot continuous-integration Approve
Larry Price Approve
Review via email: mp+298142@code.launchpad.net

Commit message

Only set the log file config if the container is already defined.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Larry Price (larryprice) wrote :

hotfix approved

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'python/libertine/LxcContainer.py'
--- python/libertine/LxcContainer.py 2016-06-10 20:41:45 +0000
+++ python/libertine/LxcContainer.py 2016-06-22 16:28:16 +0000
@@ -84,9 +84,11 @@
84 super().__init__(container_id)84 super().__init__(container_id)
85 self.container_type = "lxc"85 self.container_type = "lxc"
86 self.container = lxc_container(container_id)86 self.container = lxc_container(container_id)
87 self.lxc_log_file = os.path.join(tempfile.mkdtemp(), 'lxc-start.log')87
88 self.container.append_config_item("lxc.logfile", self.lxc_log_file)88 if self.container.defined:
89 self.container.append_config_item("lxc.logpriority", "3")89 self.lxc_log_file = os.path.join(tempfile.mkdtemp(), 'lxc-start.log')
90 self.container.append_config_item("lxc.logfile", self.lxc_log_file)
91 self.container.append_config_item("lxc.logpriority", "3")
9092
91 def is_running(self):93 def is_running(self):
92 return self.container.running94 return self.container.running

Subscribers

People subscribed via source and target branches