Commit graph

1250 commits

Author SHA1 Message Date
Antonio Murdaca
6b704d1f78 Merge pull request #425 from mrunalp/ctr_status_labels
Add labels/annotations to container status
2017-04-04 11:17:44 +02:00
Mrunal Patel
c5e15cfd5f Add labels/annotations to container status
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-04-03 15:05:57 -07:00
Dan Williams
95846211c9 build: find dependencies for Go executables
To ensure that changing a dependency source file actually triggers
a rebuild of the core binaries when you type 'make', find their
dependencies and add them to the makefile's target dependencies.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2017-03-31 20:45:21 -05:00
Mrunal Patel
bbe2dea0a6 Merge pull request #423 from mrunalp/set_default_cwd
Set default working directory to /
2017-03-31 16:04:49 -07:00
Mrunal Patel
fd435256e7 Set default working directory to /
runc/runtime-spec doesn't allow empty working dir
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-03-31 14:04:16 -07:00
Antonio Murdaca
1ce8be1ccf Merge pull request #417 from surajssd/update-conmon-default-path
Update the default conmonPath
2017-03-31 18:30:22 +02:00
Mrunal Patel
fa467a30f1 Merge pull request #420 from mrunalp/fix_hostname
Set the container hostname same as pod hostname
2017-03-31 07:35:49 -07:00
Antonio Murdaca
3f59e18a7c Merge pull request #418 from mrunalp/user_lookup
User lookup
2017-03-31 09:47:42 +02:00
Dan Williams
9c44933b58 build: create a local GOPATH if none specified
Instead of requiring the developer to set up their own GOPATH somewhere,
do like Kubernetes and OpenShift Origin do:

git clone xxxxx
cd xxxxx
make

by creating an _output/ directory and linking the local source tree
into it, and setting that to be the GOPATH.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2017-03-30 15:01:22 -05:00
Mrunal Patel
c6897b5f62 Set the uid, gid and groups from container user
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-03-30 10:58:57 -07:00
Mrunal Patel
4ccc5bbe7c Set the container hostnames same as pod hostname
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-03-29 16:11:57 -07:00
Mrunal Patel
93b1ff5207 Merge pull request #416 from surajssd/readme-generate-config
Add instructions to generate config
2017-03-29 11:45:58 -07:00
Mrunal Patel
505bc2cbd5 Add function to lookup user in container /etc/{passwd,group}
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-03-29 11:18:35 -07:00
Mrunal Patel
f422235b3e Add function to safely open a file in container rootfs
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-03-29 11:16:53 -07:00
Suraj Deshmukh
fb41320527 Add instructions to generate config
`tutorial.md` was missing instructions to
generate config for the first time install.

Signed-off-by: Suraj Deshmukh <surajssd009005@gmail.com>
2017-03-29 21:24:58 +05:30
Suraj Deshmukh
c93c7cd1b8 Update the default conmonPath
After change in `Makefile` at #304 where `PREFIX`
has changed from `/usr` to `/usr/local` these changes
has to be reflected in default `conmonPath`.

Signed-off-by: Suraj Deshmukh <surajssd009005@gmail.com>
2017-03-29 21:23:52 +05:30
Mrunal Patel
f2ce1fff0a Merge pull request #414 from rhatdan/vendor
Vendor in latest code.
2017-03-28 16:21:27 -07:00
Daniel J Walsh
549d734da9 Vendor in latest code.
Add support for vendoring in containers/storage and ran
dep ensure

Need to get default storage for containers to include and default to
overlay2.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-28 17:01:08 -04:00
Antonio Murdaca
7c6443c592 Merge pull request #412 from mrunalp/image_wd_env
Apply working dir and env from image config
2017-03-28 10:49:20 +02:00
Mrunal Patel
8709f1b5bb Apply working dir and env from image config
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-03-27 16:41:43 -07:00
Mrunal Patel
89105eb736 Merge pull request #408 from mrunalp/lint_fixes
Fix lint issues
2017-03-27 14:33:31 -07:00
Mrunal Patel
d69ad9b5a3 Fix lint issues
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-03-27 10:21:30 -07:00
Antonio Murdaca
37f118d73a Merge pull request #398 from rhatdan/containers_storage
Default all container storage to /var/lib/containers/storage
2017-03-25 08:22:11 +01:00
Antonio Murdaca
fdec993e62 Merge pull request #365 from jawnsy/update-readme
Updates to README.md
2017-03-25 08:16:20 +01:00
Jonathan Yu
e53e70d12a Updates to README.md
* Describe how to get source/configure GOPATH appropriately
* Dependency installation commands that can be easily copied/pasted

