13765 Commits

Author SHA1 Message Date
13ee1788f9 swagger: add layers to build api docs
Add missing `layer` entry to swagger docs for `/build`.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-11-22 21:14:16 +05:30
022273c197 compat: add layer caching compatiblity for non podman clients
Non-podman clients do not set `layers` while making request. This is
supposed to be `true` bydefault but `non-podman-clients i.e Docker` dont
know about this field as a result they end up setting this values to
`false`. Causing builds to never use cache for layers.

Adds compatiblity for `docker SDK`.

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-11-22 21:11:26 +05:30
bfc929efc4 Merge pull request #12372 from Luap99/syslog-netavark
Make sure netavark output is logged to the syslog
2021-11-22 16:39:12 +01:00
26b45a1564 Merge pull request #12351 from adrianreber/2021-11-18-restore-runtime-verification
Restore runtime verification
2021-11-22 15:44:10 +01:00
f564c9a342 Bump github.com/opencontainers/selinux from 1.9.1 to 1.10.0
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.9.1...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/selinux
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 12:28:07 +00:00
a8b3c67b97 Add note about volume with unprivileged container
Add a note to the generated kube yaml if we detect a
volume is being mounted. The note lets the user know
what needs to be done to avoid permission denied error
when trying to access the volume for an unprivileged
container.
Add the same note to the man pages.

NO NEW TESTS NEEDED

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-11-21 19:44:26 -05:00
2f6cdd353f Merge pull request #12305 from colinbendell/add-expose-port-range
Support EXPOSE with port ranges
2021-11-21 18:45:07 +01:00
d173ebc067 Add EXPOSE e2e test
Signed-off-by: Colin Bendell <colin@bendell.ca>
2021-11-20 21:05:49 -05:00
02be831ce7 Support EXPOSE with port ranges
Fixes issue #12293. EXPOSE directive in images should mirror the --expose
parameter. Specifically `EXPOSE 20000-20100/tcp` should work the same
as `--expose 20000-20100/tcp`

