Commit graph

10544 commits

Author SHA1 Message Date
Valentin Rothberg 641272d411 system tests: set PODMAN_TIMEOUT to 120
The new Ubuntu 20.04 VMs seem very slow and fail reproducibly in a build
test (i.e, "wordir, cmd, env, label").  Bumping up the time out to 120
seconds will help get the CI green.

See github.com/containers/podman/pull/8747.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-18 14:34:13 +01:00
Valentin Rothberg adcb3a7a60 remote copy
Implement `podman-remote cp` and break out the logic from the previously
added `pkg/copy` into it's basic building blocks and move them up into
the `ContainerEngine` interface and `cmd/podman`.

The `--pause` and `--extract` flags are now deprecated and turned into
nops.

Note that this commit is vendoring a non-release version of Buildah to
pull in updates to the copier package.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-18 12:08:49 +01:00
OpenShift Merge Robot f56865879c
Merge pull request #8769 from containers/dependabot/go_modules/github.com/containers/common-0.31.1
Bump github.com/containers/common from 0.31.0 to 0.31.1
2020-12-18 11:04:36 +00:00
dependabot-preview[bot] 641046a79e Bump github.com/containers/common from 0.31.0 to 0.31.1
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.31.0 to 0.31.1.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.31.0...v0.31.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-18 10:26:24 +01:00
baude 9ec7603e1b podman v3 pod bindings
add options to each pod binding for future wiggle room

Signed-off-by: baude <bbaude@redhat.com>
2020-12-17 12:08:22 -06:00
OpenShift Merge Robot a17afa931d
Merge pull request #8752 from baude/bindings3volumes
misc bindings to podman v3
2020-12-17 17:22:37 +00:00
OpenShift Merge Robot 033336606f
Merge pull request #8766 from TomSweeneyRedHat/dev/tsweeney/readnow
[CI:DOCS] Bump version on readme
2020-12-17 16:08:33 +00:00
TomSweeneyRedHat 6bbe54f2b2 [CI:DOCS] Bump version on readme
Bump the version of Podman in the README.md to
the current 2.2.1

