12967 Commits

Author SHA1 Message Date
c668ca8597 podman machine: do not join userns
The go logic already prevents podman from joining the userns for machine
commands but the c shortcut code did not.

[NO TESTS NEEDED]

Fixes #11731

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-27 10:18:23 +02:00
e19a09c3df Merge pull request #11609 from sankalp-r/add-healthcheck-ps
added healthcheck to ps command
2021-09-24 16:51:28 -04:00
5b88e8ba82 Merge pull request #11736 from jelly/doc_search_api
[CI:DOCS] Document missing /images/search query parameters
2021-09-24 16:26:32 -04:00
cd28f5783a Merge pull request #11709 from afbjorklund/machine-json
Add JSON version of the machine list
2021-09-24 14:24:55 -04:00
85d9b37051 Merge pull request #11738 from rhatdan/docs
Fix english on prune prompt
2021-09-24 12:14:54 -04:00
1e0039a839 added healthcheck to ps command
Signed-off-by: Sankalp Rangare <sankalprangare786@gmail.com>
2021-09-24 20:24:23 +05:30
a97551eb20 Fix english on prune prompt
Google docs found this while writing Podman in Action book.

[NO TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-24 09:29:08 -04:00
9c48947c73 Merge pull request #11733 from Luap99/xdg
rootful: do not set XDG_RUNTIME_DIR for cni plugins
2021-09-24 08:20:54 -04:00
3d8dec982f Document missing /images/search query parameters
Include the tlsVerify, listTags query parameters for the compat and
libpod endpoint and document the default value for the amount of results
which are returned.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2021-09-24 12:27:55 +02:00
6095c4fac0 rootful: do not set XDG_RUNTIME_DIR for cni plugins
The dnsname plugin tries to use XDG_RUNTIME_DIR to store files.
podman run will have XDG_RUNTIME_DIR set and thus the cni plugin can use
it. The problem is that XDG_RUNTIME_DIR is unset for the conmon process
for rootful users. This causes issues since the cleanup process is spawned
by conmon and thus not have XDG_RUNTIME_DIR set to same value as podman run.

Because of it dnsname will not find the config files and cannot correctly
cleanup.
To fix this we should also unset XDG_RUNTIME_DIR for the cni plugins as
rootful.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-24 11:25:02 +02:00
1cf66f514f Revert "rootful: unset XDG_RUNTIME_DIR"
This reverts commit 91e21bed48a2ab11049ef20e9150b5be531bc50a.

XDG_RUNTIME_DIR is required for the authfile path. We cannot unset it.

[NO TESTS NEEDED]

Fixes #11725

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-24 10:57:40 +02:00
ba46613a6c Add completion for machine list format
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-23 20:31:57 +02:00
800d594afa Merge pull request #11675 from baude/playkubebuildcontextdir
Set context dir for play kube build
2021-09-23 13:42:42 -04:00
f690f78c65 Merge pull request #11716 from dilyanpalauzov/makefile_go_ldflags
Makefile: use -ldflags/-gccgoflags depending on the go implemenatiton
2021-09-23 12:17:42 -04:00
e8fc990aad Merge pull request #11654 from Luap99/health-docker
podman inspect add State.Health field for docker compat
2021-09-23 11:34:42 -04:00
c2beea6958 Merge pull request #11721 from Luap99/image-completion
shell completion: do not show images without tag
2021-09-23 10:51:44 -04:00
2df0685cbe Set context dir for play kube build
When performing an image build with play kube, we need to set the
context directory so things like file copies have the correct input
path.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-09-23 09:49:57 -05:00
ce080d25cd Makefile: use -ldflags/-gccgoflags depending on the go implemenatiton
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-09-23 16:38:04 +02:00
6b8371b1a3 Merge pull request #11722 from nalind/build-platform-docs
[CI:DOCS] update docs for --platform in podman-build.1
2021-09-23 10:15:43 -04:00
b08acdbc6b Merge pull request #11714 from vrothberg/save-remove-signatures
podman save: enforce signature removal
2021-09-23 09:38:25 -04:00
82818caffe Update docs for --platform in podman-build.1
Update the descriptions of the --arch, --os, --variant, and --platform
options, since the last of those hasn't been a no-op for some time, and
it was recently extended to accept multiple values.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-09-23 09:24:18 -04:00
b6e5a4909a shell completion: do not show images without tag
The shell completion should only suggest arguments that work. Using a
image without tag does not work in many cases. Having both the version
with and without tag also forces users to press one key more because
tab completion will always stop at the colon.

Fixes #11673

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-23 15:15:35 +02:00
1199733754 podman inspect add State.Health field for docker compat
podman inspect shows the healthcheck status in `.State.Healthcheck`,
docker uses `.State.Health`. To make sure docker scripts work we
should add the `Health` key. Because we do not want to display both keys
by default we only use the new `Health` key. This is a breaking change
for podman users but matches what docker does. To provide some form of
compatibility users can still use `--format {{.State.Healthcheck}}`. IT
is just not shown by default.

Fixes #11645

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-23 14:44:34 +02:00
3d34d3a186 Merge pull request #11647 from EduardoVega/11491-U-suffix-mount-option
Add support for :U flag with --mount option
2021-09-23 08:32:24 -04:00
5764693613 Merge pull request #11174 from TomSweeneyRedHat/dev/tsweeney/docpodimage
[CI:DOCS] Add link to running ctrimage on enablesysadm
2021-09-23 08:01:25 -04:00
01bf8a6687 podman save: enforce signature removal
Enforce the removal of signatures in `podman save` to restore behavior
prior to the migration to libimage.  We may consider improving on that
in the future.  For details, please refer to the excellent summary by
@mtrmac [1].

[NO TESTS NEEDED] - manually verified but exisiting tests need some
further investigation (see [1]).

[1] https://github.com/containers/podman/pull/11669#issuecomment-925250264

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-23 13:50:49 +02:00
b0d1c0fe22 Merge pull request #11704 from rhatdan/kube
podman generate kube should not include images command
2021-09-23 04:27:26 -04:00
4ecaf85d96 Add JSON version of the machine list
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-23 07:30:27 +02:00
1dba601b56 Merge pull request #11691 from afbjorklund/machine-list
Add more information about the VM to podman machine list
2021-09-22 18:47:48 -04:00
626df0a54e Merge pull request #11604 from rhatdan/deleteContainer
Ignore mount errors except ErrContainerUnknown when cleaningup container
2021-09-22 18:45:48 -04:00
f342784ce5 Merge pull request #11701 from ashley-cui/stream
Fix machine image
2021-09-22 18:44:47 -04:00
f2eb5bbbae Merge pull request #11693 from rhatdan/cleanup
standardize logrus messages to upper case
2021-09-22 18:25:48 -04:00
ed3c4a89d6 Add support for :U flag with --mount option
The :U flag can be used to change the ownership of source volumes based on
the UID, GID of the container. This is only supported by the --volume option,
this will allow to use --mount option as well.

Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-09-22 15:42:16 -06:00
2d5d98c047 [CI:DOCS] Add link to running ctrimage on enablesysadm
Add a link to the podman images readme.md to Dan's recent post
on Enable Sysadm about running containers inside of Podman

Fixes: https://github.com/containers/buildah/issues/3119

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-09-22 16:54:21 -04:00
b6fecbb75e Ignore mount errors except ErrContainerUnknown when cleaningup container
Fixes: https://github.com/containers/podman/issues/11207

[NO TESTS NEEDED] Since I don't know how to get into this situation.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:34:02 -04:00
1c4e6d8624 standardize logrus messages to upper case
Remove ERROR: Error stutter from logrus messages also.

[ NO TESTS NEEDED] This is just code cleanup.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:29:34 -04:00
45ee5c5db2 podman generate kube should not include images command
If the command came from the underlying image, then we should
not include it in the generate yaml file.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:10:37 -04:00
f5f95d722f Fix machine image
Make sure setting machine image to `testing` pulls down the testing
stream, and not the next stream

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-22 14:38:24 -04:00
aa628b82b1 Merge pull request #11689 from Luap99/con-state
sync container state before reading the healthcheck
2021-09-22 14:30:39 -04:00
420ff1da92 Merge pull request #11694 from edsantiago/prevent_port_collisions
Eighty-six eighty-eighty
2021-09-22 12:33:45 -04:00
ad8f72949a Merge pull request #11657 from containers/dependabot/go_modules/k8s.io/api-0.22.2
Bump k8s.io/api from 0.22.1 to 0.22.2
2021-09-22 12:32:46 -04:00
db44addf97 sync container state before reading the healthcheck
The health check result is stored in the container state. Since the
state can change or might not even be set we have to retrive the current
state before we try to read the health check result.

Fixes #11687

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-22 17:40:16 +02:00
e92b383033 Merge pull request #11629 from Luap99/CNI-1.0
Bump CNI to v1.0.1
2021-09-22 11:37:45 -04:00
0baee2cc33 Also show the (initial) disk size
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-22 17:14:16 +02:00
911298252a Show cpus and memory in machine list
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-22 17:14:07 +02:00
d88ed478cb Merge pull request #11692 from Luap99/nettypes
net types: remove omitempty from required fields
2021-09-22 10:17:45 -04:00
8f19efb519 Merge pull request #11678 from vrothberg/fix-11613
podman save: add `--uncompressed`
2021-09-22 09:53:46 -04:00
5acf8ae120 Eighty-six eighty-eighty
(Sorry, couldn't resist).

CI flakes have been coming down - thank you to everyone who has
been making them a priority.

This leaves a noisy subset that I've just been ignoring for months:

    Running: podman ... -p 8080:something
    ...cannot listen on the TCP port: listen tcp4 :8080: bind: address already in use

Sometimes these are one-time errors resolved on 2nd try; sometimes
they fail three times, forcing CI user to hit Rerun. In all cases
they make noise in my flake logs, which costs me time.

My assumption is that this has to do with ginkgo running random
tests in parallel. Since many e2e tests simplemindedly use 8080,
collisions are inevitable.

Solution: simplemindedly replace 8080 with other (also arbitrarily
picked) numbers. This is imperfect -- it requires human developers
to pick a number NNNN and 'grep NNNN test/e2e/*' before adding
new tests, which I am 100% confident ain't gonna happen -- but
it's better than what we have now.

Side note: I considered writing and using a RandomAvailablePort()
helper, but that would still be racy. Plus, it would be a pain
to interpolate strings into so many places. Finally, with this
hand-tooled approach, if/when we _do_ get conflicts on port NNNN,
it should be very easy to grep for NNNN, find the offending tests
that reuse that port, and fix one of them.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-22 07:49:19 -06:00
68d21b6ff5 net types: remove omitempty from required fields
This will make reading the fields easier in rust because we can
guarantee that the fields will be present in the json output.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-22 14:13:37 +02:00
7910bfd7c1 Merge pull request #11659 from vrothberg/psgo
vendor c/psgo@v1.7.1
2021-09-22 06:38:44 -04:00