Skip to content

Instantly share code, notes, and snippets.

@pnasrat
pnasrat / gist:8527882
Created January 20, 2014 19:59
cgroups stuff
11:hugetlb:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
10:perf_event:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
9:blkio:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
8:net_cls:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
7:freezer:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
6:devices:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
5:memory:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
4:cpuacct,cpu:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
3:cpuset:/lxc/384d8595536905a12d3c4f1173e81ff0a0bb3ce3a8e4298510663d91a2420384
@pnasrat
pnasrat / gist:8521615
Created January 20, 2014 15:12
init systems
https://plus.google.com/115547683951727699051/posts/ip8e1DqJdxT
a) Does the init system support auto-respawning of services on failure/coredump/..?
b) Does the init system record exit status/signals/coredumps of services for later retrieval by the admin?
c) Does the init system record stdout/stderr of all system services for later retrieval by the admin?
--- FAIL: TestRunDisconnect (-3536.41 seconds)
commands_test.go:89: Waiting for CmdRun timed out
[error] api.go:1062 Error: start: Cannot start container 8d9ea124c28f507386aa92a75e2f648dff4e92298aa4e7c4570d619e6338f552: The container failed to start. Unkown error
[error] api.go:87 HTTP Error: statusCode=500 start: Cannot start container 8d9ea124c28f507386aa92a75e2f648dff4e92298aa4e7c4570d619e6338f552: The container failed to start. Unkown error
--- FAIL: TestRunAttachStdin (3543.63 seconds)
commands_test.go:89: Waiting for command to exit timed out
docker0: port 1(vethp1ovka) entering forwarding state
EXT4-fs error (device dm-12): htree_dirblock_to_tree: bad entry in directory #524972: rec_len % 4 != 0 - block=2105426offset=0(0), inode=641, rec_len=657, name_len=0
EXT4-fs error (device dm-12): ext4_add_entry: bad entry in directory #524972: rec_len % 4 != 0 - block=2105426offset=0(0), inode=641, rec_len=657, name_len=0
EXT4-fs error (device dm-12): htree_dirblock_to_tree: bad entry in directory #524972: rec_len % 4 != 0 - block=2105426offset=0(0), inode=641, rec_len=657, name_len=0
EXT4-fs error (device dm-12): ext4_add_entry: bad entry in directory #524972: rec_len % 4 != 0 - block=2105426offset=0(0), inode=641, rec_len=657, name_len=0
EXT4-fs error (device dm-12): htree_dirblock_to_tree: bad entry in directory #524972: rec_len % 4 != 0 - block=2105426offset=0(0), inode=641, rec_len=657, name_len=0
EXT4-fs error (device dm-12): ext4_add_entry: bad entry in directory #524972: rec_len % 4 != 0 - block=2105426offset=0(0), inode=641, rec_len=657, name_len=
docker run -t busybox sh -c "echo Hello GCE"
Hello GCE
Mon Nov 25 17:33:29 UTC 2013
++ cd .
++ go test -i -ldflags '-X main.GITCOMMIT "ba6dd1d-dirty" -X main.VERSION "0.6.7-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo
++ go test -v -ldflags '-X main.GITCOMMIT "ba6dd1d-dirty" -X main.VERSION "0.6.7-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo -race
=== RUN TestJsonContentType
--- PASS: TestJsonContentType (0.00 seconds)
=== RUN TestCompareConfig
--- PASS: TestCompareConfig (0.00 seconds)
=== RUN TestMergeConfig
--- PASS: TestMergeConfig (0.00 seconds)
Thu Nov 21 21:24:43 UTC 2013
++ cd .
++ go test -i -ldflags '-X main.GITCOMMIT "03ea432-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo
++ go test -v -ldflags '-X main.GITCOMMIT "03ea432-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo -race
=== RUN TestJsonContentType
--- PASS: TestJsonContentType (0.00 seconds)
=== RUN TestCompareConfig
--- PASS: TestCompareConfig (0.00 seconds)
=== RUN TestMergeConfig
--- PASS: TestMergeConfig (0.00 seconds)
Thu Nov 21 20:42:51 UTC 2013
++ cd .
++ go test -i -ldflags '-X main.GITCOMMIT "03ea432-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo
++ go test -v -ldflags '-X main.GITCOMMIT "03ea432-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo -race
# github.com/dotcloud/docker
./links_test.go:24: unknown State field 'Running' in struct literal
./links_test.go:69: unknown State field 'Running' in struct literal
FAIL github.com/dotcloud/docker [build failed]
++ cd ./archive
++ go test -i -ldflags '-X main.GITCOMMIT "03ea432-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags net
@pnasrat
pnasrat / gist:7581770
Created November 21, 2013 13:44
Docker test run with -race
Thu Nov 21 13:37:50 UTC 2013
++ cd .
++ go test -i -ldflags '-X main.GITCOMMIT "d7e2fc8-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo
++ go test -v -ldflags '-X main.GITCOMMIT "d7e2fc8-dirty" -X main.VERSION "0.6.6-dev" -w -X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"' -tags netgo -race
=== RUN TestJsonContentType
--- PASS: TestJsonContentType (0.00 seconds)
=== RUN TestCompareConfig
--- PASS: TestCompareConfig (0.00 seconds)
=== RUN TestMergeConfig
--- PASS: TestMergeConfig (0.00 seconds)
@pnasrat
pnasrat / gist:7327338
Created November 5, 2013 22:19
Using nsenter and docker
/ # root@precise64:~/util-linux# docker ps
ID IMAGE COMMAND CREATED STATUS PORTS NAMES
71546cef7b56 busybox:latest sleep 3600 16 minutes ago Up 16 minutes pink_monkey
root@precise64:~/util-linux# docker inspect 71546cef7b56 | grep Pid
"Pid": 10614,
root@precise64:~/util-linux# ./nsenter --mount -t 10621 /usr/bin/sh
BusyBox v1.19.3 (Ubuntu 1:1.19.3-7ubuntu1.1) built-in shell (ash)
Enter 'help' for a list of built-in commands.