Skip to content

Instantly share code, notes, and snippets.

View kunalkushwaha's full-sized avatar

Kunal Kushwaha kunalkushwaha

View GitHub Profile
@kunalkushwaha
kunalkushwaha / ctr-default.md
Created February 3, 2017 02:18
Sample output of ``ctr debug``
$ sudo ctr debug
Containerd Version :  1.0.0
GitCommit :  
Stack Dump : 
goroutine 94 [running]:
github.com/docker/containerd/debugger.(*Service).buildStackInfo(0xf36860, 0x7f09919d4410, 0xc4202acc60, 0x4, 0x0, 0x899df99f00000202, 0x0)
	/home/kunal/go/src/github.com/docker/containerd/debugger/service.go:81 +0x8c
github.com/docker/containerd/debugger.(*Service).DumpDebugInfo(0xf36860, 0x7f09919d4410, 0xc4202acc60, 0xc4202a06f4, 0x0, 0xc420206ad8, 0x55c1ac)
	/home/kunal/go/src/github.com/docker/containerd/debugger/service.go:59 +0x82
@kunalkushwaha
kunalkushwaha / Docker-101.md
Created February 16, 2017 07:17
Docker 101 course outline ( 2 hour instructor lead course for getting started with container technology)

Docker 101 - Tutorial.

time: 2 hours

Docker 101 tutorial, targets newcomers to docker and container technology.

  • Container concepts and building blocks.
  • Docker installation (optional)
  • docker run hello-world ( Magic behind this)
    • registry.
    • docker image
@kunalkushwaha
kunalkushwaha / background-container.go
Created June 8, 2017 09:04
Create container in background
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"time"
"github.com/containerd/containerd"
Task Creation: 
--- FAIL: TestCheckpointRestore (0.13s)
        checkpoint_test.go:46: rpc error: code = Unknown desc = newInitProcess Error : runc Create Error : Monitor Error : exit status 1,  CheckpointRestore,  /run/containerd-test/linux/testi
ng/CheckpointRestore 
=== RUN   TestCheckpointRestoreNewContainer
Task Creation: 
--- FAIL: TestCheckpointRestoreNewContainer (0.09s)
        checkpoint_test.go:139: rpc error: code = Unknown desc = newInitProcess Error : runc Create Error : Monitor Error : exit status 1,  CheckpointRestoreNewContainer,  /run/containerd-tes
t/linux/testing/CheckpointRestoreNewContainer 
@kunalkushwaha
kunalkushwaha / MultipleCommitSnapshotter.log
Created July 25, 2017 06:21
containerd log for multiple commit on same snapshot
--- FAIL: TestOverlay/MultipleCommitTest (0.22s)
testsuite.go:431: snapshot /tmp/snapshot-suite-Overlay-143202977/work/base: not found
helpers_unix.go:16: unmount /tmp/snapshot-suite-Overlay-143202977/work/base
helpers.go:52: drwx------ /tmp/snapshot-suite-Overlay-143202977
helpers.go:52: drwxrwxrwx /tmp/snapshot-suite-Overlay-143202977/root
helpers.go:50: -rw------- /tmp/snapshot-suite-Overlay-143202977/root/metadata.db [ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\xed\xda\f\xed\x02\x00\x00\x00\x00\
x10\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\a\x00\x00\x00\x00\x00\x00\x00" ...]
helpers.go:52: drwx------ /tmp/snapshot-suite-Overlay-143202977/root/snapshots
helpers.go:52: drwx------ /tmp/snapshot-suite-Overlay-143202977/root/snapshots/1
helpers.go:52: drwx--x--x /tmp/snapshot-suite-Overlay-143202977/root/snapshots/1/fs
@kunalkushwaha
kunalkushwaha / git-author.sh
Created August 23, 2017 01:13
Displays the list of git project author in sorted order by commit count
#!/bin/bash
git log --format='%aN <%aE>' | awk '{arr[$0]++} END{for (i in arr){print arr[i], i;}}' | sort -rn

versions

$ runc --version
runc version 1.0.0-rc3
commit: 45bde006ca8c90e089894508708bcf0e2cdf9e13-dirty
spec: 1.0.0

$ crio --version
crio version 1.0.0-rc2
commit: "6784a66f2ddb3113233faebce706dfe2b6a4925e-dirty"

ctr-powertest

$ sudo ./ctr-powertest -p cri -r cri-containerd stress -t image-pull
INFO[0000] Running tests on &VersionResponse{Version:0.1.0,RuntimeName:cri-containerd,RuntimeVersion:1.0.0-alpha.0-35-gd50c610-dirty,RuntimeApiVersion:0.0.0,}
INFO[0000] Pulling image in 4 goroutines
ERRO[0034] Image pull error : pulling image failed: rpc error: code = Unknown desc = failed to pull image "docker.io/library/golang:latest": image "docker.io/library/golang:latest": already exists
ERRO[0034] Image pull error : pulling image failed: rpc error: code = Unknown desc = failed to pull image "docker.io/library/golang:latest": image "docker.io/library/golang:latest": already exists
ERRO[0034] Image pull error : pulling image failed: rpc error: code = Unknown desc = failed to pull image "docker.io/library/golang:latest": image "docker.io/library/golang:latest": already exists
INFO[0054] OK

Keybase proof

I hereby claim:

  • I am kunalkushwaha on github.
  • I am kunalkushwaha (https://keybase.io/kunalkushwaha) on keybase.
  • I have a public key ASDt6K_m_e9iMPYN1-MJtvmzw8h7SDgTblfcIxdlXX6lxwo

To claim this, I am signing this object:

package main
import (
"bytes"
"context"
"fmt"
"sync"
"github.com/containerd/containerd"
"github.com/containerd/containerd/containers"