12777 Commits

Author SHA1 Message Date
d68e429859 Merge pull request #11476 from vrothberg/fix-11392
container inspect: improve error handling
2021-09-08 16:57:23 +02:00
a1cab358cc fix play kube can't use infra_image in config file
Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
2021-09-08 19:55:45 +08:00
558ba1b99e Merge pull request #11468 from Luap99/play-kube-slirp
fix play kube --network options
2021-09-08 13:55:21 +02:00
6aa666a27c container inspect: improve error handling
Improve the error handling of `container inspect` to properly handle
when the container has been removed _between_ the lookup and the
inspect.  That will yield the correct "no such object" error message in
`inspect`.

[NO TESTS NEEDED] since I do not know have a reliable and cheap
reproducer.  It's fixing a CI flake, so there's already an indicator.

Fixes: #11392
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-08 13:26:29 +02:00
180a3c42d2 Merge pull request #11477 from raoulbhatia/fix-testvol-error
test/testvol/main.go: Fix missing arguments to Errorf()
2021-09-08 13:18:20 +02:00
aa412ccc45 test/testvol/main.go: Fix missing arguments to Errorf()
go test -v -p 1 -tags apparmor,ostree,seccomp,selinux,systemd github.com/containers/podman/v2/test/testvol
results in the following error:

> test/testvol/main.go:227:10: Errorf format %s reads arg #1, but call has 0 args
> test/testvol/main.go:233:10: Errorf format %s reads arg #1, but call has 0 args

This patch passes req.Name as an argument to the Errorf() call

Signed-off-by: Raoul Bhatia <raoul.bhatia@radarcs.com>
2021-09-08 11:18:12 +02:00
cd43cf8d58 Merge pull request #11453 from jonpspri/qemu-apple-silicon-bios-fd
QEMU Apple Silicon: Find BIOS FD wherever
2021-09-08 10:25:22 +02:00
f18ccbcc0f fix play kube --network options
Commit 092902b45555 introduced advanced network options for podman play
kube. However this never worked because it unconditionally set the
network mode to bridge after it parsed the network option.

Added a test to ensure the correct mode is set.

Truly fixes #10807

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-08 10:09:28 +02:00
ae0a9c6c8a Merge pull request #11471 from mheon/checkpointed
Add Checkpointed bool to Inspect
2021-09-08 09:56:23 +02:00
598d914e62 Merge pull request #11473 from nalind/build-context-as-root
pkg/bindings/images.nTar(): set ownership of build context to 0:0
2021-09-08 09:49:22 +02:00
748c2700b4 pkg/bindings/images.nTar(): set ownership of build context to 0:0
When attempting to run remote builds, users with UID/GID values that
were high enough that they wouldn't be mapped into their default user
namespace configurations would see their builds fail when the server
attempted to extract the build contexts that they supplied, and failed
to set ownership of the build context content to the UID/GID that were
originally assigned to them.

When archiving the build context at the client, set ownership of
everything to 0:0, which we know is always mapped.  Both ADD and COPY
require that we set the ownership of newly-added content to 0:0 (unless
the --chown flag is used), so throwing away the original ownership
information doesn't hurt, anyway.  As usual, tarballs that we extract
as part of ADD aren't going to be affected.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-09-07 15:29:33 -04:00
bfcd83ecd6 Add Checkpointed bool to Inspect
When inspecting a container, we now report whether the container
was stopped by a `podman checkpoint` operation via a new bool in
the State portion of inspected, `Checkpointed`.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-09-07 14:16:01 -04:00
536f23c0b7 Merge pull request #11431 from jmguzik/secrets-ls-filters
Add filtering functionality to http api secrets list
2021-09-07 19:24:20 +02:00
fbae579a31 Merge pull request #11467 from jesperpedersen/changelog
Remove changelog.txt from the repository
2021-09-07 18:49:23 +02:00
c9646b5126 Merge pull request #11437 from MichaelAnckaert/fix-11418
[NO TESTS NEEDED] Fix #11418 - Default TMPDIR to /tmp on OS X
2021-09-07 18:48:26 +02:00
30d0cc3cca Merge pull request #11427 from flouthoc/kube-pod-logs
kube: Add support for `podman pod logs`.
2021-09-07 18:39:45 +02:00
b07e735661 Merge pull request #11434 from coypoop/patch1
Spell "build linux darwin" as "build !windows".
2021-09-07 17:27:45 +02:00
88976fcede Merge pull request #11466 from jelly/doc_api_restart
[CI:DOCS] Document default timeout for libpod API Container Restart
2021-09-07 17:03:45 +02:00
0d1ba0a58f Remove changelog.txt from the repository
The changelog.txt file hasn't been kept in sync with release tags,
especially on main, so remove it.

