2828 Commits

Author SHA1 Message Date
ba29b30d74 Merge pull request #10788 from infiniteregrets/multi-pull
support pulling multiple images sequentially in a single podman pull
2021-07-06 04:30:54 -04:00
59abb77fc2 multiple image pull support
Signed-off-by: Mehul Arora <aroram18@mcmaster.ca>
2021-07-05 16:07:49 +05:30
895b815188 Merge pull request #10836 from Luap99/diff
podman diff accept two images or containers
2021-07-03 06:17:03 -04:00
8f6a0243f4 podman diff accept two images or containers
First, make podman diff accept optionally a second argument. This allows
the user to specify a second image/container to compare the first with.
If it is not set the parent layer will be used as before.

Second, podman container diff should only use containers and podman
image diff should only use images. Previously, podman container diff
would use the image when both an image and container with this name
exists.

To make this work two new parameters have been added to the api. If they
are not used the previous behaviour is used. The same applies to the
bindings.

Fixes #10649

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-02 17:11:56 +02:00
86c6014145 Implement --archive flag for podman cp
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-01 12:01:46 +02:00
092902b455 Handle advanced --network options in podman play kube
Since Podman create/run can support this, so should play.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-30 13:32:27 -04:00
0d8d805a76 Merge pull request #10761 from containers/dependabot/go_modules/github.com/containers/storage-1.32.4
Bump github.com/containers/storage from 1.32.3 to 1.32.4
2021-06-30 05:30:22 -04:00
2ce78aace6 Enhance system connection add URL input
* Add support for the tcp and unix schemes in connection URLs.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-06-29 16:24:03 -07:00
05f39af5bd Bump github.com/containers/storage from 1.32.3 to 1.32.5
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.32.3 to 1.32.5.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.32.3...v1.32.5)

---
updated-dependencies:
- dependency-name: github.com/containers/storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-29 15:58:32 -04:00
0a0ade3cc0 Merge pull request #10736 from trusch/feature-use-secret-config
read secret config from config file if no user data.
2021-06-25 12:45:53 -04:00
b1082696eb cp: do not allow dir->file copying
Fix a bug in `podman-cp` to forbid copying directories to files.
Previously, the directory was copied to the parent directory of the file
which is wrong.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-24 13:53:36 +02:00
b56b4b5374 read secret config from config file if no user data.
feat: read secret config from config file if the user hasn't entered
explicit config values

feat: allow to specify `--driver-opts opt1=val1,opt2=val2` in the secret
create command to allow overriding the default values

fix: show driver options in `podman secret inspect`

Signed-off-by: Tino Rusch <tino.rusch@gmail.com>
2021-06-24 12:31:14 +02:00
da33fc45b6 Merge pull request #10583 from rhatdan/log
Support log_tag defaults from containers.conf
2021-06-24 05:47:10 -04:00
e1a7a0efbe Merge pull request #10747 from jwhonce/wip/report
Add --format to connection list
2021-06-23 15:53:31 -04:00
d95ff1a687 Merge pull request #10756 from jmguzik/volume-prune-until-http-api
Add support for volume prune until filter to http api
2021-06-23 15:52:30 -04:00
3f3feaa015 Merge pull request #10716 from cdoern/podFlags
Podman Pod Create --cpus and --cpuset-cpus flags
2021-06-23 15:51:29 -04:00
b0a3ac3578 Merge pull request #10610 from cdoern/healthCheck
Edited compat handling code for containers/json status and added python tests
2021-06-23 14:45:29 -04:00
2b850ef055 Merge pull request #10696 from cdoern/libpodStats
Podman Stats additional features
2021-06-23 14:43:30 -04:00
bbd085ad1e Podman Pod Create --cpus and --cpuset-cpus flags
Added logic and handling for two new Podman pod create Flags.

--cpus specifies the total number of cores on which the pod can execute, this
is a combination of the period and quota for the CPU.

 --cpuset-cpus is a string value which determines of these available cores,