Addresses: #8760

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-12-17 10:50:05 -05:00
baude 86335aa4ae misc bindings to podman v3
manifest, system, info, volumes, play,  and generate bindings are
updated to always have binding options.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-17 09:40:51 -06:00
OpenShift Merge Robot 7592f8fbb4
Merge pull request #8717 from rhatdan/stdin
Close the stdin/tty when using podman as a restAPI.
2020-12-17 14:09:46 +00:00
OpenShift Merge Robot d291013404
Merge pull request #8758 from mlegenovic/master
Docker compat API - /images/search returns wrong structure (#7857)
2020-12-17 13:53:55 +00:00
OpenShift Merge Robot c38ae47a1a
Merge pull request #8750 from rhatdan/reset
Don't accidently remove XDG_RUNTIME_DIR when reseting storage
2020-12-17 12:05:33 +00:00
Milivoje Legenovic 29358e3e09 Docker compat API - /images/search returns wrong structure (#7857)
Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2020-12-17 12:50:44 +01:00
Daniel J Walsh b96c3489d0
Close the stdin/tty when using podman as a restAPI.
Currently the service is attempting to prompt on shortname expansion if you run
with a terminal. This change will cause the service to default to no terminal
and not prompt.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-17 06:36:39 -05:00
OpenShift Merge Robot 915ae6d9bf
Merge pull request #8756 from Luap99/fix-8748
Always add the default gateway to the cni config file
2020-12-16 22:30:45 +00:00
OpenShift Merge Robot e75dc3d536
Merge pull request #8738 from xatier/master
Add support for pacman package version query
2020-12-16 22:28:22 +00:00
OpenShift Merge Robot 2a21dcda8e
Merge pull request #8755 from edsantiago/bats
System tests: better diagnostics in completion test
2020-12-16 20:53:43 +00:00
xatier b6f5163460
Add support for pacman package version query
- refactor package query logic to be package manager agnostic.

- `pacman -Qo` is the equivalent to `rpm -qf` [1].

[1] https://wiki.archlinux.org/index.php/Pacman/Rosetta#Querying_specific_packages

Signed-off-by: xatier <xatierlike@gmail.com>
2020-12-16 12:38:46 -08:00
OpenShift Merge Robot 3ac83bf611
Merge pull request #8746 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.8.0
Bump github.com/opencontainers/selinux from 1.7.0 to 1.8.0
2020-12-16 20:13:03 +00:00
OpenShift Merge Robot 2d36c8bd4b
Merge pull request #8753 from rhatdan/service
podman.service should be an exec service not a notify service
2020-12-16 20:10:43 +00:00
Daniel J Walsh 82424aa007
Don't accidently remove XDG_RUNTIME_DIR when reseting storage
In certain cases XDG_RUNTIME_DIR was deleted by accident based on
settings in the storage.conf. This patch verifies that when doing
a storage reset, we don't accidently remove XDG_RUNTIME_DIR.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-16 15:09:37 -05:00
Paul Holzinger edf0e918e3 Always add the default gateway to the cni config file
`podman network create` should always add a gateway to the cni config.
If no gateway is given use the first ip in the subnet. CNI does not require
the gateway field but we need it because of network inspect.

This worked with previous version but was dropped in Commit(e7a72d72fd).

Fixes #8748

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-16 20:59:45 +01:00
Ed Santiago be0d56ce1c System tests: better diagnostics in completion test
Tracking down a CI failure earlier today, I was slightly
delayed by the absence of context information in a test
failure. This PR adds full command context to each
subtest, making it much easier for the developer to
narrow down the cause of a failure.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-16 12:20:07 -07:00
dependabot-preview[bot] 3bf037d3e8
Bump github.com/opencontainers/selinux from 1.7.0 to 1.8.0
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.7.0...v1.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-16 13:35:31 -05:00
Daniel J Walsh afb7afe2f1
podman.service should be an exec service not a notify service
Podman never notifies sytemd that it is ready to recieve connections
so systemd kills it after waiting 1.5 minutes.  Changing to exec
should leave it running until podman exits or the service is stopped.

https://github.com/containers/podman/issues/8751

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-16 13:20:39 -05:00
OpenShift Merge Robot bacb2fc526
Merge pull request #8312 from cevich/new_ubuntu_images
Cirrus: Update VM Images; Both Fedora and Ubuntu "prior" flavors run with CGroupsV1 & runc
2020-12-16 15:52:25 +00:00
OpenShift Merge Robot 978c0767fa
Merge pull request #8715 from baude/bindings3images
Podman image bindings for 3.0
2020-12-16 14:04:11 +00:00
Chris Evich f66ecc882d
Fix: unpause not supported for CGv1 rootless
Thanks Ed Santiago <santiago@redhat.com> for the fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-16 08:55:16 -05:00
OpenShift Merge Robot f1f7b8f6c8
Merge pull request #8730 from rhatdan/log
Add LogSize to container inspect
2020-12-16 11:23:23 +00:00
OpenShift Merge Robot 8333a9ee90
Merge pull request #8720 from edsantiago/bats
system tests: the catch-up game
2020-12-16 00:43:03 +00:00
Chris Evich 427731ab9c
Disable incompatible rootless + CGroupsV1 tests
These tests simply will not work under these conditions.

Note: Recently updated F32 (prior-fedora) and Ubuntu 20.04
(prior-ubuntu) VMs always use CGroupsV1 with runc.  F33 and
Ubuntu 20.10 were updated to always use CGroupsV2 with crun.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:10 -05:00
Chris Evich 0bb865e6c2
Disable rootless pod stats tests w/ CgroupV1
When running as rootless, on a CgroupV1 host these tests all report:
`Error: pod stats is not supported in rootless mode without cgroups v2`

Note: Recently updated F32 (prior-fedora) and Ubuntu 20.04
(prior-ubuntu) VMs always use CGroupsV1 with runc.  F33 and
Ubuntu 20.10 were updated to always use CGroupsV2 with crun.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:09 -05:00
Chris Evich e6fbc15f26
Disable CGv1 pod stats on net=host post
This should be addressed by PR
https://github.com/containers/podman/pull/8685

Note: Recently updated F32 (prior-fedora) and Ubuntu 20.04
(prior-ubuntu) VMs always use CGroupsV1 with runc.  F33 and
Ubuntu 20.10 were updated to always use CGroupsV2 with crun.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:09 -05:00
Chris Evich 8997a2d106
Disable pod stats tests in containerized Fedora w/ CGroupsV1
Nearly/all of the 'podman stats' tests fail on Fedora when
executing testing inside a container, and CGroupsV1 is used on the
host.  The typical failure message is of the form `Error: unable to
load cgroup at /machine.slice/.../: cgroup deleted`.

Note: Recently updated F32 (prior-fedora) and Ubuntu 20.04
(prior-ubuntu) VMs always use CGroupsV1 with runc.  F33 and
Ubuntu 20.10 were updated to always use CGroupsV2 with crun.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:09 -05:00
Chris Evich e6ab566574
Disable blkio.weight test on Ubuntu
These tests fail with `Error: opening file `io.bfq.weight` for writing:
Permission denied: OCI permission denied`.  Upon examination of the
VMs, it was found the kernel and OS lacks support for the `BFQ`
scheduler (which supplies the `weight` option).  The only available
schedulers are `none` and `mq-deadline`.

Note: Recently updated F32 (prior-fedora) and Ubuntu 20.04
(prior-ubuntu) VMs always use CGroupsV1 with runc.  F33 and
Ubuntu 20.10 were updated to always use CGroupsV2 with crun.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:09 -05:00
Chris Evich e3ba7092fb
Cirrus: Add support for Ubuntu 20.x
Previously automation always dropped the minor version number for
distributions.  This was intended for presentation and conditional
simplicity. Bash does not support non-integer comparison natively.

With the release of version 20.10, supporting testing with it and
the LTS release (20.04) requires scripts to consider minor version
numbers for Ubuntu VMs.  This is necessary because many times in
the past, some behaviors needed to be conditional on the release
version number.

With this commit, the images and embedded scripts/tooling uses an
altered format of `$UBUNTU_NAME', `$PRIOR_UBUNTU_NAME`, and (crucially)
`$OS_RELEASE_VER` and `$OS_REL_VER`.  Any `.` characters appearing
in the official version (from `/etc/os-release`) are dropped, and
the result is concatenated.

For example the current Ubuntu LTS version is `20.04`.  Prior to
this commit, `$OS_RELEASE_VER` would have been `20`.  With this
change, `$OS_RELEASE_VER` will now show `2004`.  Similarly `20.10`
is shown as `2010`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:09 -05:00
OpenShift Merge Robot 66e979a892
Merge pull request #8723 from matejvasek/cleanup-tmp-file
Clean up temporary file.
2020-12-15 22:23:09 +00:00
Daniel J Walsh e42d920ebf
Add LogSize to container inspect
Other log options are available so we need to add ability to look
up LogSize.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-15 17:22:06 -05:00
baude 8d4e19634c Podman image bindings for 3.0
Begin the migration of the image bindings for podman 3.0.  this includes
the use of options for each binding.  build was intentionally not
converted as I believe it needs more discussion before migration.
specifically, the build options themselves.

also noteworthly is that the remove image and remove images bindings
were merged into one.  the remove images (or batch remove) has one
downside in that the errors return no longer adhere to http return
codes.  this should be discussed and reimplemented in subsequent code.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-15 16:04:59 -06:00
OpenShift Merge Robot e689503fd6
Merge pull request #8726 from giuseppe/conmon-rootless-errs-to-info
libpod, conmon: change log level for rootless
2020-12-15 20:26:39 +00:00
OpenShift Merge Robot 9379ee9790
Merge pull request #8725 from rhatdan/TMPDIR
Allow users to specify TMPDIR in containers.conf
2020-12-15 19:35:39 +00:00
Giuseppe Scrivano 8bfba70185
contrib: drop mirror.chpc.utah.edu:443
remove unused mirror from list of required host/ports: the host is
unreachable due to DNS misconfiguration, and it doesn't look like we
need it for anything anyway.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-15 20:07:36 +01:00
Giuseppe Scrivano 08f76bf7a5
libpod, conmon: change log level for rootless
Change the log level when running as rootless when moving conmon to a
different cgroup.

Closes: https://github.com/containers/podman/issues/8721

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-15 18:55:51 +01:00
Matej Vasek af36d444a5 Clean up temporary file.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-12-15 16:07:43 +01:00
Daniel J Walsh d5e05a4b92
Allow users to specify TMPDIR in containers.conf
Currently we hard code TMPDIR environment variable to /var/tmp
if it is not set in the Environment. This causes TMPDIR environment
variable to be ignored if set in containers.conf.

This change now uses the host environment TMPDIR, followed by
containers.conf and then hard codes TMPDIR, if it was not set.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-15 06:35:43 -05:00
Ed Santiago 1345d0358b system tests: the catch-up game
- run test: minor cleanup to .containerenv test. Basically,
  make it do only two podman-runs (they're expensive) and
  tighten up the results checks

- ps test: add ps -a --storage. Requires small tweak to
  run_podman helper, so we can have "timeout" be an expected
  result

- sdnotify test: workaround for #8718 (seeing MAINPID=xxx as
  last output line instead of READY=1). As found by the
  newly-added debugging echos, what we are seeing is:

      MAINPID=103530
      READY=1
      MAINPID=103530

  It's not supposed to be that way; it's supposed to be just
  the first two. But when faced with reality, we must bend
  to accommodate it, so let's accept READY=1 anywhere in
  the output stream, not just as the last line.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-14 15:06:43 -07:00
OpenShift Merge Robot 999d40d2c7
Merge pull request #8692 from rhatdan/network
[CI:DOCS] Cleanup CNI Networks on reboot
2020-12-14 10:42:50 -05:00
OpenShift Merge Robot 2854cdcd58
Merge pull request #8714 from edsantiago/more_journald_rootless_skips
RHEL gating tests: more journald exceptions
2020-12-14 10:40:34 -05:00
OpenShift Merge Robot 0fd31e2994
Merge pull request #8696 from Luap99/podman-events-until
podman events allow future time for --until
2020-12-14 09:33:42 -05:00
OpenShift Merge Robot 803c078d3b
Merge pull request #8693 from giuseppe/drop-valid-id-in-userns-check
podman: drop checking valid rootless UID
2020-12-14 09:31:20 -05:00