2240 Commits

Author SHA1 Message Date
43c20d0200 implement --format for version command
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2018-11-25 12:42:05 +01:00
78604c3c39 Merge pull request #1858 from adrianreber/papr
Load NAT modules to fix tests involving CRIU
2018-11-23 12:33:39 -08:00
90412e4c56 Load NAT modules to fix tests involving CRIU
CRIU uses iptables to lock and unlock the network during checkpoint and
restore. If Podman is running in Podman the automatic loading of modules
does not work and thus this commit pre-loads the necessary modules to
make sure the checkpoint test cases are not failing.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-23 19:09:48 +01:00
1fdfeb8710 Merge pull request #1835 from adrianreber/master
Added option to keep container running after checkpointing
2018-11-21 05:11:12 -08:00
23feb0d6f9 Merge pull request #1810 from baude/inspectToKube
generate kubernetes YAML from a libpod container
2018-11-20 13:02:57 -08:00
fe4f09493f Merge pull request #1829 from baude/enableportbindinginpods
Allow users to expose ports from the pod to the host
2018-11-20 08:53:21 -08:00
21a76077d3 Merge pull request #1831 from jwhonce/wip/cmd
Improve speed of containers.list()
2018-11-20 08:32:16 -08:00
24c0739453 Update checkpoint/restore man pages
This adds the '--leave-running, -R' to the container-checkpoint man
page. As the information for '--all, -a' and '--latest, -l' was also
still missing it is included in this commit.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-20 17:25:44 +01:00
b0572d6229 Added option to keep containers running after checkpointing
CRIU supports to leave processes running after checkpointing:

  -R|--leave-running    leave tasks in running state after checkpoint

runc also support to leave containers running after checkpointing:

   --leave-running      leave the process running after checkpointing

With this commit the support to leave a container running after
checkpointing is brought to Podman:

   --leave-running, -R  leave the container running after writing checkpoint to disk

Now it is possible to checkpoint a container at some point in time
without stopping the container. This can be used to rollback the
container to an early state:

$ podman run --tmpfs /tmp --name podman-criu-test -d docker://docker.io/yovfiatbeb/podman-criu-test
$ curl 10.88.64.253:8080/examples/servlets/servlet/HelloWorldExample
3
$ podman container checkpoint -R -l
$ curl 10.88.64.253:8080/examples/servlets/servlet/HelloWorldExample
4
$ curl 10.88.64.253:8080/examples/servlets/servlet/HelloWorldExample
5
$ podman stop -l
$ podman container restore -l
$ curl 10.88.64.253:8080/examples/servlets/servlet/HelloWorldExample
4

So after checkpointing the container kept running and was stopped after
some time. Restoring this container will restore the state right at the
checkpoint.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-20 17:25:44 +01:00
ff47a4c2d5 Use a struct to pass options to Checkpoint()
For upcoming changes to the Checkpoint() functions this commit switches
checkpoint options from a boolean to a struct, so that additional
options can be passed easily to Checkpoint() without changing the
function parameters all the time.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-20 17:25:44 +01:00
690c52a113 Allow users to expose ports from the pod to the host
we need to allow users to expose ports to the host for the purposes
of networking, like a webserver.  the port exposure must be done at
the time the pod is created.

strictly speaking, the port exposure occurs on the infra container.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-20 09:49:34 -06:00
e955ff04ab Improve speed of containers.list()
* Clean up code in containers.py
* Pass pylint tests
* Pass tox tests

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-19 15:39:45 -07:00
ea928f2de6 Merge pull request #1824 from afbjorklund/pypodman_user
pypodman: Don't use $HOST and $USER variables for remote
2018-11-19 08:45:06 -08:00
64a29e383b Merge pull request #1806 from giuseppe/rootless-create-default-files
rootless: create user conf files when they don't exist
2018-11-19 08:44:57 -08:00
4eecc8cf70 Merge pull request #1823 from jwhonce/wip/cmd
Implement pypodman start command
2018-11-19 07:49:40 -08:00
f11a74e715 output libpod container to kubernetes yaml
scope out new kube subcommand where we can add generate. you can now generate kubernetes
YAML that will allow you to run the container in a kubernetes environment.  When
The YAML description will always "wrap" a container in a simple v1.Pod description.

Tests and further documentation will be added in additional PRs.

This function should be considered very much "under heavy development" at
this point.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-19 09:05:24 -06:00
47ffaae840 Merge pull request #1780 from cevich/un-magic
Reveal magic, parallel system-testing and system-testing simplification
2018-11-19 05:14:30 -08:00
027d6ca6de rootless: create empty mounts.conf if it doesn't exist
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-19 12:58:11 +01:00
a0079d7657 registries: check user registries file only in rootless mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-19 12:11:07 +01:00
937eb8413c rootless: create storage.conf when it doesn't exist
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-19 12:11:06 +01:00
a6aca6d106 rootless: create libpod.conf when it doesn't exist
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-19 12:11:05 +01:00
4adc69f4f9 Don't use $HOST and $USER variables for remote
Also, don't use $PORT. These are too generic.

