Commit Graph

11956 Commits

Author SHA1 Message Date
Lantao Liu
dd6e9fb88d Merge pull request #156 from yanxuean/metalabel
Checkpoint and restart recovery
2017-08-23 15:36:19 -07:00
Derek McGowan
f05281743e Merge pull request #1420 from dmcgowan/alpha6
release: updated version to alpha6
2017-08-23 15:36:13 -07:00
Lantao Liu
42500353b7 Vendor ocicni from upstream.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 22:23:29 +00:00
Derek McGowan
b14c2cce11
release: updated version to alpha6
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-23 15:09:32 -07:00
Michael Crosby
709c37b1d1 Merge pull request #1419 from dmcgowan/walk-skip-not-found
Skip items removed during walk
2017-08-23 17:59:31 -04:00
Kenfe-Mickaël Laventure
0daa593b3a Merge pull request #1393 from dmcgowan/multiple-differs
Add support for multiple differs
2017-08-23 14:45:17 -07:00
Derek McGowan
98960f0493
Skip items removed during walk
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-23 14:43:56 -07:00
Derek McGowan
05cdc4f435 Merge pull request #1417 from mlaventure/delete-exitedat
go-client: Return an ExitStatus struct when calling process.Delete()
2017-08-23 13:27:24 -07:00
Kenfe-Mickael Laventure
7f6c487031
go-client: Return an ExitStatus struct when calling process.Delete()
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-23 10:32:51 -07:00
Phil Estes
12b43a5c8a Merge pull request #1416 from tophj-ibm/fix-race-testflags
Only use race flag on amd64
2017-08-23 12:43:05 -04:00
Christopher Jones
e6ab556f0e
Only use race flag on amd64
Race is only supported on amd64, so only run if GOARCH is amd64

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-08-23 12:30:44 -04:00
Kenfe-Mickaël Laventure
60fea11686 Merge pull request #1400 from dmcgowan/content-local-writer-locks
Ensure content writer only unlocks resource once
2017-08-23 08:07:18 -07:00
Michael Crosby
311ea33608 Merge pull request #1414 from dmcgowan/btrfs-test-fail-2
More snapshot and btrfs test cleanup
2017-08-23 09:44:05 -04:00
Michael Crosby
3bcb6f835b Merge pull request #1415 from kunalkushwaha/minor-fmt-fix
removing unused "fmt" package from import
2017-08-23 09:25:47 -04:00
yanxuean
d2757cb8f9 Checkpoint and restart recovery
fix part of #120

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-08-23 17:01:13 +08:00
Lantao Liu
195b52500f Add instrumented service.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 07:02:12 +00:00
Kunal Kushwaha
8f7086a8bd unused fmt package
`make integration` reports this error.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-08-23 15:29:30 +09:00
Lantao Liu
7901f56367 Merge pull request #150 from Random-Liu/support-update-container-resources
Support update container resources
2017-08-22 23:28:48 -07:00
Lantao Liu
b291ec0fa2 Merge pull request #154 from Random-Liu/add-host-port
Add host port support.
2017-08-22 23:26:43 -07:00
Lantao Liu
f6d99abcf4 Add hostport support
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 01:33:02 +00:00
Lantao Liu
8f898cb3b8 Import ocicni update from https://github.com/Random-Liu/ocicni
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 01:25:12 +00:00
Lantao Liu
af83d3e1f7 Update CNI to v0.6.0
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 01:23:24 +00:00
Derek McGowan
96a75ab1ab
Move detach flags to platform specific
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-22 17:20:25 -07:00
Derek McGowan
f74cea71dd
Update basic test to allow being run in parallel on client
The basic test does an assert on the existing snapshots.
Update the check just to assert the expected snapshots were
found during the walk.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-22 17:14:06 -07:00
Derek McGowan
750771f6d0
Remove snapshot test suite as a parallel test runner
The testsuite alters global state by setting the umask, avoid
running the testsuite in parallel and move umask manipulation
to the test suite level to individual tests may run in parallel.

Added better error messaging and handling.

Removed reliance on testing object for handling cleanup failure.
When a cleanup error occurred, it would fail the test but the log
would get skipped. With this change the failure will show up for
the running test.