how many we will truly execute on.

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-23 13:47:57 -04:00
6ecdf4c389 Health Check is not handled in the compat LibpodToContainerJSON
Added parsing and handling for the healthCheck status within containers.go. Also modified tests

fixes #10457

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-23 13:16:19 -04:00
7ed18eaec6 Merge pull request #10739 from vrothberg/fix-10682
create: support images with invalid platform
2021-06-23 13:05:31 -04:00
f2dff41dbc Support log_tag defaults from containers.conf
Fixes: https://github.com/containers/podman/issues/10204

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-23 12:54:25 -04:00
5fc622f945 create: support images with invalid platform
Much to my regret, there is a number of images in the wild with invalid
platforms breaking the platform checks in libimage that want to make
sure that a local image is matching the expected platform.

Imagine a `podman run --arch=arm64 fedora` with a local amd64 fedora
image.  We really shouldn't use the local one in this case and pull down
the arm64 one.

The strict platform checks in libimage in combination with invalid
platforms in images surfaced in Podman being able to pull an image but
failing to look it up in subsequent presence checks.  A `podman run`
would hence pull such an image but fail to create the container.

Support images with invalid platforms by vendoring the latest HEAD from
containers/common.  Also remove the partially implemented pull-policy
logic from Podman and let libimage handle that entirely.  However,
whenever --arch, --os or --platform are specified, the pull policy will
be forced to "newer".  This way, we pessimistically assume that the
local image has an invalid platform and we reach out to the registry.
If there's a newer image (i.e., one with a different digest), we'll pull
it down.

Please note that most of the logic has either already been implemented
in libimage or been moved down which allows for removing some clutter
from Podman.

[NO TESTS NEEDED] since c/common has new tests.  Podman can rely on the
existing tests.

Fixes: #10648
Fixes: #10682
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-23 15:42:13 +02:00
f26fa53921 Podman Stats additional features
added Avg Cpu calculation and CPU up time to podman stats. Adding different feature sets in different PRs, CPU first.

resolves #9258

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-23 09:23:40 -04:00
d12027e0d0 disable tty-size exec checks in system tests
As discussed in #10710, the additional checks for podman-exec added by
commit 666f555aa52b are extremely flaky and appear in nearly every PR
I have see this week.

Let's temporarily disable the checks and reenable them on #10710 is
fixed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-23 10:10:19 +02:00
a0b24de32f Add support for volume prune until filter to http api
As stated in #10579 docker silently implements until filter for volume prune.
This commit adds initial support to the HTTP API, both libpod and compat.
It enables further work on that issue, such as adding cli support in the future.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-06-22 22:51:53 +02:00
1f388ede6f Add --format to connection list
Add support for the --format option to podman system connection list.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-06-22 11:07:12 -07:00
bd9987239d Scrub podman commands to use report package
Refactor podman commands that have drifted from using
c/common report pkg. Report pkg is needed to implement
go template functions.

Removed obsolete code from podman which exists in c/common.

Latest template library added default newlines and method to
remove them. Incorporated needed changes in c/common PR below.

Depends on https://github.com/containers/common/pull/624
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1855983

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-06-16 16:53:48 -07:00
2509a81c34 Merge pull request #10683 from Luap99/exec-resize
Fix resize race with podman exec -it
2021-06-16 15:29:34 -04:00
b3f61ec38c Merge pull request #10451 from giuseppe/test-ENOSYS
tests: update CI images
2021-06-16 11:10:30 -04:00
666f555aa5 Fix resize race with podman exec -it
When starting a process with `podman exec -it` the terminal is resized
after the process is started. To fix this allow exec start to accept the
terminal height and width as parameter and let it resize right before
the process is started.

Fixes #10560

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-16 16:43:30 +02:00
85bf412bb5 Merge pull request #10684 from Luap99/slirp-hosts
add correct slirp ip to /etc/hosts
2021-06-16 10:10:17 -04:00
769df3207d test: drop invalid test
runc-1.0-rc95 refuses destination paths that are not absolute.

