Commit graph

1034 commits

Author SHA1 Message Date
Michał Żyłowski
52baf68d50 Vendor: Update k8s version
Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
2017-02-03 16:04:59 +01:00
Jacek J. Łakis
983aec6380 doc: Add instruction to run cri-o with kubernetes
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
2017-02-03 10:37:50 +01:00
Antonio Murdaca
dfa93414c5 Merge pull request #352 from mrunalp/deps
Switch to github.com/golang/dep for vendoring
2017-02-02 18:32:44 +01:00
Mrunal Patel
d0464b11e2 Merge pull request #348 from runcom/fix-imageid-lookup
storage: fix image retrieval by id
2017-02-01 09:05:36 -08:00
Mrunal Patel
b1f3dc74e9 Remove hack/vendor.sh
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-31 16:46:57 -08:00
Mrunal Patel
42bc14dd8b Add dep vendoring files
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-31 16:46:26 -08:00
Mrunal Patel
8e5b17cf13 Switch to github.com/golang/dep for vendoring
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-31 16:45:59 -08:00
Mrunal Patel
a6c0fcfa57 Merge pull request #350 from nalind/buildtags
Use build tags for bin2img and copyimg
2017-01-31 12:02:24 -08:00
Nalin Dahyabhai
893593272f Use build tags for bin2img and copyimg
Use the same build tags for bin2img and copyimg that we use for ocid,
and improve detection of the case where we need to use the
"libdm_no_deferred_remove" tag.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-31 11:57:19 -05:00
Antonio Murdaca
2202c1a460
storage: fix image retrieval by id
kubelet sends a request to create a container with an image ID (as
opposed as an image name). That ID comes from the ImageStatus response.
This patch fixes that by setting the image ID as well as the image name
and fix the login to lookup for image ID as well.

Found while running `make test-e2e-node`.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-31 16:32:30 +01:00
Mrunal Patel
d6ab91be27 Merge pull request #283 from runcom/add-kelsey-tutorial
README.md: replace examples with kelsey's tutorial
2017-01-30 09:57:15 -08:00
Antonio Murdaca
2341ae4184
README.md: replace examples with kelsey's tutorial
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-27 08:30:18 +01:00
Mrunal Patel
89e4c54995 Merge pull request #338 from sameo/topic/alternate-runtime
Select alternate runtimes for host integration tests
2017-01-26 14:47:19 -08:00
Samuel Ortiz
5569f8b2e1
test: Update and organize README
Document the alternate runtime selection when running integratiom
tests on the host, and at the same time rganize the file a little
better.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-01-26 23:21:12 +01:00
Samuel Ortiz
5f0238032f
test: Specify alternate container runtime
When running integration tests on the host, we can now specify
an alternate runtime by setting the RUNTIME variable. For example:

make localintegration RUNTIME=cc-oci-runtime

to use Clear Containers instead of runC.