Update test unmounting to set the detach flag, avoiding races with
btrfs which may see the device as busy when attempting to unmount.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-22 16:29:17 -07:00
Derek McGowan
502734116d
Update loopback to return error
Avoid calling testing function in creation closure since the
context may no longer be valid.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-22 16:09:38 -07:00
Derek McGowan
4028add553 Merge pull request #1405 from crosbymichael/fifos
Add FifoIO to expose fifos directly to client
2017-08-22 15:52:44 -07:00
Stephen Day
4015f7376f Merge pull request #1410 from mlaventure/errdegs-stack
errdefs: Provide a valid stack in all cases
2017-08-22 15:44:26 -07:00
Kenfe-Mickaël Laventure
0e1f6c5da6 Merge pull request #1394 from crosbymichael/test-io
Remove Stdio usage in tests
2017-08-22 15:22:56 -07:00
Kenfe-Mickael Laventure
fc535efe58 windows: Close IO if process in created state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-22 17:20:43 -04:00
Michael Crosby
01b217f884 Merge pull request #1411 from estesp/snapshotter-cli-default
Fix snapshot ctr command to use default
2017-08-22 16:30:42 -04:00
Lantao Liu
810ffbb9b6 Merge pull request #152 from Random-Liu/fix-node-e2e
Fix node e2e test.
2017-08-22 11:55:54 -07:00
Phil Estes
4712ed5390
Fix snapshot ctr command to use default
After the rework of server-side defaults, the `ctr snapshot` command
stopped working due to no default snapshotter.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-08-22 11:54:37 -07:00
Lantao Liu
a0589d37dd Implement container resources update
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-22 18:40:30 +00:00
Lantao Liu
01137e4591 Merge pull request #148 from Random-Liu/update-kubernetes
Update kubernetes
2017-08-22 11:38:55 -07:00
Michael Crosby
a8b21da538 Add FifoIO to expose fifos directly to client
This allows clients an easier way to interact with the fifos for a
container without having to use the built in copyIO functions when
opening fifos.

It's nothing that clients could not have already coded but since we use
this type of functionality in the tests it makes sense to add an
implementation here.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-22 14:34:14 -04:00
Lantao Liu
77095f569a Fix node e2e test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-22 18:12:14 +00:00
Michael Crosby
1b470c180e Remove Stdio usage in tests
This causes shims and containers to hang when they use the testing
process's IO.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-22 14:02:45 -04:00
Kenfe-Mickael Laventure
4de219903a
errdefs: Provide a valid stack in all cases
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-22 09:40:29 -07:00
Michael Crosby
10460647f2 Merge pull request #1392 from cpuguy83/wait_async
Make Wait() async
2017-08-22 11:33:10 -04:00
Brian Goff
6ab99edb71 Convert ExitStatus to use fn to get details
Instead of requiring callers to read the struct fields to check for an
error, provide the exit results via a function instead which is more
natural.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-22 10:48:44 -04:00
Michael Crosby
0648ec3ead Merge pull request #1388 from kunalkushwaha/makefile
Breaking Makefile into platform specific files.
2017-08-22 10:33:50 -04:00
Brian Goff
026896ac4c Make Wait() async
In all of the examples, its recommended to call `Wait()` before starting
a process/task.
Since `Wait()` is a blocking call, this means it must be called from a
goroutine like so:

```go
statusC := make(chan uint32)
go func() {
  status, err := task.Wait(ctx)
  if err != nil {
    // handle async err
  }

  statusC <- status
}()

task.Start(ctx)
<-statusC
```

This means there is a race here where there is no guarentee when the
goroutine is going to be scheduled, and even a bit more since this
requires an RPC call to be made.
In addition, this code is very messy and a common pattern for any caller
using Wait+Start.

Instead, this changes `Wait()` to use an async model having `Wait()`
return a channel instead of the code itself.
This ensures that when `Wait()` returns that the client has a handle on
the event stream (already made the RPC request) before returning and
reduces any sort of race to how the stream is handled by grpc since we
can't guarentee that we have a goroutine running and blocked on
`Recv()`.

Making `Wait()` async also cleans up the code in the caller drastically:

```go
statusC, err := task.Wait(ctx)
if err != nil {
  return err
}

task.Start(ctx)

status := <-statusC
if status.Err != nil {
  return err
}
```

No more spinning up goroutines and more natural error
handling for the caller.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-22 09:33:07 -04:00
Lantao Liu
d41c23e31d Update code to make it build
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-22 05:38:51 +00:00
Lantao Liu
39f4ca648b Update Kubernetes to 493ee8b28560c118cebd2165ba9ef0959cfa2bc3
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-22 05:38:51 +00:00
Kunal Kushwaha
1c989588c0 Breaking Makefile into platform specific files
Fixed #1270

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-08-22 13:57:12 +09:00
Lantao Liu
50b01812ce Merge pull request #147 from miaoyq/group-all-privileged-logic
Group all privileged logic together
2017-08-21 18:43:06 -07:00
Yanqiang Miao
8adad23015 Group all privileged logic together
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-22 09:16:37 +08:00
Kenfe-Mickaël Laventure
89da512692 Merge pull request #1377 from crosbymichael/exec-delete
Allow exec process to be deleted in created state
2017-08-21 15:27:17 -07:00
Derek McGowan
c71066252b
Ensure content writer only unlocks resource once
Make close a no-op after commit and disallow committing after close.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-21 14:54:51 -07:00