Make sure to read $LOGNAME _after_ the config.

Prefix all the remote variables with PODMAN_

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-11-18 17:37:14 +01:00
0d21b90016 Implement pypodman start command
* Improve error messages from argparse Actions
* Silence more pylint errors when supporting a given API
* Refactor BooleanAction to support lower and mixed case input
* Remove spurious print()

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-16 14:57:17 -07:00
cd5742ff47 Merge pull request #1385 from ypu/systemtest
Add system test with ginkgo
2018-11-16 08:51:42 -08:00
4abf439e4b Merge pull request #1822 from vrothberg/runlabel-shlexing
runlabel: use shlex for splitting commands
2018-11-16 08:18:28 -08:00
780b790415 runlabel: use shlex for splitting commands
Use github.com/google/shlex for splitting commands instead of splitting
at whitespaces.  This way, we avoid accidentally splitting single string
arguments into mutliple ones.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-11-16 16:05:07 +01:00
43de95df34 Merge pull request #1813 from rhatdan/version
Add version command to pypodman
2018-11-16 05:02:08 -08:00
39ef6d43d0 Merge pull request #1756 from isimluk/update-dependent-metalinter
Update metalinter dependency
2018-11-16 05:02:03 -08:00
53c47b9061 Merge pull request #1769 from umohnani8/build
Set --force-rm for podman build to true by default
2018-11-16 03:04:58 -08:00
c1bc0a7192 Add a rule to compile system test in Makefile
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 11:19:37 +08:00
aaa31bbb1a Fix no-new-privileges test
Update the test to compare the output from different containers.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:24 +08:00
a7122d68de The system test write with ginkgo
The tests can be filter by --focus and --skip to fit different test
target. Also be able to set global options and cmd options by export
it to ENV to fit different test matrix.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:12 +08:00
74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
dba45a13c0 Add version command to pypodman
pypodman does not currently support the version command.  We want to
have as close to the same functionality between podman and pypodman,
so adding this command.

Also had to fix some validate errors.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-15 20:15:52 -05:00
236408bbbc Merge pull request #1821 from mheon/bump-0.11.1.1
Bump to v0.11.1.1
2018-11-15 15:42:48 -05:00
02bd5d4443 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-15 15:40:56 -05:00
6593826338 Bump to v0.11.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-15 15:40:55 -05:00
594495db26 Bump to v0.11.1.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.11.1.1
2018-11-15 15:40:49 -05:00
1b52843cfd Merge pull request #1819 from mheon/release_notes_0.11.1.1
Add release notes for 0.11.1.1
2018-11-15 15:37:53 -05:00
286801229a Merge pull request #1820 from TomSweeneyRedHat/dev/tsweeney/storeven1
Vendor in containers/storage
2018-11-15 15:37:38 -05:00
a620f345fa Vendor in containers/storage
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-11-15 13:57:03 -05:00
663ed73672 Add release notes for 0.11.1.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-15 13:48:17 -05:00
0ee56e57df Merge pull request #1818 from EmilienM/issue/1816
Increase pidWaitTimeout to 60s
2018-11-15 10:10:00 -08:00
c3d8328150 Increase pidWaitTimeout to 60s
At scale, it appears that we sometimes hit the 1000ms timeout to create
the PID file when a container is created or executed.
Increasing the value to 60s should help when running a lot of containers
in heavy-loaded environment.

Related #1495
Fixes #1816
Signed-off-by: Emilien Macchi <emilien@redhat.com>
2018-11-15 10:58:27 -05:00
97bded4a52 Merge pull request #1814 from cevich/cirrus_badge
Cirrus: Add master branch testing status badge
2018-11-14 10:09:01 -08:00
1fb3851620 Cirrus: Add master branch testing status badge
Engineers get testing status via their PR's but another round of testing
happens post-merge, without any direct feedback.  Fix this in a small
way, by adding a dynamic status badge on the front-page.  If this
turns red, it means Cirrus-CI testing of the master branch failed
for some reason.

Nearly always it's something harmless, but once and a while, this
catches really nasty problems caused by merge-sequence issues.
Having that feedback on the front page ensures the right people will
eventually get called into action.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-14 10:23:53 -05:00
2b911b0c8a Merge pull request #1812 from giuseppe/rootless-once
rootless: call IsRootless just once
2018-11-14 06:28:27 -08:00
1e3ff69502 rootless: call IsRootless just once
we are calling this function several times, it is worth to store its
result and re-use it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-14 10:13:50 +01:00
12f3721c34 Merge pull request #1811 from TomSweeneyRedHat/dev/tsweeney/gov1.10
Bump golang to v1.10 in install.md
2018-11-13 17:47:57 -08:00
41c3530d75 Bump golang to v1.10 in install.md
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-11-13 13:40:29 -05:00