Obviously, runC is still the default.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-01-26 23:21:09 +01:00
Antonio Murdaca
2afb43072b Merge pull request #340 from nalind/signature-policy
Pass --signature-policy to copyimg during integration tests
2017-01-26 15:34:31 +01:00
Nalin Dahyabhai
ebe86effe2 Pass --signature-policy to copyimg
When calling copyimg to pull down an image in the integration tests,
don't forget to pass in the test signature policy.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-26 14:01:47 +01:00
Antonio Murdaca
60d148f94c Merge pull request #334 from rhatdan/selinux
Default type for containers is not container_t
2017-01-25 22:46:04 +01:00
Daniel J Walsh
9c61688098 Default type for containers is not container_t
We usually specify MCS Labels as comma separated pair.
Finally if we run two different containers we want them on different
MCS labels.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-01-25 22:11:30 +01:00
Mrunal Patel
7fda27a5b3 Merge pull request #337 from cyphar/respect-plugindir-config
server: respect ocid.network.plugin_dir setting
2017-01-24 10:54:38 -08:00
Aleksa Sarai
d5abfa1ecf
server: respect ocid.network.plugin_dir setting
Previously ocicni did not have support for setting the plugin directory.
Now that it has grown support for it, use it to actually respect the
setting a user has provided for ocid.network.* options.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-01-25 04:12:51 +11:00
Antonio Murdaca
b1685800dd Merge pull request #335 from yujuhong/update_owners
Update the OWNERS file
2017-01-23 20:20:05 +01:00
Yu-Ju Hong
ade3022172 Update the OWNERS file
I am not actively working on the project, so removing myself from the file.
2017-01-23 11:14:28 -08:00
Antonio Murdaca
03fe8d6777 Merge pull request #333 from rhatdan/master
Fix README to tell user to pull the image for container
2017-01-20 22:37:48 +01:00
Daniel J Walsh
dc55ef764d Fix README to tell user to pull the image for container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-01-20 15:33:59 -05:00
Mrunal Patel
f085c1cb6d Merge pull request #329 from rajatchopra/master
move ocicni from vendors to pkg
2017-01-19 15:26:06 -08:00
Rajat Chopra
c04040fa95 move ocicni from vendors to pkg/
Signed-off-by: Rajat Chopra <rchopra@redhat.com>
2017-01-19 17:45:54 -05:00
Antonio Murdaca
89369c1eae Merge pull request #328 from mrunalp/gopath_target
Move GOPATH check to a phony target
2017-01-19 21:52:03 +01:00
Mrunal Patel
bfe4f11f80 Move GOPATH check to a phony target
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-19 11:50:08 -08:00
Mrunal Patel
c4673a9136 Merge pull request #325 from runcom/tests-in-docker
fix integration tests in docker
2017-01-19 11:44:38 -08:00
Antonio Murdaca
5d86f1f110
test: enable tests in Travis
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 19:14:46 +01:00
Mrunal Patel
7cc84922b3 Merge pull request #327 from nalind/multigopath
Makefile: handle cases where $GOPATH is a list
2017-01-19 10:13:20 -08:00
Antonio Murdaca
25d40b6927
test: use checkseccomp to test if seccomp is supported
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 18:51:47 +01:00
Antonio Murdaca
0d37c41521
test: add a custom binary to reliable check seccomp support
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 18:51:47 +01:00
Antonio Murdaca
f1f5c635d2
test: change location of the test image
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 18:51:47 +01:00
Antonio Murdaca
e5126a9176
Dockerfile: pull test image at build time
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 18:51:47 +01:00
Antonio Murdaca
f195d51615
Dockerfile: install CNI plugins for integration tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 18:51:47 +01:00
Antonio Murdaca
0a36d3ca3d
Dockerfile: use golang:1.7
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-19 18:51:40 +01:00
Nalin Dahyabhai
9cac1f6d66 Makefile: handle cases where $GOPATH is a list
In multiple places, we've been assuming that we can invoke binaries that
we install as $GOPATH/bin/$binary.  This doesn't work in cases where
$GOPATH is a list.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-19 12:13:49 -05:00
Antonio Murdaca
b9dc097c40 Merge pull request #189 from nalind/storage
Storage in Image Management
2017-01-18 23:02:08 +01:00
Antonio Murdaca
0e3ff61350 server: fix ImagePullResponse
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-18 10:23:30 -05:00
Nalin Dahyabhai
aeea656581 Limit implicit image pulling to the pause image
The CRI doesn't expect us to implicitly pull an image if it isn't
already present before we're asked to use it to create a container, and
the tests no longer depend on us doing so, either.

Limit the logic which attempts to pull an image, if it isn't present, to
only pulling the configured "pause" image, since our use of that image
for running pod sandboxes is an implementation detail that our clients
can't be expected to know or care about.  Include the name of the image
that we didn't pull in the error we return when we don't pull one.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:23:30 -05:00
Antonio Murdaca
749d24fbab server: cleanup on failed restore
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-18 10:23:30 -05:00
Antonio Murdaca
437459bd64 server: do not add ctrs with bad state when restoring
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-18 10:23:30 -05:00
Antonio Murdaca
c61a83a930 server: skip pods containers in bad state on disk
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-18 10:23:30 -05:00
Antonio Murdaca
7bd7595b18 server: skip pods in bad state on disk
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-18 10:23:30 -05:00
Antonio Murdaca
dc37d36759 server: image_status: ignore storage.ErrImageUnknown
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-18 10:23:30 -05:00
Nalin Dahyabhai
925806b8fa Add and use copyimg for caching images for tests
Add a basic tool for copying images from one location to another,
optionally adding a name if it's to local storage.  Ideally we could use
skopeo for this, but we don't want to build it.

Use it to initially populate the test/testdata/redis-image directory, if
it's not been cleaned out, with a copy of "docker://redis:latest", and
to copy it in to the storage that ocid is using before we start up ocid.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:23:30 -05:00
Nalin Dahyabhai
636d5d8e9a Add and use bin2img for creating images for tests
Add tests which exercise image pulling, listing, and removal.  When running
tests, prepopulate the store with an image with the default infrastructure
container's name, using the locally-built "pause" binary, so that tests won't
have to pull it down from the network.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:23:30 -05:00
Nalin Dahyabhai
c0333b102b Integrate containers/storage
Use containers/storage to store images, pod sandboxes, and containers.
A pod sandbox's infrastructure container has the same ID as the pod to
which it belongs, and all containers also keep track of their pod's ID.

The container configuration that we build using the data in a
CreateContainerRequest is stored in the container's ContainerDirectory
and ContainerRunDirectory.

We catch SIGTERM and SIGINT, and when we receive either, we gracefully
exit the grpc loop.  If we also think that there aren't any container
filesystems in use, we attempt to do a clean shutdown of the storage
driver.

The test harness now waits for ocid to exit before attempting to delete
the storage root directory.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:23:30 -05:00