Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1113)

Issue 73310043: Detect backing filesystem for lxc container dir.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by thumper
Modified:
10 years, 1 month ago
Reviewers:
mp+210101, axw
Visibility:
Public.

Description

Detect backing filesystem for lxc container dir. Have the LXC container manager know the underlying filesystem of the container directory. This is necessary for the container manager to become btrfs aware, for snapshotting containers on clone. https://code.launchpad.net/~thumper/juju-core/container-dir-filesystem-type/+merge/210101 Requires: https://code.launchpad.net/~thumper/juju-core/autostart-containers-after-creation/+merge/210099 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -5 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M container/lxc/export_test.go View 1 chunk +3 lines, -2 lines 0 comments Download
M container/lxc/lxc.go View 4 chunks +35 lines, -3 lines 2 comments Download
M container/lxc/lxc_test.go View 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 3
thumper
Please take a look.
10 years, 1 month ago (2014-03-09 21:39:10 UTC) #1
axw
https://codereview.appspot.com/73310043/diff/1/container/lxc/lxc.go File container/lxc/lxc.go (right): https://codereview.appspot.com/73310043/diff/1/container/lxc/lxc.go#newcode49 container/lxc/lxc.go:49: var FsCommandOutput = (*exec.Cmd).CombinedOutput Do you really want CombinedOutput? ...
10 years, 1 month ago (2014-03-10 01:20:01 UTC) #2
axw
10 years, 1 month ago (2014-03-11 04:12:12 UTC) #3
On 2014/03/10 01:20:01, axw wrote:
> https://codereview.appspot.com/73310043/diff/1/container/lxc/lxc.go
> File container/lxc/lxc.go (right):
> 
> https://codereview.appspot.com/73310043/diff/1/container/lxc/lxc.go#newcode49
> container/lxc/lxc.go:49: var FsCommandOutput = (*exec.Cmd).CombinedOutput
> Do you really want CombinedOutput? Just Output, I think.
> 
> https://codereview.appspot.com/73310043/diff/1/container/lxc/lxc.go#newcode52
> container/lxc/lxc.go:52: cmd := exec.Command("df", "--output=fstype",
> LxcContainerDir)
> If you use Output instead, you can store Stderr in a bytes.Buffer and add it
to
> the error for context.

After discussion, LGTM, since you won't get mixed stdout/stderr.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b