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
1=== modified file 'python/libertine/LxcContainer.py'
2--- python/libertine/LxcContainer.py 2016-06-10 20:41:45 +0000
3+++ python/libertine/LxcContainer.py 2016-06-22 16:28:16 +0000
4@@ -84,9 +84,11 @@
5 super().__init__(container_id)
6 self.container_type = "lxc"
7 self.container = lxc_container(container_id)
8- self.lxc_log_file = os.path.join(tempfile.mkdtemp(), 'lxc-start.log')
9- self.container.append_config_item("lxc.logfile", self.lxc_log_file)
10- self.container.append_config_item("lxc.logpriority", "3")
11+
12+ if self.container.defined:
13+ self.lxc_log_file = os.path.join(tempfile.mkdtemp(), 'lxc-start.log')
14+ self.container.append_config_item("lxc.logfile", self.lxc_log_file)
15+ self.container.append_config_item("lxc.logpriority", "3")
16
17 def is_running(self):
18 return self.container.running

Subscribers

People subscribed via source and target branches