Commit graph

712 commits

Author SHA1 Message Date
Michael Crosby
bdeb87a090 Implement stats for containerd
This is a single endpoint that clients will poll

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 14:36:32 -08:00
Michael Crosby
532697f32f Add all pids to state output
Also update libcontainer dep

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 14:07:34 -08:00
Michael Crosby
d6bd304c92 Add labels for containers
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 13:44:25 -08:00
Michael Crosby
76d69b4ed8 Add id to state command to return single container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 12:20:29 -08:00
Michael Crosby
58c5eb5ecb Return container on start
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:56:11 -08:00
Michael Crosby
d317f71ac2 Move exec and checkpoint to process state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:30:25 -08:00
Michael Crosby
cf28969328 Fix tty and io permission for userns
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:23:35 -08:00
Michael Crosby
20a39bce97 Update to use runc 0.0.8
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-10 16:48:04 -08:00
Michael Crosby
01176f2d7f Add pid and stdio to process state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-04 14:40:35 -08:00
Michael Crosby
36eb83cb99 Move fifo creation to client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-03 13:56:15 -08:00
Michael Crosby
f5fdc548e8 Add tty resize api
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:23 -08:00
Michael Crosby
a42eb9fd63 Add close stdin
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
277cc920a4 Implement checkpoint / restore for shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
835f3b6a97 Update shim for exec
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
6808dbc02f Add reconnect for attach events
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
fe38efda50 Add shim for reattach of processes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Remove runtime files from containerd

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Update supervisor for orphaned containers

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Remove ctr/container.go back to rpc calls

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add attach to loaded container

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add monitor based on epoll for process exits

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Convert pids in containerd to string

This is so that we no longer care about linux or system level pids and
processes in containerd have user defined process id(pid) kinda like the
exec process ids that docker has today.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add reaper back to containerd

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Implement list containers with new process model

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Implement restore of processes

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add NONBLOCK to exit fifo open

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Implement tty reattach

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Fix race in exit pipe creation

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add delete to shim

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Update shim to use pid-file and not stdout

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
8d1f71c3d7 Merge pull request #97 from mlaventure/root-propagation
Translate RootfsPropagation flags from spec to internal config
2016-02-02 15:43:23 -08:00
Kenfe-Mickael Laventure
fd63cee703 Translate RootfsPropagation flags from spec to internal config
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-02-02 07:47:59 -08:00
Michael Crosby
c29728a9b0 Merge pull request #94 from rakyll/remove-type
runtime: remove unnecessary intermediate type, Status
2016-01-28 17:40:17 -08:00
Burcu Dogan
167219101f runtime: remove unnecessary intermediate type, Status
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-28 00:31:33 +01:00
Michael Crosby
8525de9dee Merge pull request #90 from tonistiigi/fix-fd-chown
Chown stdio with proper user
2016-01-27 14:13:01 -08:00
Michael Crosby
811f48cb07 Merge pull request #91 from rakyll/ctr
ctr: convert bundle paths to absolute
2016-01-27 14:12:40 -08:00
Michael Crosby
92233ddb32 Merge pull request #93 from rakyll/closed
chanotify: do not allow adding new channels if notifier is closed
2016-01-27 14:12:17 -08:00
Burcu Dogan
10d291b825 chanotify: do not allow adding new channels if notifier is closed
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-27 14:01:25 -08:00
Burcu Dogan
facfce3e8e ctr: convert bundle paths to absolute
Fixes #75.

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-25 19:47:54 -08:00
Tonis Tiigi
b58c572f32 Chown stdio with proper user
If user namespace is used we should chown with a remapped ID.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-25 17:59:24 -08:00
Michael Crosby
1ade1f6d81 Remove authors from cli
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-01-25 15:15:35 -08:00
Michael Crosby
5bfd26b044 Merge pull request #88 from rakyll/more-main-dont-export
containerd: do not export any symbols
2016-01-25 15:14:42 -08:00
Burcu Dogan
a151f019fe containerd: do not export any symbols
Following up with #87.

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-25 14:55:20 -08:00
Michael Crosby
daaa7096a0 Merge pull request #87 from rakyll/ctr-readability
Do not export symbols from the main package
2016-01-25 14:18:56 -08:00
Michael Crosby
20b96a3d35 Merge pull request #86 from rakyll/typo
Fix typo
2016-01-25 14:17:08 -08:00
Michael Crosby
4764181eb5 Merge pull request #84 from rakyll/more-ikeys
Take advantage of having interface{} chanotify keys
2016-01-25 13:10:44 -08:00
Burcu Dogan
40086bd92b Do not export symbols from the main package
main packages are not importable; see the discussion at https://github.com/golang/go/issues/4210

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-23 23:42:16 -08:00
Burcu Dogan
6014cf22d8 Fix typo
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-23 14:32:56 -08:00
Michael Crosby
d7c5849537 Merge pull request #55 from runcom/ocd
api: grpc: types: align fields in api.proto
2016-01-22 13:03:57 -08:00
Antonio Murdaca
6bc0dcf4e9 api: grpc: types: align fields in api.proto
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-22 21:29:37 +01:00
Burcu Dogan
eed75373eb Take advantage of having interface{} chanotify keys
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-22 11:35:15 -08:00
Michael Crosby
79e0dace69 Merge pull request #83 from rakyll/interface-keys
chanotify should use interface{} keys
2016-01-22 11:02:50 -08:00
Michael Crosby
5f199edb25 Merge pull request #80 from rakyll/rename
Rename the receiver name
2016-01-22 10:55:24 -08:00
Michael Crosby
fe506d51ef Remove vet and lint in validate
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-01-22 10:47:06 -08:00
Michael Crosby
b4a53af927 Merge pull request #65 from LK4D4/vendor
Vendor dependencies
2016-01-22 10:46:16 -08:00
Alexander Morozov
bba05d5748 Update Makefile to use vendor dir
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-22 08:30:39 -08:00
Burcu Dogan
bc4f1aae01 chanotify should use interface{} keys
Fixes #79.

