13531 Commits

Author SHA1 Message Date
a55473bea8 Merge pull request #12387 from edsantiago/remove_betrue
e2e tests: clean up antihelpful BeTrue()s
2021-11-23 10:54:40 +01:00
49d63ad5c1 Oops! Manual edits to broken tests
Commit 2 of 2: there were (still are?) a bunch of string
checks that didn't have a corresponding Expect(). IIUC
that means they were NOPs. Try to identify and fix those.

The first few were caught by Go linting, "ok is defined
but not used". When I realized the problem, I looked for
more using:

    $ ack -A2 LineInOutputStartsWith

...and tediously eyeballing the results, looking for
matches in which the next line was not Expect(). If
test was wrong (e.g. "server" should've been "nameserver"),
fix that.

Also: remove the remove-betrue script. We don't need it
in the repo, I just wanted to preserve it for posterity.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-22 15:23:08 -07:00
97ab9176f7 e2e tests: clean up antihelpful BeTrue()s
Many ginkgo tests have been written to use this evil form:

    GrepString("foo")
    Expect(that to BeTrue())

...which yields horrible useless messages on failure:

    false is not true

Identify those (automatically, via script) and convert to:

    Expect(output to ContainSubstring("foo"))

...which yields:

    "this output" does not contain substring "foo"

There are still many BeTrue()s left. This is just a start.

This is commit 1 of 2. It includes the script I used, and
all changes to *.go are those computed by the script.
Commit 2 will apply some manual fixes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-22 14:37:43 -07:00
1bfbb28b03 Merge pull request #12389 from cevich/remove_static
[CI:DOCS] Cirrus: Strip out static nix build
2021-11-22 22:33:30 +01:00
992fafa9ab Merge pull request #12386 from baude/playkuberename
Rename pod on generate of container
2021-11-22 16:19:58 -05:00
3eb1453b80 Merge pull request #12352 from Luap99/netavark-err
Fix netavark error handling and teardown issue
2021-11-22 16:01:40 -05:00
0b7c132d9f Merge pull request #12301 from umohnani8/table
Add note about volume with unprivileged container
2021-11-22 21:52:31 +01:00
aa301225aa Cirrus: Strip out static nix build
Unfortunately the maintainer of this is no longer available

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-22 14:50:16 -05:00
ed83ef2517 Merge pull request #12384 from containers/dependabot/go_modules/github.com/containers/image/v5-5.17.0
Bump github.com/containers/image/v5 from 5.16.1 to 5.17.0
2021-11-22 14:26:45 -05:00
179405ee3b Merge pull request #12385 from umohnani8/docs
[CI:DOCS] Update notes on java TZ in man page
2021-11-22 20:25:32 +01:00
9133c5646c Merge pull request #12381 from flouthoc/build-layer-docker-compat
compat: add layer caching compatiblity for `non-podman` clients.
2021-11-22 19:02:31 +01:00
9c8fb5cc0c Rename pod on generate of container
When generating kube of a container, the podname and container name in
the yaml are identical.  This offends rules in podman where pods and
containers cannot have the same name.  We now append _pod to the
podname to avoid that collision.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-11-22 11:50:08 -06:00
2ab28140d6 [CI:DOCS] Update notes on java TZ in man page
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-11-22 12:28:35 -05:00
73e95d1c3e Bump github.com/containers/image/v5 from 5.16.1 to 5.17.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.16.1 to 5.17.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.16.1...v5.17.0)

---
updated-dependencies:
- dependency-name: github.com/containers/image/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 17:01:27 +00:00
55dbc4e198 Merge pull request #12373 from TomSweeneyRedHat/dev/tsweeney/jdoc
[CI:DOCS] Add java TZ note to run manpage
2021-11-22 17:54:13 +01:00
28f1c7f49f Merge pull request #12382 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.10.0
Bump github.com/opencontainers/selinux from 1.9.1 to 1.10.0
2021-11-22 11:51:58 -05:00
40ae7e74b7 Merge pull request #12349 from edsantiago/clean_fixmes
Semiperiodic cleanup of obsolete Skip()s
2021-11-22 17:51:14 +01:00
044edbb9c9 Fix netavark error handling and teardown issue
The return error was not returned by podman , instead a different error
was created. Also make sure to free assigned ips on an error to not leak
them.

Lastly podman container cleanup uses the default network backend instead
of the provided one, we need to add `--network-backend` to the exit
command.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-22 17:49:55 +01:00
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
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
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