4714 Commits

Author SHA1 Message Date
a704be59e5 Fix rootless detection error for pause & unpause
Previously, when pause & unpause were run on rootless, the error message that pause was unsupported for rootless was not being thrown. When running remote, even if remote host was root, unsupported rootless error was being thrown.

Now, the error shows up when appropriate.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-07-02 14:33:03 -04:00
db2cc36033 Deduplicate volumes
for containers that share volumes, so the pod section doesn't list copies

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-02 14:08:09 -04:00
26d02e9739 Merge pull request #3471 from giuseppe/small-fixes-cgroups
cgroups v2: fix cpu time
2019-07-02 19:48:20 +02:00
fdd98d58b8 Fix release notes
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-02 12:52:23 -04:00
e92de11a69 Ensure locks are freed when ctr/pod creation fails
If we don't do this, we can leak locks on every failure, and that
is very, very bad - can render Podman unusable without a 'system
renumber' being run.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-07-02 12:51:39 -04:00
4d45d8020e Merge pull request #3473 from mheon/release_notes_1.4.4
Update release notes for 1.4.4
2019-07-02 18:50:58 +02:00
473d060454 cirrus: add test for compiling without cgo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:11 +02:00
827ac0859f lock: new lock type "file"
it is a wrapper around containers/storage file locking.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:10 +02:00
82164a2e9e runtime: allow to specify the lock mechanism
preparation for the next patch.  It currently supports only "shm".

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:10 +02:00
2341eaa6c1 lock: disable without cgo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:04 +02:00
825506d8f8 spec: move cgo stuff to their own file
so it can build without cgo since seccomp requires it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:03 +02:00
35ab2184a3 rootless: allow to build without cgo
unfortunately rootless won't work without cgo, as most of the
implementation is in C, but at least allow to build libpod.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:02 +02:00
c81a8f2b6d attach: move cgo bits to a different file
move the cgo bits to a separate file to allow building without cgo.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:02 +02:00
1e0d632785 vendor: update containers/psgo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:40:41 +02:00
6b4bedec41 Update release notes for 1.4.4
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-02 09:44:14 -04:00
695aeac481 Merge pull request #3469 from rhatdan/vendor
Update to containers/storage v1.12.13
2019-07-02 15:24:02 +02:00
856780f552 stats: use runtime.NumCPU when percpu counters are not available
in the cgroup v2 implementation we don't have yet percpu times.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 14:14:18 +02:00
7423426f73 cgroups: fix times conversion
convert the time we read in microseconds to nanoseconds.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 12:59:26 +02:00
1a42123710 Update the testing documentation with system tests.
Add Bats installation procedure.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-02 02:44:14 +03:00
aa9de67452 Pass along volumes to pod yaml
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-01 16:58:53 -04:00
3b9ce8a3ac Merge pull request #3468 from giuseppe/fix-sudo-rootless
rootless: do not join namespace if it has already euid == 0
2019-07-01 22:57:37 +02:00
1ba0b86250 Update to containers/storage v1.12.13
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-01 16:54:11 -04:00
1307e96d5e Configure container volumes for generate kube
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-01 16:07:25 -04:00
4b176d4f45 rootless: do not join namespace if it has already euid == 0
do not attempt to join the rootless namespace if it is running already
with euid == 0.

Closes: https://github.com/containers/libpod/issues/3463

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-01 21:58:33 +02:00
d0a0a3fbd9 configure runtime without store
some podman commands do not require the use of a container/image store.
in those cases, it is more effecient to not open the store, because that
results in having to also close the store which can be costly when the
system is under heavy write I/O loads.

Signed-off-by: baude <bbaude@redhat.com>
2019-07-01 14:15:44 -05:00
150778820f Merge pull request #3324 from marcov/detach-keys-configurable
libpod: specify a detach keys sequence in libpod.conf
2019-07-01 15:54:27 +02:00
ed394070a8 Merge pull request #3422 from nalind/no-layer-images
Handle images which contain no layers
2019-06-28 19:14:45 +02:00
19ddcf9251 Add RUN priv'd test for build
Podman 1.4.1 had problems with builds with a
RUN command that tried to to a privliged command.

