9991 Commits

Author SHA1 Message Date
586a7d97c2 [CI:DOCS] fix an apostrophe nit in man page
A quick follow up to #8367 to add a missing apostrophe in three
man pages.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-17 11:43:03 -05:00
c2c7dd8ff3 remove contrib/gate
Remove references on contrib/gate.  The gating image is currently not
maintained and was replaced in the CI rewrite.  We can disable builds
in Quay once the change is merged.

Note that running `make validate` in a container is still desired.
A similar approach may be re-added in the future.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-17 15:21:50 +01:00
389dcb5c29 Remove some more excessive wrapping and stuttering
Stop over wrapping API Calls

The API calls will return an appropriate error, and this wrapping
just makes the error message look like it is stuttering and a
big mess.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-17 09:19:22 -05:00
42ec4cf87f Merge pull request #8290 from vrothberg/fix-8265
use container cgroups path
2020-11-17 14:00:09 +01:00
d200801152 Cleanup tutorials
Inspired by @kannkyo PR.

Eliminate sudo when commands will work fine in rootless mode.

Make all commands in tutorials easily cut and pastable, by eliminating
$ and > symbols.

This should make them all consistant agross different tutorials.

Also make all systemctl enable calls use the --now option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-17 06:49:53 -05:00
7d067afac7 Merge pull request #8347 from rhatdan/hostname
Make sure /etc/hosts populated correctly with networks
2020-11-17 12:45:50 +01:00
d30f9ae8b6 Merge pull request #8346 from Luap99/shell-completion
Improve the shell completion api
2020-11-17 12:42:06 +01:00
c92bdf550c Merge pull request #8359 from TomSweeneyRedHat/dev/tsweeney/buildahv1.18.0
Bump Buildah to v1.18.0, c/storage to v1.24.0
2020-11-17 12:36:19 +01:00
d7a547952c Merge pull request #8367 from Luap99/docs-network-pod
[CI:DOCS] Explain the relation between --pod and --network
2020-11-17 12:34:22 +01:00
39bf07694c use container cgroups path
When looking up a container's cgroup path, parse /proc/[PID]/cgroup.
This will work across all cgroup managers and configurations and is
supported on cgroups v1 and v2.

Fixes: #8265
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-17 12:29:50 +01:00
31ceaf7bd4 Explain the relation between --pod and --network
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-17 11:57:28 +01:00
3502860e1c Merge pull request #8360 from edsantiago/logformatter
logformatter: highlight timing results
2020-11-17 03:42:50 +01:00
4ca4234af1 Make sure /etc/hosts populated correctly with networks
The --hostname and containername should always be added to containers.

Added some tests to make sure you can always ping the hostname and container
name from within the container.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-16 16:40:50 -05:00
0da801a446 logformatter: highlight timing results
Add a :hover style to rows in the 'integration timing results'
section. Without that, it's really hard for my eye to scan
across and match a time to a test name.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-11-16 14:34:59 -07:00
b78a90cbde Bump Buildah to v1.18.0, c/storage to v1.24.0
Update to Buildah v1.18.0 and c/storage to v1.24

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-16 15:50:14 -05:00
e59394973a Merge pull request #8335 from Luap99/fix-html-tables
[CI:DOCS] Fix markdown tables on docs.podman.io
2020-11-16 21:40:10 +01:00
b8d25bd2cd Cirrus: Invalidate static cache on VM image update
It's important to periodically update the nix cache (about 1GB in size).
If not, it can grow stale and has been observed causing task failures.
Associating the nix cache update with a VM/Container image update,
ensures it happens first in PRs where environment-related failures
are less surprising.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-11-16 15:23:08 -05:00
5843f33a12 Merge pull request #8339 from rhatdan/df
Wrap missing container errors with container ID
2020-11-16 19:37:56 +01:00
6f08f2a238 Merge pull request #8324 from baude/speedupe2eremote
use lookaside storage for remote tests
2020-11-16 17:47:12 +01:00
59b0a0bd72 Merge pull request #8351 from containers/dependabot/go_modules/k8s.io/apimachinery-0.19.4
Bump k8s.io/apimachinery from 0.19.3 to 0.19.4
2020-11-16 17:38:28 +01:00
cf4967de4d Improve the shell completion api
One main advantage of the new shell completion logic is that
we can easly parse flags and adjust based on the given flags
the suggestions. For example some commands accept the
`--latest` flag only if no arguments are given.

This commit implements this logic in a simple maintainable way
since it reuses the already existing `Args` function in the
cmd struct.

I also refactored the `getXXX` function to match based on the
namei/id which could speed up the shell completion with many
containers, images, etc...

I also added the degraded status to the valid pod status
filters which was implemented in #8081.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-16 16:14:42 +01:00
15539c1c4b use lookaside storage for remote tests
in an effort to speed up the remote testing, we should be using
lookaside storage to avoid pull images as well as importing multiple
images into the RW store.

one test was removed and added into system test by Ed in #8325

Signed-off-by: baude <bbaude@redhat.com>
2020-11-16 08:15:44 -06:00
f9af427d59 Bump k8s.io/apimachinery from 0.19.3 to 0.19.4
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.19.3 to 0.19.4.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.19.3...v0.19.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-16 09:14:24 -05:00
392075631a Merge pull request #8345 from afbjorklund/volume-filter
Add support for volume ls --filter label=key=value
2020-11-15 15:13:51 +01:00
ff65d6095d Wrap missing container errors with container ID
While playing around with podman system df, I saw that my container
database was in bad state.  Basically podman new about containers
that were no longer in container/storage.

