Commit graph

1726 commits

Author SHA1 Message Date
Mrunal Patel
39a5203a1d Merge pull request #634 from alexlarsson/conmon-no-numstdio-fds
conmon: Change how we detect container exit
2017-06-30 12:08:31 -07:00
Alexander Larsson
3cf86e25a8 fixup! conmon: Change how we detect container exit
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-29 23:20:12 +02:00
Alexander Larsson
c00f0dd848 conmon: Change how we detect container exit
Instead of waiting until stderr/out is closed and then waiting for
the container to exit we wait for the container to exit in the
gmainloop, in addition to everything else, exiting only when
the child dies.

We then drain any output in stderr/out after the child has exited.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-29 12:19:34 +02:00
umohnani8
9595d7900e Add kpod version
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-06-27 16:48:24 -04:00
Mrunal Patel
91977d3989 Merge pull request #632 from tklauser/rm-prctl
utils: remove unused Prctl wrapper
2017-06-27 07:22:01 -07:00
Tobias Klauser
5523e7d99d utils: remove unused Prctl wrapper
Remove the Prctl wrapper function which has been unused since commit
d2f6a4c0e2. If a prctl wrapper would be needed in the future,
golang.org/x/sys provides unix.Prctl which could be used instead.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-06-27 09:48:25 +02:00
Antonio Murdaca
f3f8b67b76 Merge pull request #626 from mrunalp/pod_infra_oom
sandbox: Adjust OOM score of infra container to a low value
2017-06-26 18:38:50 +02:00
Antonio Murdaca
d1850d9993 Merge pull request #629 from mrunalp/oci_id
oci: Use container ID as ID instead of container name
2017-06-25 13:14:26 +02:00
Mrunal Patel
510d7d97d4 Merge pull request #605 from apilloud/hostport
server: Add support for hostPorts
2017-06-24 10:28:28 -07:00
Mrunal Patel
67504a02d5 oci: Use container ID as ID instead of container name
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-24 08:31:41 -07:00
Mrunal Patel
328e50fb50 Merge pull request #630 from runcom/fix-insecure-reg-flag
cmd/crio: fix reading insecure-registry flags
2017-06-24 08:23:25 -07:00
Antonio Murdaca
78e2fd3d5e
cmd/crio: fix reading insecure-registry flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-24 13:16:45 +02:00
Antonio Murdaca
efb71ae74e Merge pull request #627 from mrunalp/crio_oom_score
contrib: Set the OOM Score Adjust of cri-o service to be low
2017-06-24 10:44:08 +02:00
Antonio Murdaca
da7ecdc7f8 Merge pull request #628 from mrunalp/annotation_id
container: Add containerID to annotations for the container
2017-06-24 10:43:03 +02:00
Antonio Murdaca
f88e5e677d Merge pull request #623 from sboeuf/fix_bats
test: Make sure to have a running container before calling into "exec"
2017-06-24 10:42:33 +02:00
Sebastien Boeuf
c66081eafa test: Make sure to have a running container before calling into "exec"
The test "ctr execsync std{out,err}" from ctr.bats works with runc,
but the semantics behind is wrong.

We should not be able to execute a new process on a container which
has not been previously started. That's why this patch adds a call
to start the container.