The release notes will be featured in RELEASE_NOTES.md.

Signed-off-by: jesperpedersen <jesper.pedersen@redhat.com>

[NO TESTS NEEDED]
2021-09-07 10:53:26 -04:00
8a55363b80 Merge pull request #11459 from vrothberg/fix-11438
generate systemd: handle --restart
2021-09-07 15:51:41 +02:00
8b4f99ac20 QEMU Apple Silicon: Find BIOS FD wherever
QEmu normally install BIOS images under `/usr/local` prefix, but
Homebrew installs them under `/opt/homebrew`.  This change searches both
locations and then puts back to an unpathed name if it doesn't find the
BIOS.  (I imitated other architectures' implemenations in that failback
behavior.)

[NO TESTS NEEDED]

Signed-off-by: Jonathan Springer <jonpspri@gmail.com>
2021-09-07 09:01:26 -04:00
1150d1b0b8 Document default timeout for libpod API Container Restart
Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2021-09-07 14:46:00 +02:00
c20227bd16 Merge pull request #11464 from vrothberg/fix-11461
logs -f: file: fix dead lock
2021-09-07 14:18:41 +02:00
d1573b95e3 generate systemd: handle --restart
Handle custom restart policies of containers when generating the unit
files; those should be set on the unit level and removed from ExecStart
flags.

Fixes: #11438
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-07 13:58:11 +02:00
6e3a2d3eca Merge pull request #11402 from Luap99/macvlan-doc
network create: add warning for deprecated macvlan flag
2021-09-07 13:13:38 +02:00
668deb2ff1 Merge pull request #11442 from scottschreckengaust/main
Adding `-cpu host` for qemu for MacOS
2021-09-07 13:12:40 +02:00
1eaa449590 logs -f: file: fix dead lock
Fix a dead lock in the file log driver where one goroutine would wait on
the tail to hit EOF but reading is blocked for the function to return.

Fixes: 11461
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-07 12:46:56 +02:00
3d02cfb5e0 network create: add warning for deprecated macvlan flag
The macvlan driver is not deprecated, only the --macvlan flag is.
Remove the flag from the man page since it is deprecated and add a
warning to podman network create if it is used.

[NO TESTS NEEDED]

Fixes #11400

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-07 10:24:10 +02:00
e095667ac8 Merge pull request #11463 from flouthoc/cgroup-info-fix-panic
cgroup-info: check if user.slice is valid before accessing value
2021-09-07 09:40:39 +02:00
bd64039278 cgroup-info: check if user.slice is valid before accessing value
Prevent hitting `panic: runtime error: index out of range [1] with length 1`
while performing `podman info` when unexpected values for user.slice is found.

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-07 00:59:21 +05:30
57133bb334 Fix warning of unsupported feature on MacOS
Adding the `-cpu host` option to the `addArchOptions` function for
darwin removes the warning message, "host doesn't support requested
feature: CPUID.80000001H:ECX.svm [bit 2]" by qemu-system-x86_64 when
using the `podman machine start` command on MacOS

Closes #11421

[NO TESTS NEEDED]

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
2021-09-06 09:55:24 -07:00
68481539a4 Merge pull request #11451 from jonpspri/qemu-apple-silicon-hvf-tcg
Qemu TCG Accel fallback for Apple Silicon. Iss #10577
2021-09-06 18:32:32 +02:00
c01f7725a5 TCG Accel fallback for Apple Silicon. Iss #10577
Cause qemu to fall back to using TCG acceleration when HVP acceleration
is not available on Darwin Aarch64.  Qemu prints a warning which it is
desirable to leave to embarrass the upstream Qemu into approving the HVF
patches.

