12153 Commits

Author SHA1 Message Date
8c7ce94b81 Merge pull request #10768 from xabinapal/issue-10767
[NO TESTS NEEDED] Swap private and shared mount relabel options
2021-06-25 03:25:43 -04:00
a7a7011961 fix: swapped volume relabel option values
Signed-off-by: Xabier Napal <xabiernapal@pm.me>
2021-06-24 22:18:25 +02:00
d1f57a07c2 Merge pull request #10771 from infiniteregrets/cli
[NO TESTS NEEDED]  Suggestions for typos/ incorrect commands for Podman CLI
2021-06-24 11:58:10 -04:00
21d80faa0b Merge pull request #10760 from vrothberg/save-docs
[CI:DOCS] podman save: clarify formats and transports
2021-06-24 09:54:14 -04:00
8459592030 Merge pull request #10773 from vrothberg/mtrmac
[CI:DOCS] add @mtrmac to OWNERS
2021-06-24 09:53:11 -04:00
f29f6aafa1 Merge pull request #10772 from vrothberg/fix-cp
cp: do not allow dir->file copying
2021-06-24 09:52:11 -04:00
b39aacf329 add @mtrmac to OWNERS
With great power comes great `/lgtm`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-24 14:04:15 +02:00
b1082696eb cp: do not allow dir->file copying
Fix a bug in `podman-cp` to forbid copying directories to files.
Previously, the directory was copied to the parent directory of the file
which is wrong.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-24 13:53:36 +02:00
ee7a9d736b [NO TESTS NEEDED] suggestions for incorrect cmds
Signed-off-by: Mehul Arora <aroram18@mcmaster.ca>
2021-06-24 17:02:09 +05:30
da33fc45b6 Merge pull request #10583 from rhatdan/log
Support log_tag defaults from containers.conf
2021-06-24 05:47:10 -04:00
63626e9b58 Merge pull request #10766 from Procyhon/13062021_manpage
[CI:DOCS] Follow-up to PR 10676
2021-06-24 05:39:06 -04:00
15fbf950ed [CI:DOCS] podman save: clarify formats and transports
Mention all supports --format values and put them into the context of
supported transports.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-24 09:18:16 +02:00
fc34f35e3f Merge pull request #10765 from umohnani8/mtab
Create /etc/mtab with the correct ownership
2021-06-23 16:12:45 -04:00
e1a7a0efbe Merge pull request #10747 from jwhonce/wip/report
Add --format to connection list
2021-06-23 15:53:31 -04:00
d95ff1a687 Merge pull request #10756 from jmguzik/volume-prune-until-http-api
Add support for volume prune until filter to http api
2021-06-23 15:52:30 -04:00
3f3feaa015 Merge pull request #10716 from cdoern/podFlags
Podman Pod Create --cpus and --cpuset-cpus flags
2021-06-23 15:51:29 -04:00
9db534e53a [NO TESTS NEEDED] Create /etc/mtab with the correct ownership
Create the /etc and /etc/mtab directories with the
correct ownership based on what the UID and GID is
for the container. This was causing issue when starting
the infra container with userns as the /etc directory
wasn't being created with the correct ownership.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-06-23 14:46:40 -04:00
b0a3ac3578 Merge pull request #10610 from cdoern/healthCheck
Edited compat handling code for containers/json status and added python tests
2021-06-23 14:45:29 -04:00
2b850ef055 Merge pull request #10696 from cdoern/libpodStats
Podman Stats additional features
2021-06-23 14:43:30 -04:00
7d83f9b6cc [CI:DOCS] Follow-up to PR 10676
See [PR 10676](https://github.com/containers/podman/pull/10676).

Signed-off-by: Alexander Richter <67486332+Procyhon@users.noreply.github.com>
2021-06-23 20:36:20 +02:00
bbd085ad1e Podman Pod Create --cpus and --cpuset-cpus flags
Added logic and handling for two new Podman pod create Flags.

--cpus specifies the total number of cores on which the pod can execute, this
is a combination of the period and quota for the CPU.

 --cpuset-cpus is a string value which determines of these available cores,
how many we will truly execute on.

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-23 13:47:57 -04:00
6ecdf4c389 Health Check is not handled in the compat LibpodToContainerJSON
Added parsing and handling for the healthCheck status within containers.go. Also modified tests

fixes #10457

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-23 13:16:19 -04:00
e50e0dad90 Merge pull request #10676 from Procyhon/13062021_manpage
[CI:DOCS] UPDATE manpages with MANPAGE_SYNTAX
2021-06-23 13:09:30 -04:00
7ed18eaec6 Merge pull request #10739 from vrothberg/fix-10682
create: support images with invalid platform
2021-06-23 13:05:31 -04:00
3322ea2c68 Merge pull request #10759 from dilyanpalauzov/master
markdown/*: typos 'a image'
2021-06-23 13:01:45 -04:00
e1f700c5d1 Merge pull request #10752 from vrothberg/fix-10730
[CI:DOCS] push/pull docs: clarify supported transports
2021-06-23 13:01:30 -04:00
f2dff41dbc Support log_tag defaults from containers.conf
Fixes: https://github.com/containers/podman/issues/10204

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-23 12:54:25 -04:00
525cb54e14 [CI:DOCS] push/pull docs: clarify supported transports
The man pages of podman push/pull were incomplete in explaining all
supported transports.  To keep things simple, explain the defaults,
refer to containers-transports(5) and give some examples.

Fixes: #10730
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-23 16:34:25 +02:00
5fc622f945 create: support images with invalid platform
Much to my regret, there is a number of images in the wild with invalid
platforms breaking the platform checks in libimage that want to make
sure that a local image is matching the expected platform.

Imagine a `podman run --arch=arm64 fedora` with a local amd64 fedora
image.  We really shouldn't use the local one in this case and pull down
the arm64 one.

The strict platform checks in libimage in combination with invalid
platforms in images surfaced in Podman being able to pull an image but
failing to look it up in subsequent presence checks.  A `podman run`
would hence pull such an image but fail to create the container.

Support images with invalid platforms by vendoring the latest HEAD from
containers/common.  Also remove the partially implemented pull-policy
logic from Podman and let libimage handle that entirely.  However,
whenever --arch, --os or --platform are specified, the pull policy will
be forced to "newer".  This way, we pessimistically assume that the
local image has an invalid platform and we reach out to the registry.
If there's a newer image (i.e., one with a different digest), we'll pull
it down.

Please note that most of the logic has either already been implemented
in libimage or been moved down which allows for removing some clutter
from Podman.

[NO TESTS NEEDED] since c/common has new tests.  Podman can rely on the
existing tests.

Fixes: #10648
Fixes: #10682
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-23 15:42:13 +02:00
f26fa53921 Podman Stats additional features
added Avg Cpu calculation and CPU up time to podman stats. Adding different feature sets in different PRs, CPU first.

resolves #9258

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-23 09:23:40 -04:00
510509bafc Merge pull request #10758 from vrothberg/unflake
disable tty-size exec checks in system tests
2021-06-23 08:39:57 -04:00
1aa9dcfadf markdown/*: typos 'a image'
Insisting on “DCO” imposes formalities, that serve self-purpose.  One cannot
assume that the submitter has time or will to read texts about symbolism in
software contributions.  If the system wants to see the text

  nrEAUIEUAIe eanuitdnuae EAIUEAUIAIE »ℓ§444.3.72b)°»°ℓ§euaieauuae

in each commit, people will write this, or any other text, that the system wants to
see.  All such text, which presence is mandated by the system, has the same value.

Signed-off-by: Дилян Палаузов <git-dpa@aegee.org>
2021-06-23 13:46:45 +03:00
e159eb892b Merge pull request #10754 from Luap99/sync-lock
getContainerNetworkInfo: lock netNsCtr before sync
2021-06-23 04:25:44 -04:00
d12027e0d0 disable tty-size exec checks in system tests
As discussed in #10710, the additional checks for podman-exec added by
commit 666f555aa52b are extremely flaky and appear in nearly every PR
I have see this week.

Let's temporarily disable the checks and reenable them on #10710 is
fixed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-23 10:10:19 +02:00
a0b24de32f Add support for volume prune until filter to http api
As stated in #10579 docker silently implements until filter for volume prune.
This commit adds initial support to the HTTP API, both libpod and compat.
It enables further work on that issue, such as adding cli support in the future.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-06-22 22:51:53 +02:00
d3afc6b3b6 Merge pull request #10741 from Luap99/test-ocicni
Do not use inotify for OCICNI
2021-06-22 16:17:12 -04:00
1b27234d13 Merge pull request #10697 from kwshi/rmi-dangling-parent-docs
[CI:DOCS] docs: specify `rmi` removes dangling parents
2021-06-22 14:12:35 -04:00
1f388ede6f Add --format to connection list
Add support for the --format option to podman system connection list.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-06-22 11:07:12 -07:00
a84fa194b7 getContainerNetworkInfo: lock netNsCtr before sync
`syncContainer()` requires the container to be locked, otherwise we can
end up with undefined behavior.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-22 16:51:21 +02:00
e014608539 Do not use inotify for OCICNI
Podman does not need to watch the cni config directory. If a network is
not found in the cache, OCICNI will reload the networks anyway and thus
even podman system service should work as expected.
Also include a change to not mount a "new" /var by default in the
rootless cni ns, instead try to use /var/lib/cni first and then the
parent dir. This allows users to store cni configs under /var/... which
is the case for the CI compose test.

[NO TESTS NEEDED]

Fixes #10686

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-22 16:00:47 +02:00
ed511d27d7 Merge pull request #10719 from containers/dependabot/go_modules/k8s.io/api-0.21.2
Bump k8s.io/api from 0.21.1 to 0.21.2
2021-06-22 06:31:07 -04:00
7f98d2ddbc docs: podman-rmi removes dangling parent images
Signed-off-by: Kye Shi <shi.kye@gmail.com>
2021-06-21 10:58:45 -07:00
be15e69a61 Merge pull request #10742 from vrothberg/fix-10675
logs: k8s-file: restore poll sleep
2021-06-21 13:06:04 -04:00
ee4cab0e09 logs: k8s-file: restore poll sleep
Commit 84b55eec2796 attempted to fix a race waiting for the container
died event.  Previously, Podman slept for duration of the polling
frequence which I considerred to be a mistake.  As it turns out, I was
mistaken since the file logger will, in fact, NOT read until EOF and
then stop logging but stop logging immediately _after_ it woke up.

[NO TESTS NEEDED] as the race condition cannot be hit reliably.

Fixes: #10675
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-21 15:44:13 +02:00
f4ba433b18 logs: k8s-file: fix spurious error logs
Fix the suprious "Error: nil" messages.  Also add some more context to
logged error messages which makes error sources more obvious.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-21 14:11:27 +02:00
18bf92f7ea Merge pull request #10734 from mgoltzsche/fix-dns-detection
Fix systemd-resolved detection.
2021-06-21 07:06:34 -04:00
9ec4d04592 Merge pull request #10723 from rhatdan/tmpdir
fix systemcontext to use correct TMPDIR
2021-06-21 03:50:31 -04:00
0fb165ed08 Fix systemd-resolved detection.
Previously podman failed when run in an environment where 127.0.0.53 is
the only nameserver but systemd-resolved is not used directly.
In practice this happened when podman was run within an alpine container
that used the host's network and the host was running systemd-resolved.

This fix makes podman ignore a file not found error when reading /run/systemd/resolve/resolv.conf.

Closes #10733

[NO TESTS NEEDED]

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2021-06-20 17:17:00 +02:00
928687e1da Merge pull request #10068 from flouthoc/master
[CI:DOCS] Add support for `podman login --verbose`
2021-06-20 10:24:30 -04:00
4cf3861168 Merge pull request #10718 from containers/dependabot/go_modules/github.com/containers/storage-1.32.3
Bump github.com/containers/storage from 1.32.2 to 1.32.3
2021-06-20 05:59:29 -04:00