Signed-off-by: Colin Bendell <colin@bendell.ca>
2021-11-20 19:24:21 -05:00
ab56a7c4b7 compat: Add subnet mask behind IP address to match Docker API
Signed-off-by: Ambrose Chua <ambrose@hey.com>
2021-11-20 21:00:38 +08:00
a6976c9ca8 Merge pull request #12216 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.14.6
Bump github.com/rootless-containers/rootlesskit from 0.14.5 to 0.14.6
2021-11-20 12:06:52 +01:00
d068997694 [CI:DOCS] Add java TZ note to run manpage
Add a note to show how to workaround the `--tz` option
being ignored in the run command.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1984251

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-11-19 20:38:55 -05:00
44b2404702 Bump github.com/rootless-containers/rootlesskit from 0.14.5 to 0.14.6
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.14.5 to 0.14.6.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](rootless-containers/rootlesskit@v0.14.5...v0.14.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 14:26:03 -05:00
21629b0501 podman-remote does not support signature-policy
Fixes: https://github.com/containers/podman/issues/12357

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-19 13:55:10 -05:00
2755d0255c Merge pull request #12364 from flouthoc/fix-filter-pattern
filter: use `filepath.Match` to maintain consistency with other pattern matching in podman
2021-11-19 19:53:14 +01:00
ced0ffbe8f Add tests for restore runtime verification
On container restore ensures that the same container runtime is used as
during checkpointing and it also ensures that the user does not select
a different runtime.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-11-19 17:46:07 +00:00
c76caba367 Use same runtime to restore a container as during checkpointing
There are at least two runtimes that support checkpoint and restore:
runc and crun. Although the checkpoints created by these are almost
compatible, it is not (yet) possible to restore a checkpoint created
with one runtime with the other runtime. To make checkpoint/restore
usage more comfortable this adds code to look into the checkpoint
archive during restore and to set the runtime to the one used during
checkpointing.

This also adds a check, if the user explicitly sets a runtime during
restore, that the runtime is also the same as used during checkpointing.

If a different runtime is selected than the one used during
checkpointing the restore will fail early.

If runc and crun will create compatible checkpoints in the future the
check can be changed to treat crun and runc as compatible
checkpoint/restore runtimes.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-11-19 17:46:06 +00:00
8198e96f31 Force iptables driver for netavark tests
Firewalld cannot be used because it can connect to the dbus api but
talks to firewalld in the host namespace. This will affact your host
badly and also causes tests to fail.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-19 18:23:26 +01:00
501643c8bd Make sure netavark output is logged to the syslog
Create a custom writer which logs the netavark output to logrus. This
will log to the syslog when it is enabled.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-19 18:15:53 +01:00
6011149cae filter: use filepath.Match to maintain consistency with other pattern
matching in podman

Following commit ensures that we maintain consistency with how pattern
matching is being carried out everywhere else in podman.

Switch from `regexp` to `filepath.Match`

For example https://github.com/containers/common/blob/main/libimage/filters.go#L162

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-11-19 22:07:47 +05:30
c03b6b54fd Semiperiodic cleanup of obsolete Skip()s
Found by my find-obsolete-skips script. Let's see which, if any,
of these skipped tests can be reenabled.

Some Skips are "this will never work", not "this is expected to
work one day". Update the message on those to reflect that.

Some were real bugs in the test framework. Fix those.

And, joy of joys, some work today. Remove those skips.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-19 08:49:57 -07:00
671e5ee42d Merge pull request #12367 from rst0git/file-locks-1
test: Update error string for --file-locks test
2021-11-19 16:48:15 +01:00
f82f6c1b0d Merge pull request #12311 from of2x/patch-1
[CI:DOCS] upload a translation file
2021-11-19 15:10:16 +01:00
a3664269b9 [CI:DOCS]upload a translation file
a tranlastion for the podman_tutorial.md

Signed-off-by: sixways <lw.2675@qq.com>
2021-11-19 21:29:28 +08:00
b2623ceb4b api/handlers: Add checkpoint/restore FileLocks
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-11-19 13:11:21 +00:00
84021cfdc3 test: Update error string for --file-locks test
Use a substring matching the end of the error message.

Closes: #12366

Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-11-19 13:02:58 +00:00
5432bb95f1 Merge pull request #12174 from fgimenez/fix-docker-networksettings-type-discrepancy
Introduces Address type to be used in secondary IPv4 and IPv6 inspect data structure
2021-11-19 13:57:13 +01:00
c603318b43 Merge pull request #12356 from Luap99/pod-logs
fix duplicated logs command
2021-11-19 10:43:13 +01:00
63196c26a9 Merge pull request #12344 from containers/dependabot/go_modules/github.com/docker/docker-20.10.11incompatible
Bump github.com/docker/docker from 20.10.10+incompatible to 20.10.11+incompatible
2021-11-19 02:40:09 +01:00
87a7800d14 Merge pull request #12318 from mscherer/2nd_try
Change error message for compatibility with docker
2021-11-19 02:34:10 +01:00
de3924169a Merge pull request #11795 from cevich/update_to_f35
Cirrus: Bump Fedora to release 35
2021-11-18 23:58:09 +01:00
cba028c90a Merge pull request #12346 from containers/dependabot/go_modules/k8s.io/api-0.22.4
Bump k8s.io/api from 0.22.3 to 0.22.4
2021-11-18 23:52:09 +01:00
319d3fba6d Merge pull request #12354 from Luap99/exit-command
Do not store the exit command in container config
2021-11-18 23:51:12 +01:00
22ef7b6208 fix duplicated logs command
Podman logs was defined twice, once for container logs and once for pod
logs. This causes problems with the shell completion. Also podman --help
showed this command twice.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-18 22:57:32 +01:00
c26af00c4b Merge pull request #11957 from edsantiago/bats
System tests: new checkpoint test
2021-11-18 22:07:14 +01:00
3242931c62 Merge pull request #12295 from flouthoc/filter-label-pattern
filters: add basic pattern matching for label keys i.e `--filter label=<pattern>`
2021-11-18 22:03:13 +01:00
82a050a58f Merge pull request #12298 from giuseppe/idmapped-bind-mounts
volumes: add new option idmap
2021-11-18 22:01:15 +01:00
93510e8d26 Merge pull request #12314 from Luap99/machine-wait-sshd
podman machine start wait for ssh
2021-11-18 22:00:18 +01:00
348aafeb1b Merge pull request #12348 from Luap99/rootless-netns
rootless netns, one netns per libpod tmp dir
2021-11-18 21:59:13 +01:00
b24110ea56 Merge pull request #12333 from rst0git/file-locks
Add --file-locks checkpoint/restore option
2021-11-18 21:57:16 +01:00
19400ec0d6 Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.10+incompatible to 20.10.11+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.10...v20.10.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 19:56:40 +00:00
7f96a8d2d0 Bump k8s.io/api from 0.22.3 to 0.22.4
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.22.3 to 0.22.4.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.22.3...v0.22.4)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 19:42:07 +00:00
0dae50f1d3 Do not store the exit command in container config
There is a problem with creating and storing the exit command when the
container was created. It only contains the options the container was
created with but NOT the options the container is started with. One
example would be a CNI network config. If I start a container once, then
change the cni config dir with `--cni-config-dir` ans start it a second
time it will start successfully. However the exit command still contains
the wrong `--cni-config-dir` because it was not updated.

To fix this we do not want to store the exit command at all. Instead we
create it every time the conmon process for the container is startet.
This guarantees us that the container cleanup process is startet with
the correct settings.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-18 20:28:03 +01:00
7098463e78 Add test for checkpoint/restore with --file-locks
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-11-18 19:23:48 +00:00
6d23ea60d2 Add --file-locks checkpoint/restore option
CRIU supports checkpoint/restore of file locks. This feature is
required to checkpoint/restore containers running applications
such as MySQL.

Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-11-18 19:23:25 +00:00
7f52bd8437 Cirrus: Bump Fedora to release 35
The Fedora 35 cloud images have switched to UEFI boot with a GPT
partition. Formerly, all Fedora images included support for runtime
re-partitioning. However, the requirement to test alternate storage
has since been dropped/removed.  Rather than maintain a disused
feature, and supporting scripts, these Fedora VM images have reverted
to the default: Automatically resize to 100% on boot.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
3ee2d2367a Cirrus: Partially revert catatonit --force install
VM Images created as of this commit contain the new/required version.
Remove the `--force` install, but retain the hack script's ability to
support this in the future.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
226be65bdd Revert "Cirrus: Temp. disable prior-fedora testing"
This reverts commit f35d7f4dc76ca02b741e37f31ddc68c1d3ca9331.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
5bd43fbea7 Cirrus: Workaround log_driver=journald setting
In F35 the hard-coded default (from
containers-common-1-32.fc35.noarch) is 'journald' despite
the upstream repository having this line commented-out.
Containerized integration tests cannot run with 'journald'
as there is no daemon/process there to receive them.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
f3021f3f6e Cirrus: Fix bindings test hang b/c logging config mismatch
Massive thanks to @edsantiago for tracking this down.

Ref: https://github.com/containers/podman/issues/12175

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00