2136 Commits

Author SHA1 Message Date
85dbfb33f4 Merge pull request #1778 from vrothberg/update-seccomp
update seccomp.json
2018-11-08 06:22:59 -08:00
19faaba945 update seccomp.json
Merge the following changes from the upstream Moby seccomp profile:

 * commit b2a907c8cab6 ("Whitelist statx syscall for libseccomp-2.3.3
                         onward")

 * commit 47dfff68e436 ("Whitelist syscalls linked to CAP_SYS_NICE in
                         default seccomp profile")

 * commit ccd22ffcc8b5 ("Move the syslog syscall to be gated by
                         CAP_SYS_ADMIN or CAP_SYSLOG")

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-11-08 14:21:00 +01:00
672f572f50 Merge pull request #1773 from TomSweeneyRedHat/dev/tsweeney/logoptfix1
Touch up --log* options and daemons in man pages
2018-11-07 17:25:04 -08:00
185ec6de43 Touch up --log* options and daemons in man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-11-07 19:54:17 -05:00
1ebead256c Merge pull request #1774 from mheon/fix_add_hosts_test
Fix run --hostname test that started failing post-merge
2018-11-07 16:06:09 -08:00
b598d6829b Fix run --hostname test that started failing post-merge
Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-11-07 16:26:42 -05:00
e9f8aed407 Merge pull request #1764 from rhatdan/nopasswd
Don't fail if /etc/passwd or /etc/group does not exists
2018-11-07 11:24:57 -08:00
1370c311f5 Merge pull request #1771 from baude/prepare
move defer'd function declaration ahead of prepare error return
2018-11-07 10:55:51 -08:00
ae03137861 Merge pull request #1689 from mheon/add_runc_timeout
Do not call out to runc for sync
2018-11-07 09:36:03 -08:00
1e1aaac97d Merge pull request #1767 from mheon/remove_conmon_cgroup_first
Remove conmon cgroup before pod cgroup for cgroupfs
2018-11-07 09:19:28 -08:00
1e4e33b41f Merge pull request #1761 from giuseppe/rootless-systemd
rootless: don't bind mount /sys/fs/cgroup/systemd in systemd mode
2018-11-07 08:58:33 -08:00
90662c2fa3 Merge pull request #1751 from QiWang19/issue1745
Add hostname to /etc/hosts
2018-11-07 08:58:19 -08:00
e022efa0f8 move defer'd function declaration ahead of prepare error return
Signed-off-by: baude <bbaude@redhat.com>
2018-11-07 10:44:33 -06:00
ae68bec75c Don't fail if /etc/passwd or /etc/group does not exists
Container images can be created without passwd or group file, currently
if one of these containers gets run with a --user flag the container blows
up complaining about t a missing /etc/passwd file.

We just need to check if the error on read is ENOEXIST then allow the
read to return, not fail.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-07 11:41:51 -05:00
536af1f689 Print error status code if we fail to parse it
When we read the conmon error status file, if Atoi fails to parse
the string we read from the file as an int, print the string as
part of the error message so we know what might have gone wrong.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-11-07 11:36:01 -05:00
c9e9ca5671 Properly set Running state when starting containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 11:36:01 -05:00
0f45403c9b Fix misspelling
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 11:36:01 -05:00
3286b0185d Retrieve container PID from conmon
Instead of running a full sync after starting a container to pick
up its PID, grab it from Conmon instead.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 11:36:01 -05:00
94763a47a6 If a container ceases to exist in runc, set exit status
When we scan a container in runc and see that it no longer
exists, we already set ContainerStatusExited to indicate that it
no longer exists in runc. Now, also set an exit code and exit
time, so PS output will make some sense.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 11:36:01 -05:00
140f87c474 EXPERIMENTAL: Do not call out to runc for sync
When syncing container state, we normally call out to runc to see
the container's status. This does have significant performance
implications, though, and we've seen issues with large amounts of
runc processes being spawned.

This patch attempts to use stat calls on the container exit file
created by Conmon instead to sync state. This massively decreases
the cost of calling updateContainer (it has gone from an
almost-unconditional fork/exec of runc to a single stat call that
can be avoided in most states).

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 11:36:01 -05:00
f714ee4fb1 Actually save changes from post-stop sync
After stopping containers, we run updateContainerStatus to sync
our state with runc (pick up exit code, for example). Then we
proceed to not save this to the database, requiring us to grab it
again on the next sync. This should remove the need to read the
exit file more than once.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 11:36:01 -05:00
48914d67ae Merge pull request #1762 from mheon/fix_python_tests
Temporarily fix the Python tests to fix some PRs
2018-11-07 08:23:49 -08:00
81cef49144 Merge pull request #1616 from cevich/cirrus_add_systemtest
Cirrus-CI: Add option to run system-tests
2018-11-07 08:06:07 -08:00
f813881b81 rootless: mount /sys/fs/cgroup/systemd from the host
systemd requires /sys/fs/cgroup/systemd to be writeable.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-07 16:10:34 +01:00
11c5b0237b rootless: don't bind mount /sys/fs/cgroup/systemd in systemd mode
it is not writeable by non-root users so there is no point in having
access to it from a container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-07 16:10:33 +01:00
879f9116de Add hostname to /etc/hosts
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-11-07 09:55:59 -05:00
fa76b86e3e Temporarily fix the Python tests to fix some PRs
The Python podman bindings have issues around kill - specifically
attempting to make it act like stop, when it should not. We
provide no guarantee of what state a container if in after kill -
it should be stopped, but we might have sent something that's not
SIGKILL. If you want a container or pod stopped, guaranteed, use
Stop().

The Python code attempted to ensure a container was actually
stopped after kill was run, which runs counter the above. This
was holding up some PRs that caused changes in how libpod obtains
its state, so for now, change pod kill to pod stop until the
proper changes in the Python code can be made.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 09:46:44 -05:00
3bacacce94 Remove conmon cgroup before pod cgroup for cgroupfs
For pods using cgroupfs, we were seeing some error messages in CI
from an inability to remove the pod CGroup, which was traced down
to the conmon cgroup still being present as a child. Try to
remove these error messages and ensure successful CGroup deletion
by removing the conmon CGroup first, then the pod cgroup.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-07 09:45:34 -05:00
9150d69087 Merge pull request #1768 from baude/pausecontainertests
Fix cleanup for "Pause a bunch of running containers"
2018-11-07 06:32:31 -08:00
b89a7c7406 Fix cleanup for "Pause a bunch of running containers"
When running integration tests in our CI, we observe a problem where paused containers
are not able to be stopped; and therefore cannot be cleaned up.  This leaves dangling mounts
and sometimes zombied conmon processes.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-06 19:35:22 -06:00
76360d9a6e Merge pull request #1743 from jwhonce/issue/1702
Add ChangeAction to parse sub-options from --change
2018-11-05 04:50:16 -08:00
e106ccf416 Merge pull request #1754 from isimluk/attach-shall-not-lock-me-out
`--interactive` shall keep STDIN attached even when not explicitly set
2018-11-04 04:06:10 -08:00
59f93edacc --interactive shall keep STDIN attached even when not explicitly called out
Addressing:

    podman run -it -a STDERR --rm alpine /bin/ash

hanging. As we droped stdin as soon as -a was used. Notice this is contrary to
what D-tool does and contrary to what podman help implies:

    podman run --help | grep interact
    --interactive, -i                  Keep STDIN open even if not attached

Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-03 19:18:37 +01:00
2efcd63c64 Merge pull request #1753 from isimluk/fix-podman
Do never override podman with docker
2018-11-03 08:39:42 -07:00
c04e090380 Do never override podman with docker
Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-03 08:58:22 +01:00
309f4eb1ef Merge pull request #1748 from jwhonce/issue/1655
Fix long image name handling
2018-11-01 14:50:04 -07:00
d18f243e12 Merge pull request #1737 from baude/parakill
Make kill, pause, and unpause parallel.
2018-11-01 13:04:10 -07:00
b559c19c2f Make kill, pause, and unpause parallel.
Operations like kill, pause, and unpause -- which can operation on one or
more containers -- can greatly benefit from parallizing its main job (eq kill).

In the case of pauseand unpause, an --all option as was added. pause --all will
pause all **running** containers.  And unpause --all will unpause all **paused**
containers.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 14:23:55 -05:00
732a4c814e Merge pull request #1738 from baude/pararestart
Make restart parallel and add --all
2018-11-01 12:19:14 -07:00
573e21f8a0 Fix long image name handling
* Fixed issue where podman printed '<none>' and pypodman
  skipped the image
* Fixed issue where port was printed in place of tags

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-01 11:36:46 -07:00
2011782d9d Make restart parallel and add --all
When attempting to restart many containers, we can benefit from making
the restarts parallel.  For convenience, two new options are added:

--all attempts to restart all containers
--run-only when used with --all will attempt to restart only running containers

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 13:14:12 -05:00
26330aa995 Merge pull request #1746 from baude/renamebaude
replace quay.io/baude to quay.io/libpod
2018-11-01 10:42:02 -07:00
a4c0cdedb9 Add ChangeAction to parse sub-options from --change
* Covers both commit and import commands
* Cleaned up export command
* Removed unneeded calls to super().__init__()

Fixes #1702

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-01 10:32:39 -07:00
17716d787a Merge pull request #1624 from cevich/update_fedora
Cirrus: Enable updating F28 image
2018-11-01 10:23:27 -07:00
7772350f52 Merge pull request #1603 from cevich/fix_cirrus_image_build
Fix Cirrus/Packer VM image building
2018-11-01 10:23:17 -07:00
641dbda926 Merge pull request #1741 from jwhonce/wip/humanize
Change humanize to use MB vs MiB.
2018-11-01 09:18:29 -07:00
a610f0f869 replace quay.io/baude to quay.io/libpod
images used for our integration suite have moved from my work account
to a group organization called libpod.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 10:31:44 -05:00
0f232037f6 Change humanize to use MB vs MiB.
Fixes #1653

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-11-01 07:39:35 -07:00
20a3a53c2f Merge pull request #1740 from baude/ppc64le
allow ppc64le to pass libpod integration tests
2018-11-01 06:19:51 -07:00
0360ec725a allow ppc64le to pass libpod integration tests
this pr allows the libpod integration suite to pass on the
ppc64le architecture.  in some cases, I had to skip tests.
eventually, these tests need to be fixed so that they properly pass. of
note for this PR is:

* changed the ppc64le default container os to be overlay (over vfs) as vfs seems non-performant on ppc64le
* still run vfs for rootless operations
* some images names for ppc64le had to change because they don't exist.
* this should help getting our CI to run on the platform

Signed-off-by: baude <bbaude@redhat.com>
2018-10-31 18:40:09 -05:00