Moreover, we don't want to be able to execute a new process on a
container that has already returned because its workload is done.
For that reason, we need to force the container workload to be a
"sleep 10" to ensure it is still running when the call to "exec"
is issued.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2017-06-23 14:08:33 -07:00
Mrunal Patel
975347b874 container: Add containerID to annotations for the container
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-23 09:31:13 -07:00
Mrunal Patel
cb4c566fac sandbox: Adjust OOM score of infra container to a low value
This matches the current kube behavior. This will probably
be provided over the CRI at which point we won't have to
define a constant in cri-o code.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-23 09:24:53 -07:00
Mrunal Patel
c7dd594604 contrib: Set the OOM Score Adjust of cri-o service to be low
We don't want cri-o to be OOM killed easily.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-23 09:04:27 -07:00
Antonio Murdaca
033f6885c1 Merge pull request #625 from tklauser/patch-1
tutorial: fix Kubernetes CRI interface link
2017-06-23 17:02:04 +02:00
Tobias Klauser
0a5cc41663 tutorial: fix Kubernetes CRI interface link
The Kubernetes Container Runtime Interface document was moved to https://github.com/kubernetes/community/blob/master/contributors/design-proposals/container-runtime-interface-v1.md. Adjust the URL in tutorial.md accordingly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-06-23 09:06:03 +02:00
Mrunal Patel
4d46ae6e1e Merge pull request #624 from rhatdan/vendor1
Vendor in latest opencontainers/runtime-tools
2017-06-22 17:00:45 -07:00
Andrew Pilloud
e4e982d78a test: hostport network test
Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com>
2017-06-22 15:46:15 -07:00
Dan Walsh
a9a1b04510 Vendor in latest opencontainers/runtime-tools
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-06-22 13:32:30 -04:00
Mrunal Patel
7cb47aeb21 Merge pull request #622 from alexlarsson/conmon-cleanup
Conmon cleanup
2017-06-22 10:05:35 -07:00
Mrunal Patel
59820df8e1 Merge pull request #619 from mrunalp/tty_logging_check
test: Tighten the grep for logging with tty
2017-06-22 10:02:54 -07:00
Andrew Pilloud
afc731d3a6 testdata: Remove hostport from sandbox_config
Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com>
2017-06-22 08:51:50 -07:00
Andrew Pilloud
17359e34a6 server: init iptables without kube
Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com>
2017-06-22 08:51:50 -07:00
Andrew Pilloud
a0e15abf5e vendor: add hostport and deps
Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com>
2017-06-22 08:51:50 -07:00
Andrew Pilloud
28cd8bde49 server: Hookup kubelet hostport
Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com>
2017-06-22 08:51:50 -07:00
Mrunal Patel
91ea67a8ff Merge pull request #618 from runcom/standard-names
server: standardize on naming
2017-06-22 07:16:39 -07:00
Alexander Larsson
c39868ad55 conmon: Add fds to mainloop where they are created
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
7b91005b36 conmon: Rename global fd variables to longer names
Since these are global, its nice if they are a bit more descriptive.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
4cb4de6cda conmon: Move OOM setup to helper function
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
34b75c20c2 conmon: Move terminal control fifo setup to a helper function
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
640ebeafb3 conmon: Break out attach socket setup to helper function
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
cc3a1615fb conmon: Break out connection socket setup to a separate function
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
b269969216 conmon: Don't use fixed size string buffers
We build paths using g_build_filename and g_strdup_printf() instead
which means we don't have any arbitrary pathname lenght issue, and
the code becomes cleaner.

We also convert asprintf to g_strdup_printf so that we can use
the glib OOM checker instead of open coding it everywhere.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
a7c61e4f9f conmon: Remove unused variables
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
215ef485df conmon: Add add_argv() helper
This makes adding the arguments to runtime_argv somewhat nicer.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
6aa1075ab6 conmon: Add (and use) get_pipe_fd_from_env helper
This avoids duplicating this code in two places.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Alexander Larsson
4838d6eb80 conmon: Rename all commandline option variables opt_*
This makes it easier to figure out where they come from

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-22 16:09:27 +02:00
Mrunal Patel
791d646695 Merge pull request #620 from alexlarsson/conmon-cleanup-exitsync
conmon: Clean up execsync
2017-06-22 07:07:37 -07:00
Antonio Murdaca
6035cff9e4
server: standardize on naming
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-22 11:55:03 +02:00
Alexander Larsson
81cb788004 conmon: Clean up execsync
This moves the timeout handling from the go code to conmon, whic
removes some of the complexity from criod, and additionally it will
makes it possible to do the double-fork in the exec case too.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-21 21:03:17 +02:00
Mrunal Patel
db337699f2 test: Tighten the grep for logging with tty
This tests that our ONLCR takes effect as we match \r\n
in the logs

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-21 10:10:16 -07:00
Antonio Murdaca
774c47d00c Merge pull request #615 from mrunalp/test_creation_failure
test: Ensure we get error messages back on creation failure
2017-06-21 11:34:23 +02:00
Antonio Murdaca
5dcbdc05e5 Merge pull request #613 from mrunalp/bump_1_alpha_0
version: Bump up version to 1.0.0-alpha.0
2017-06-21 00:36:24 +02:00
Mrunal Patel
3b3a2929e1 test: Ensure we get error messages back on creation failure
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-06-20 15:07:34 -07:00
Mrunal Patel
b82df188c6 version: Bump up version to 1.0.0-alpha.0
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-20 09:48:12 -07:00