[NO TESTS NEEDED]

Signed-off-by: Jonathan Springer <jspringer@us.ibm.com>
Signed-off-by: Jonathan Springer <jonpspri@gmail.com>
2021-09-05 12:31:36 -04:00
32a493df0c Merge pull request #11432 from Utopiah/patch-1
[CI:DOCS] Example says there is not IP then in the next command suggests to use it
2021-09-05 17:44:29 +02:00
fcf995c47d Merge pull request #11445 from 1995parham/main
Add localhost into hosts based on network mode
2021-09-05 17:43:29 +02:00
ebd37ede99 Example says there is not IP then in the next command suggests to use it
Signed-off-by: Utopiah <fabien-services@benetou.fr>
2021-09-05 17:23:21 +02:00
11fc0e5540 kube: Add support for podman pod logs
Following PR adds support for `kubectl` like `pod logs` to podman.
Usage `podman pod logs <podIDorName` gives a stream of logs for all
the containers within the pod with **containername** as a field.

Just like **`kubectl`** also supports `podman pod logs -c ctrIDorName podIDorName`
to limit the log stream to any of the specificied container which belongs to pod.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-05 16:24:49 +05:30
692e37f8f3 Merge pull request #11441 from jesperpedersen/readme
Bump release to 3.3.1
2021-09-05 03:32:29 +02:00
ce5baa125b feat: add localhost into hosts if the networking mode is not host
Signed-off-by: Parham Alvani <1995parham@tuta.io>
2021-09-04 18:24:41 +04:30
bbd03df3e1 Merge pull request #11439 from coypoop/libvirt-unused
Remove unused stubs intended to start a machine with libvirt
2021-09-04 15:01:29 +02:00
e151f4c9f7 Fix #11418 - Default TMPDIR to /tmp on OS X
Signed-off-by: Michael Anckaert <michael.anckaert@sinax.be>
2021-09-04 08:40:57 +02:00
5d31c4250b Bump release to 3.3.1
Signed-off-by: jesperpedersen <jesper.pedersen@redhat.com>

[NO TESTS NEEDED]
2021-09-04 01:04:16 -04:00
274a3bc80b Remove unused stubs intended to start a machine with libvirt
[NO TESTS NEEDED]

Signed-off-by: Maya Rashish <maya@NetBSD.org>
2021-09-03 22:43:38 +03:00
af58cb15d2 Merge pull request #11428 from guillaumerose/missingcheck
machine: always check error of net.Dial, even after last try
2021-09-03 12:51:20 +02:00
8d9e19b035 Spell "build linux darwin" as "build !windows".
Equivalent for supported platforms, and makes it easier to support
additional unix-like OSes.

[NO TESTS NEEDED]

Signed-off-by: Maya Rashish <maya@NetBSD.org>
2021-09-03 13:38:14 +03:00
0f49678746 Merge pull request #11414 from edsantiago/bats
auto-update systemd test: skip on RHEL
2021-09-03 11:33:07 +02:00
d346e6e734 Add filtering functionality to http api secrets list
Filtering is missing in both compat API and libpod API, while docker
has filtering functinality. This commit enables filtering option using
name and id in both libpod and http API.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-09-03 10:29:31 +02:00
90998176d9 machine: always check error of net.Dial, even after last try
When net.Dial always fail in the above loop, the code following the loop
is executed. This error check prevents this.

[NO TESTS NEEDED]

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2021-09-03 09:10:35 +02:00
858d3e47c2 Merge pull request #11410 from jesperpedersen/issue11408
[#11408] podman help machine init
2021-09-02 23:14:14 +02:00
02a0d4b7fb auto-update systemd test: skip on RHEL
The "auto-update using systemd" test is failing on RHEL rootless.

Reason: it uses journalctl, which does not work on RHEL rootless.

Solution: add skip_if_journald_unavailable.

ALSO: add debugging info to test failure.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-02 12:28:51 -06:00