The test was causing a mount with a destination "[/etc/foo]" causing
the OCI runtime to fail.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-16 10:16:04 +02:00
e405f12053 Merge pull request #10531 from rhatdan/volume
Fix permissions on initially created named volumes
2021-06-15 16:13:13 -04:00
b422a4eb49 Merge pull request #10595 from boaz0/closes_10539
Add podman-restart systemd unit file
2021-06-15 16:12:13 -04:00
463a5a7db5 Merge pull request #10622 from cdoern/imgImportFeature
compat import imageFromSrc support for platform query parameter
2021-06-15 12:43:15 -04:00
9c81b8cf72 add correct slirp ip to /etc/hosts
The container name should have the slirp interface ip set in /etc/hosts
and not the gateway ip. Commit c8dfcce6db0a introduced this regression.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1972073

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-15 13:41:14 +02:00
e2f51eeb06 Merge pull request #10651 from rhatdan/build
Add support for podman remote build -f - .
2021-06-14 13:04:03 -04:00
81eb71fe36 Fix permissions on initially created named volumes
Permission of volume should match the directory it is being mounted on.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-14 11:56:48 -04:00
3ddadc5326 Image import fromSrc now supports OS/Arch
added handling in entities and compat to support passing a specified OS/Arch while importing from SRC.

fixes #10566

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-06-14 09:05:01 -04:00
302b3084eb Restart all containers with restart-policy=always on boot
* Add podman-restart systemd unit file and add it to podman RPM package
* Fix podman start to filter all containers + unit test

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-06-13 15:04:34 +03:00
e8006c7978 Fix handling of podman-remote build --device
Fixes: https://github.com/containers/podman/issues/10614

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-13 06:17:49 -04:00
c955c95b54 Merge pull request #10661 from mwhahaha/issue-10660
Fall back to string for dockerfile parameter
2021-06-12 14:36:42 -04:00
d1cb5d14e9 Merge pull request #10654 from Luap99/net-connect
Fix network connect race with docker-compose
2021-06-12 05:02:43 -04:00
af9d690690 Merge pull request #10638 from Luap99/volume
Fix volumes with uid and gid options
2021-06-11 16:31:45 -04:00
ded2f004f0 Fall back to string for dockerfile parameter
a9cb824981db3fee6b8445b29e513c89e9b9b00b changed the expectations of the
dockerfile parameter to be json data however it's a string. In order to
support both, let's attempt json and fall back to a string if the json
parsing fails.

Closes #10660

Signed-off-by: Alex Schultz <aschultz@redhat.com>
2021-06-11 13:50:29 -06:00
44d9c453d3 Fix network connect race with docker-compose
Network connect/disconnect has to call the cni plugins when the network
namespace is already configured. This is the case for `ContainerStateRunning`
and `ContainerStateCreated`. This is important otherwise the network is
not attached to this network namespace and libpod will throw errors like
`network inspection mismatch...` This problem happened when using
`docker-compose up` in attached mode.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-11 16:00:12 +02:00
ad3b56c62f Fix volumes with uid and gid options
Podman uses the volume option map to check if it has to mount the volume
or not when the container is started. Commit 28138dafcc39 added to uid
and gid options to this map, however when only uid/gid is set we cannot
mount this volume because there is no filesystem or device specified.
Make sure we do not try to mount the volume when only the uid/gid option
is set since this is a simple chown operation.

Also when a uid/gid is explicity set, do not chown the volume based on
the container user when the volume is used for the first time.

Fixes #10620

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-11 13:27:08 +02:00
3a65ba2fab Add support for podman remote build -f - .
Fixes: https://github.com/containers/podman/issues/10621

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-11 06:28:28 -04:00
08e39fe6de Merge pull request #10646 from edsantiago/arm64
System tests: the continuing multiarch saga
2021-06-11 04:47:43 -04:00