This adds a gating test for that situation.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-28 12:27:45 -04:00
9d49bda8f1 Merge pull request #3451 from ashley-cui/unmount
Remove umount command from remote client.
2019-06-28 18:06:30 +02:00
5e42bf0717 Merge pull request #3397 from giuseppe/fix-reboot
rootless: enable linger if /run/user/UID not exists
2019-06-28 16:00:55 +02:00
4aa109f00e Merge pull request #3448 from vrothberg/turnoffmod
Makefile: set GO111MODULE=off
2019-06-28 02:50:10 +02:00
48904026ea Merge pull request #3452 from QazerLab/bugfix/pause-sigterm
Exclude SIGTERM from blocked signals for pause process.
2019-06-28 00:10:11 +02:00
7ea7754e4a Exclude SIGTERM from blocked signals for pause process.
Currently pause process blocks all signals which may cause its
termination, including SIGTERM. This behavior hangs init(1) during
system shutdown, until pause process gets SIGKILLed after some grace
period. To avoid this hanging, SIGTERM is excluded from list of blocked
signals.

Fixes #3440

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-06-28 00:18:13 +03:00
93d3eb30a8 Remove umount command from remote client.
Since there is no mount command, it does not make sense to have umount.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-06-27 16:52:56 -04:00
7255468e65 rootless: enable linger if /run/user/UID not exists
at least on Fedora 30 it creates the /run/user/UID directory for the
user logged in via ssh.

This needs to be done very early so that every other check when we
create the default configuration file will point to the correct
location.

Closes: https://github.com/containers/libpod/issues/3410

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-27 16:34:35 +02:00
9697b0d91f Makefile: set GO111MODULE=off
Turn of go modules to avoid breaking build environments to accidentally
try pulling the dependencies instead of using the ./vendor directory.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-27 16:24:16 +02:00
0906b32087 Merge pull request #3442 from baude/removelibpodfrommainphase2
libpod removal from main (phase 2)
2019-06-27 16:01:45 +02:00
5e3d63a53c Merge pull request #3446 from giuseppe/fix-rootless-conf
rootless: use the correct conf file
2019-06-27 15:15:38 +02:00
3d559df540 Cirrus: Use packaged dependencies
Building/installing dependencies from fixed source-version ensures
testing is reliable, but introduces a maintenance burden and
risks testing far outside of a real-world environment.  The
sensible alternative is to install dependencies from distro-packaging
systems.

Install all development and testing dependencies at VM cache-image build
time, to help ensure testing remains stable.  The existing cache-image
build workflow can be utilized at any future time to build/test
with updated packages.

***N/B***: This does not update any dockerfiles used by testing, that is
left up to future efforts.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-27 09:05:26 -04:00
8561b99644 libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main.

Signed-off-by: baude <bbaude@redhat.com>
2019-06-27 07:56:24 -05:00
7e3c27eb9d runtime: do not attempt to use global conf file
we had a regression where the rootless user tried to use the global
configuration file.  We should not try to use the global configuration
when running in rootless but only cherry-pick some settings from there
when creating the file for the first time.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-27 14:22:51 +02:00
bfcf0292de runtime: use GetRootlessUID() to get rootless uid
otherwise it won't work in a user namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-27 13:52:36 +02:00
fccf4ad503 Merge pull request #3193 from cevich/check_image
Cirrus: More tests to verify cache_images
2019-06-27 03:31:35 +02:00
7705f99fe6 Merge pull request #3429 from cevich/strip_crio_conmon
Remove refs to crio/conmon
2019-06-27 03:05:33 +02:00
c06d9898f9 Merge pull request #3420 from ashley-cui/remoteconf
Fix crash for when remote host IP or Username is not set in conf file…
2019-06-26 22:25:34 +02:00
fc32439c29 Remove refs to crio/conmon
Conmon has moved out of cri-o and into it's own dedicated repository.
This commit updates configuration and definitions which referenced
the old cri-o based paths.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-26 12:44:22 -04:00
1ebb84b58e Handle images which contain no layers
This fixes some of our handling of images which have no layers, i.e.,
those whose TopLayer is set to an empty value.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-06-26 10:43:04 -04:00
8e79de2848 Add tests that we don't hit errors with layerless images
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-06-26 10:43:04 -04:00
58a1777f51 Merge pull request #3374 from giuseppe/cgroups
cgroups: add initial support for cgroups v2
2019-06-26 15:25:19 +02:00
da1ef2bdfd Merge pull request #3435 from mheon/fix_tmpfs_options
Fix parsing of the --tmpfs option
2019-06-26 15:07:22 +02:00