The podman system df was just erroring out early stating "container does not exist"
with no indicator of which container.

This Patch wraps the podman system df errors to indicate which container does not exist.
It also logs errors on containers that get into this state, but continues on to work on
all containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-15 06:45:21 -05:00
9fa09a83b3 Merge pull request #8325 from edsantiago/bats
system tests: various
2020-11-15 12:38:40 +01:00
a4c2471944 system tests: various
- images: confirm that 'podman images' emits headings
  even if there are no images present. Intended to
  replace e2e test which is difficult to get working
  under podman-remote.

- build: add test for #8092, podman-build gobbling stdin.
  Workaround needed for issues #8342 and #8343, in which
  podman-remote output differs from podman local.

- volumes: add test for #8307, double-lock on same volume.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-11-14 14:55:48 -07:00
0dad2499a3 Add support for volume ls --filter label=key=value
Supposed to be able to search for labels with a given value.

Previously it meant searching for label key and label value:

--filter label=key --filter label=value

Add some documentation and integration tests for it as well.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-11-14 20:18:52 +01:00
4eb9c28433 Merge pull request #8333 from rhatdan/buildah
Podman-remote build is getting ID twice
2020-11-14 15:10:09 +01:00
64a7d49226 Merge pull request #8336 from TomSweeneyRedHat/dev/tsweeney/podmanman
[CI:DOCS] Touch up Podman description in man page menu
2020-11-14 12:47:30 +01:00
b5e15f18d0 Podman-remote build is getting ID twice
This PR eliminates the second sending of the image id to the
podman-remote client.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-14 06:25:29 -05:00
0cba4a581a Merge pull request #8327 from rhatdan/build
test for buildah version in container images.
2020-11-14 11:57:14 +01:00
928e3a65a9 [CI:DOCS] Touch up Podman description in man page menu
The title for the Podman man page on the commands menu was a little
light, adding a few more words to it.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-13 20:28:52 -05:00
738d62ea96 Merge pull request #7964 from vrothberg/shortnames
short-name aliasing
2020-11-13 18:28:17 +01:00
2993e97dec Merge pull request #6442 from Luap99/podman-autocomplete
Shell completion
2020-11-13 16:46:51 +01:00
6d9d9fee30 Merge pull request #8326 from Luap99/fix-build-namespace
Fix namespace flag parsing for podman build
2020-11-13 16:44:45 +01:00
80b613d237 Fix markdown tables on docs.podman.io
Sphinx with recommonmark cannot render markdown tables at all.
There is a python package called `sphinx-markdown-tables` which
adds the markdown table support to recommonmark.
https://pypi.org/project/sphinx-markdown-tables/

By utilising this package we don't have to change our doc format.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-13 16:42:13 +01:00
8e4a42aa42 short-name aliasing
Add support for short-name aliasing.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-13 15:40:06 +01:00
0b1a60ec27 Merge pull request #8308 from jwhonce/jira/run-976
Refactor to use DockerClient vs APIClient
2020-11-13 15:00:01 +01:00
0b3f789a08 Merge pull request #8334 from vilgotf/patch-1
Set podman-auto-update.service Type=oneshot
2020-11-13 14:41:21 +01:00
e362d438b2 Set podman-auto-update.service Type=oneshot
Signed-off-by: Vilgot Fredenberg <vilgot@fredenberg.xyz>
2020-11-13 11:10:36 +01:00
42a5b0fd93 Merge pull request #8301 from TomSweeneyRedHat/dev/tsweeney/fixpully
Change podman build --pull=true to PullIfMissing
2020-11-13 10:42:13 +01:00
c69565d83c test for buildah version in container images.
Check to see if we are recording the version of buildah
used to build the image as a label in the image.

Also we should make sure the filter "since" works.
We are only testing "after", which we don't document.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-13 03:54:08 -05:00
b2d281afcc Merge pull request #8328 from FreedomBen/add-socket-start
[CI:DOCS] Add missing --now in systemctl start command
2020-11-13 09:50:58 +01:00
ba8a71f9ce Add missing --now in systemctl start command
If you don't use --now or also run systemctl --user start podman.socket
then the socket won't start until a reboot.  Much easier to just start
the socket at the same time as enabling it.

Signed-off-by: Benjamin Porter <FreedomBen@users.noreply.github.com>
2020-11-12 19:18:59 -07:00
6ea13fd872 Change podman build --pull=true to PullIfMissing
One last tweak to the man page for 'build --pull' and after
further testing against Docker, one slight change to the
pull policy.  First I changed `--pull=false` from PullNever
to PullIfMissing.  This matches Docker and will pull the
image if it's not present rather than erroring.  We've
the `--pull-never` option if someone wants the pull to
not do an actual pull and to error if the image isn't
local.

Then for the man page, I'd a much bigger change, in the
initial PR, I've backed most of that out and just
added a tweak.

Hopefully this puts this portion of the pull work behind
us for a while.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-12 18:50:31 -05:00
2fc2d4643e Merge pull request #8316 from rhatdan/codespell
Fix issues found with codespell
2020-11-12 23:29:51 +01:00
eab0905fa1 Fix namespace flag parsing for podman build
The namespace options for pid,ipc,uts were completely ignored.
The network namespace did not accept `none`.

This commit fixes these issues simply by calling `parse.NamespaceOptions`
from buildah instead of implementing our own logic.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 23:17:46 +01:00
79f5aed316 Add podman build --net alias for --network
Fixes #8332

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 23:17:42 +01:00
a1187ee6f3 Refactor to use DockerClient vs APIClient
* Update tests and framework
* remove tests for APIClient methods

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-12 15:13:09 -07:00