12748 Commits

Author SHA1 Message Date
536951c1d2 Merge pull request #11503 from Luap99/remote-attach
Fix conmon attach socket buffer size
2021-09-09 15:37:16 -04:00
7cf22279d9 Fix conmon attach socket buffer size
The conmon buffer size is 8192, however the attach socket needs two extra
bytes. The first byte of each message will be the STREAM type. The last
byte is a null byte. So when we want to read 8192 message bytes we need
to read 8193 bytes since the first one is special.
check 1ef246896b/src/ctr_stdio.c (L101-L107)

This problem can be seen in podman-remote run/exec when it prints output
with 8192 or more bytes. The output will miss the 8192 byte.

Fixes #11496

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-09 17:57:42 +02:00
784e1ae137 Merge pull request #11502 from vrothberg/vendor-mpb
vendor mpb@v7.1.4
2021-09-09 11:55:19 -04:00
d477fe5cae Merge pull request #11447 from chenzhiwei/respect-config
fix play kube can't use infra_image in config file
2021-09-09 10:12:22 -04:00
e5468d404c test/e2e/search_test.go - relax tests
Some search tests were looking for an explicit amount of images to
match.  Since images are moving targets on these registries, make
sure to use lower bounds instead of exact matches.

Fixes CI which started to break when Red Hat images changed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-09 16:02:40 +02:00
7ee5b29b07 Merge pull request #11499 from flouthoc/inspect-tmpl-flush-writer
inspect: printTmpl must Flush writer
2021-09-09 09:08:17 -04:00
78c5a47fc9 vendor mpb@v7.1.4
Fixes a race condition leading to a deadlock.

Thanks to @mtrmac and @vbauerster for fixing the issue!

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-09 14:19:21 +02:00
23527374c4 Merge pull request #11492 from rhatdan/man
[CI:DOCS] Fix spacing on --userns options in docs
2021-09-09 08:15:15 -04:00
c6740e2063 Merge pull request #11488 from rhatdan/machine
Add 'Machine %q started' message when podman machine start successful
2021-09-09 08:14:16 -04:00
32eaf347e1 Merge pull request #11485 from Luap99/network-upgrade-test
podman upgrade tests for networking
2021-09-09 07:45:15 -04:00
6888b061d0 inspect: printTmpl must Flush writer
Flush should be called after the last call to Write to ensure that any data buffered in the Writer is written to output.
Any incomplete escape sequence at the end is considered complete for formatting purposes.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-09 16:37:24 +05:30
e73574aa7c Merge pull request #11430 from saschagrunert/normalize-key
Normalize auth key before calling `SetAuthentication`
2021-09-09 06:42:15 -04:00
4d9dcab0cf podman upgrade tests for networking
Test basic networking functionality in the upgrade tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-09 10:26:29 +02:00
2b41c4d667 Merge pull request #11495 from rhatdan/info
Add logDriver to podman info
2021-09-09 04:18:26 -04:00
bbdaf837b1 Normalize auth key before calling SetAuthentication
Recent changes in c/image caused the `SetAuthentication` API to be more
restrictive in terms of validating the `key` (`server`) input. To ensure
that manually modified or entries in `~/.docker/config.json` still work,
we now strip the leading `http[s]://` prefix.

Fixes https://github.com/containers/podman/issues/11235

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-09-09 09:17:22 +02:00
2f967b81cb Add logDriver to podman info
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-08 17:53:04 -04:00
ab272d1e9b Add 'Machine %q started' message when podman machine start successful
Currently users are confused if podman machine prints warnings about
whether or not podman machine was successful.  Printing this message
clears up the confusion.

[NO TESTS NEEDED] Since we don't have a way to test podman machine in
ci/cd system

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-08 15:23:53 -04:00
cee689af1e Fix spacing on --userns options in docs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-08 15:23:02 -04:00
26c8549ae3 Merge pull request #11486 from edsantiago/bats
system tests: new random_free_port helper
2021-09-08 14:48:24 -04:00
1ff797e362 system tests: new random_free_port helper
Picks a pseudorandom open port within a range. Refactor existing
instances of such code.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-08 11:25:42 -06:00
400799b58c Merge pull request #11327 from flouthoc/warn-non-writeable-xdg-runtime
runtime: Warn if `XDG_RUNTIME_DIR` is set but is not writable.
2021-09-08 13:10:22 -04:00
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