Signed-off-by: Burcu Dogan <jbd@golang.org>
2016-01-22 08:15:13 -08:00
Burcu Dogan
85bc51df33 Rename the receiver name
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-21 21:07:10 -08:00
Michael Crosby
9778225c58 Merge pull request #70 from estesp/makefile-cleanup
Add dependency on the container build for steps doing "run"
2016-01-21 11:55:50 -08:00
Michael Crosby
3213db978f Merge pull request #71 from estesp/readme-cleanup
Clean up option output tabbing; update to latest
2016-01-21 11:55:34 -08:00
Michael Crosby
8f0a4e2537 Merge pull request #78 from rakyll/buildtags
Build prctl on systems with procfs, fix fds build tag
2016-01-21 11:55:21 -08:00
Michael Crosby
e5ea745aa4 Merge pull request #77 from rakyll/master
Remove reflect from chanotify and fix a deadlock case
2016-01-21 11:53:45 -08:00
Burcu Dogan
ec1169fe85 Build prctl on systems with procfs, fix fds build tag
Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-20 21:58:40 -08:00
Burcu Dogan
0cd5c21a50 Remove reflect from chanotify and fix a deadlock case.
With the change, the read rate from (*Notifier).Chan()
is 10-20 times faster and more consistent.

Consider the following program:

  s := chanotify.New()
  for i := 0; i < n; i++ {
    ch := make(chan struct{}, 1)
    s.Add(ch, fmt.Sprintf("%d", i))
    go func(ch chan struct{}) {
      time.Sleep(time.Second) // because your original code has a deadlock case.
      ch <- struct{}{}
    }(ch)
  }

  avgs := make([]int64, n)
  go func() {
    for i := 0; i < n; i++ {
      start := time.Now()
      <-s.Chan()
      avgs[i] = time.Now().Sub(start).Nanoseconds()
    }
  }()

  time.Sleep(10 * time.Second)
  s.Close()

  fmt.Println(avgs)

The output without the change; ignore the first value:

[1000469322 739 100492 200 75412 77733 316 88873 695 137905 244 72197 196 84444 175 80858 169 125514 165 73509 885 739963 248 72569 169 90094 159 110571 68954 143 145616 148 83563 149 86154 132 82722 154 79740 170 86688 143 97033 158 87126 187 69839 125 100043 148 72633 133 80690 149 41841 113509 346 134876 247 80720 153473 414352 293 103906 276 140524 233 88041 236 123732 242 89870 238 105342 213 110773 319 121004 228 89237 793 94458 235 604864 400129 412 82639 598 72319 178 64423 157 35779 44536 235 55411 129 46051 29032 231]

The output with the change; ignore the first value:

[999893266 3189 2514 2257 2119 2252 2780 3402 2689 2916 2218 2385 4459 495 309 1289 578 4432 590 421 387 335 1156 272 1566 4933 1271 537 391 792 373 329 411 527 1764 782 322 1044 718 533 405 1183 337 230 1827 848 575 692 321 3514 504 491 772 1952 575 2931 1754 1279 781 403 1137 451 953 914 369 387 289 1796 473 1237 798 816 1215 690 495 389 403 1235 373 364 515 509 321 349 319 41810 27359 2582 2055 2177 2486 2181 1903 2207 2207 2005 1746 1802 1864 2169]

The change also fixes the deadlock case pointed in the program above.

Signed-off-by: Burcu Dogan <jbd@google.com>
2016-01-20 15:34:25 -08:00