Signed-off-by: Jonathan Yu <jawnsy@redhat.com>
2017-03-24 14:49:05 -07:00
Antonio Murdaca
a752a72ee0 Merge pull request #406 from mrunalp/fixup_prereqs
Cleanup prerequisites section in README.md
2017-03-24 22:03:33 +01:00
Mrunal Patel
b7c97540b7 make: Fixup install/invocation of tools
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-03-24 11:18:37 -07:00
Antonio Murdaca
a7492f4a2f Merge pull request #405 from nalind/pull-tag
Preserve the tag of the pulled image's name
2017-03-24 19:16:23 +01:00
Mrunal Patel
ae9b5849a7 Cleanup prerequisites section in README.md
Make it easier to copy/paste and run.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-03-24 10:59:24 -07:00
Nalin Dahyabhai
e7748cba6e Preserve the tag of the pulled image's name
When we pull an image, preserve the tag portion of the name that we were
asked to use for pulling it, instead of unconditionally replacing it
with "latest".

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-03-24 11:54:56 -04:00
Mrunal Patel
4cdc1a31d6 Merge pull request #404 from sameo/topic/resolver
Propagate the sandbox DNS mount point to pod containers
2017-03-24 08:48:13 -07:00
Samuel Ortiz
48a297ed7b container: Propagate the pod sandbox resolv.conf mount point
When a pod sandbox comes with DNS settings, the resulting resolv.conf
file needs to be bind mounted in all pod containers under
/etc/resolv.conf.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-03-24 15:32:16 +01:00
Samuel Ortiz
72129ee3fb sandbox: Track and store the pod resolv.conf path
When we get a pod with DNS settings, we need to build
a resolv.conf file and mount it in all pod containers.
In order to do that, we have to track the built resolv.conf
file and store/load it.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-03-24 15:28:14 +01:00
Daniel J Walsh
89be1e9f35 Switch to using opencontainers/selinux
We have moved selinux support out of opencontainers/runc into its
own package.  This patch moves to using the new selinux go bindings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-24 08:20:11 -04:00
Daniel J Walsh
6f81ec8c67 Default all container storage to /var/lib/containers/storage
containers/storage is defaulting to /var/lib/containers/storage
for image and containers storage.  It is also defaulting to
/var/run/containers/storage for all runtime.  The defaults
for CRI-O should match so that lots of other tools that use
containers/storage can share the same storage.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-24 08:19:08 -04:00
Antonio Murdaca
673b6e4c51 Merge pull request #400 from sameo/topic/oci-process
server: Fix the OCI process arguments build routine
2017-03-24 09:07:00 +01:00
Mrunal Patel
2f761ff0ad Merge pull request #399 from rhatdan/selinux
Switch to using opencontainers/selinux
2017-03-23 14:08:37 -07:00
Daniel J Walsh
7f21253f57 Vendor in opencontainers/selinux
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-23 15:53:10 -04:00
Daniel J Walsh
19620f3d1e Switch to using opencontainers/selinux
We have moved selinux support out of opencontainers/runc into its
own package.  This patch moves to using the new selinux go bindings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-23 15:53:09 -04:00
Antonio Murdaca
c12db22819 Merge pull request #401 from mrunalp/inc_create_timeout
Increase the timeout value for create container
2017-03-23 19:13:49 +01:00
Mrunal Patel
be47583041 Increase the timeout value for create container
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-03-23 10:06:52 -07:00
Samuel Ortiz
21afa1a975 server: Fix the OCI process arguments build routine
We need to support a 2x2 matrix of use cases with both
kubelet giving us (command, args) slices and the OCI
image config file giving us (ENTRYPOINT, CMD) slices.

Here we always prioritize the kubelet information over
the OCI image one, and use the latter when the former
is incomplete.

Not that this routine will be slightly simpler when
issue #395 is fixed.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-03-23 12:59:26 +01:00
Mrunal Patel
b487a9b7dd Merge pull request #383 from sameo/topic/storage
server: Remove the mount points after stopping the containers
2017-03-21 07:46:08 -07:00
Mrunal Patel
4feb74cee9 Merge pull request #390 from rhatdan/MissingExit
If the container exit file is missing default exit code to -1
2017-03-21 07:32:47 -07:00
Daniel J Walsh
d679da0645 If the container exit file is missing default exit code to -1
If I create a sandbox pod and then restart the ocid service, the
pod ends up in a stopped state without an exit file.  Whether this is
a bug in ocid or not we should handle this case where a container exits
so that we can clean up the container.

This change just defaults to exit code to -1 if the container is not
running and does not have an exit file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-21 08:00:04 -04:00
Mrunal Patel
987007862e Merge pull request #396 from mrunalp/version_0.1
Bump up version to 0.1
2017-03-20 19:28:21 -07:00
Mrunal Patel
e147601584 Bump up version to 0.1
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-03-20 14:12:09 -07:00
Antonio Murdaca
0298981a82 Merge pull request #392 from sameo/topic/kubelet-1.6-fixes
Fixes for kubelet 1.6 and kubeadm 1.7
2017-03-20 20:40:31 +01:00
Antonio Murdaca
526f104f21 Merge pull request #129 from YaoZengzeng/add-create-container-timeout
add timeout when wait to get container pid from conmon
2017-03-20 18:45:47 +01:00
Samuel Ortiz
c3cb6a133f server: Remove the mount points after stopping the containers
When starting pods or containers, we create the mount points
first. It seems natural to do something symetrical when stopping
pods or containers, i.e. removing the mount point at last.

Also, the current logic may not work with VM based containers as the
hypervisor may hold a reference on the mount point while we're trying to
remove them.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-03-20 17:50:38 +01:00