19071 Commits

Author SHA1 Message Date
287a4193e7 Merge pull request #18520 from ygalblum/quadlet-test-notify
Quadlet system tests - fix socket notification
2023-05-09 12:09:14 -04:00
6613e50c10 Merge pull request #18519 from vrothberg/fix-18356
sqlite: disable WAL mode
2023-05-09 11:48:33 -04:00
dc01ce8768 Merge pull request #18515 from vrothberg/fix-18486
quadlet: support `HostName`
2023-05-09 11:21:28 -04:00
01e20818cc Ensure the consistent setting of the HOME env variable on container start
Signed-off-by: Dawid Kulikowski <git@dawidkulikowski.pl>
2023-05-09 16:34:28 +02:00
8aaa13accb Quadlet system tests - fix socket notification
In some tests use Notify=yes while in others remove the notification

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-05-09 17:27:47 +03:00
1fb3cdf8a8 sqlite: disable WAL mode
As shown in #17831, WAL mode plays a role in causing `database is locked`
errors.  Those are errors, in theory, should not happen as the DB should
busy wait.  mattn/go-sqlite3/issues/274 has some comments indicating
that the busy handler behaves differently in WAL mode which may be an
explanation to the error.

For now, let's disable WAL mode and only re-enable it when we have
clearer understanding of what's going on.  The upstream issue along with
the SQLite documentation do not give me the clear guidance that I would
need.

[NO NEW TESTS NEEDED] - flake is only reproducible in CI.

Fixes: #18356
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-05-09 15:54:26 +02:00
d24bec0d03 system tests: timeoutize quadlet, systemd
Run $QUADLET and all systemctl/journalctl commands using 'timeout'.
Nothing should ever, ever take more than the default 2 minutes.

Followup to #18514, in which quadlet tests are found to be
taking 9-10 minutes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-09 07:46:12 -06:00
3d6894426c test: update README for integration tests
- document env vars that can be used
- list up to date dependencies
- remove unnecessary GOPATH mention, no longer needed with gomodules
- use make targets to tests everything (much faster due `-p` option)
- remove tests in container section as make shell is not a valid target

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-09 15:45:43 +02:00
c400cc7ead libpod/Container.rootFsSize(): use recorded image sizes
In rootFsSize(), instead of calculating the size of the diff for every
layer of the container's base image, ask the storage library for the sum
of the values it recorded when it first wrote those layers.

In a similar fashion, teach rwSize() to use the library's
ContainerSize() method instead of trying to roll its own.

Replace calls to pkg/util.SizeOfPath() with calls to
github.com/containers/storage/pkg/directory.Size(), which does the same
thing.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-05-09 09:33:37 -04:00
d49a537b8f Merge pull request #18513 from edsantiago/wait_wait
e2e: fix race in a play-kube test
2023-05-09 09:08:53 -04:00
1a78a4e16f Merge pull request #18489 from bachradsusi/quadlets-precedence
Fix preference of user quadlets directories
2023-05-09 08:29:42 -04:00
b97be3406b quadlet: support HostName
Add a new `HostName` field to Quadlet `.container` files.

Fixes: #18486
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-05-09 13:35:54 +02:00
9dc107e749 e2e: fix race in a play-kube test
Yet another case where tests expect play-kube to be synchronous.
There are probably dozens more of these.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-09 05:19:05 -06:00
bdb3ed7950 Fix preference of user quadlets directories
If there's a container defined in multiple directories use the following
precedence:

$XDG_CONFIG_HOME/containers/systemd/ or ~/.config/containers/systemd/
takes precedence over /etc/containers/systemd/users/$(UID) and this
takes precedence over /etc/containers/systemd/users/

Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
2023-05-09 12:06:38 +02:00
edcb29b19f Merge pull request #18511 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.9.0
2023-05-09 05:03:56 -04:00
8aed206c3d Merge pull request #18508 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.10.0
2023-05-09 05:01:01 -04:00
42ac84da9e Merge pull request #18498 from rhatdan/build
Check on client side for Containerfile, if none specified
2023-05-09 04:31:54 -04:00
40b21fa7d5 fix(deps): update module golang.org/x/tools to v0.9.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-09 06:13:19 +00:00
661a238a97 fix(deps): update module golang.org/x/net to v0.10.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-08 19:13:17 +00:00
332b47fefb Check on client side for Containerfile, if none specified
Fixes: https://github.com/containers/podman/issues/16354

Currently we check on the server side, which ends up generating a bad
error message.

$ podman --remote build foo/
ERRO[0000] While reading directory /home/dwalsh/go/src/github.com/containers/podman/foo: EOF
Error: stat /var/tmp/libpod_builder1249622306/build/Dockerfile: no such file or directory

With this change you will get

./bin/podman --remote build foo/
Error: Containerfile not specified and no Containerfile or Dockerfile found in context directory, /home/dwalsh/podman/foo

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-08 13:58:37 -04:00
a330974c73 Merge pull request #18500 from edsantiago/treadmill_rootless_tweaks
Buildah treadmill: several fixes
2023-05-08 12:48:48 -04:00
cbbfa35844 Merge pull request #18503 from containers/dependabot/go_modules/github.com/docker/docker-23.0.6incompatible
build(deps): bump github.com/docker/docker from 23.0.5+incompatible to 23.0.6+incompatible
2023-05-08 11:52:48 -04:00
18cd174c92 build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.5+incompatible to 23.0.6+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.5...v23.0.6)

---
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>
2023-05-08 12:59:13 +00:00
9ec630f305 Buildah treadmill: several fixes
- treadmill script: run root & rootless in parallel, not
  sequentially. It's only four jobs, and it seems dumb
  to fix root tests, repush, then discover a rootless failure.

- apply-podman-deltas: implement skip_if_rootless(), and
  use it to skip a nasty longstanding flake

- bud-tests-in-podman diffs: ugly code to fix a rootless hang.
   background: rootless remote tests hang
   cause: stray podman server process
   root cause: no idea. No clue at all. I just gave up
   workaround: seek out and kill stray server processes

  Rootless buildah-bud tests are not run in regular CI,
  only in the buildah treadmill.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-08 05:28:11 -06:00
fb03443274 Merge pull request #18496 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/common digest to 3e93a76
2023-05-08 06:44:43 -04:00
11d92ea376 fix(deps): update github.com/containers/common digest to 3e93a76
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-06 11:14:08 +00:00
ace3cba5c1 Merge pull request #18491 from containers/renovate/docker-6.x
chore(deps): update dependency docker to ~=6.1.0
2023-05-06 07:10:58 -04:00
1bf057e8cf chore(deps): update dependency docker to ~=6.1.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-05 19:24:45 +00:00
ca3d4503e3 Merge pull request #18446 from rhatdan/quadlet
Allow user quadlets to be stored under /etc
2023-05-05 11:28:46 -04:00
c74f9ad66d Merge pull request #18476 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/common digest to bc15b04
2023-05-05 06:26:26 -04:00
27891a6640 Update docs/source/markdown/podman-systemd.unit.5.md
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-05 05:48:33 -04:00
505e02e046 fix(deps): update github.com/containers/common digest to bc15b04
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-05 08:15:08 +00:00
53220717eb fix: initContainer restart policy overridden by pod
Restart policy of initContainers should not be overriden by pod and
the restart policy should always be "no".

See #16343

Signed-off-by: Tony Duan <tony.duan@gapp.nthu.edu.tw>
2023-05-05 15:40:56 +08:00
f4d2d173f9 Merge pull request #18470 from containers/renovate/golang.org-x-sync-0.x
fix(deps): update module golang.org/x/sync to v0.2.0
2023-05-04 21:53:52 -04:00
c27cda7c99 fix(deps): update module golang.org/x/sync to v0.2.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-04 17:54:13 +00:00
d9164c95d7 Merge pull request #18467 from containers/renovate/requests-2.x
chore(deps): update dependency requests to ~=2.30.0
2023-05-04 13:52:19 -04:00
773b457048 chore(deps): update dependency requests to ~=2.30.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-04 16:51:16 +00:00
54952270ce Merge pull request #18453 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/common digest to ea87b34
2023-05-04 12:50:07 -04:00
071bc5c93e Merge pull request #18464 from edsantiago/ginkgo_logs_optional
ginkgo json output: only in CI, not on laptop runs
2023-05-04 12:44:56 -04:00
0c070ebfbd ginkgo json output: only in CI, not on laptop runs
Followup to #18422: disable --json-report except under CI, which
is where it's useful.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-04 08:18:30 -06:00
d1a696acb7 Merge pull request #18385 from dcermak/setup-env-in-init-containers
Run generate.CompleteSpec() for initContainers as well
2023-05-04 10:12:40 -04:00
73d3487cce Allow user quadlets to be stored under /etc
I would like to allow admin to control quadlet containers
in users homedirs.

If an admin sets a quadlet in
/etc/containers/systemd/users, then all users will run these
quadlet services when they login.

If an admin places a quadlet in /etc/containers/systemd/users/$(USERNAME)
then only the USERNAME will execute this quadlet service when
they login.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-04 10:06:41 -04:00
8bfb27a3ce Merge pull request #18462 from Luap99/no-cleanup-twice
libpod: do not Cleanup() more than once
2023-05-04 09:55:06 -04:00
4f8a84a310 Merge pull request #18219 from stellarpower/patch-1
[CI:DOCS] Add mention of redir to doc `rootless.md`
2023-05-04 09:36:35 -04:00
41f5fcfd29 Merge pull request #18458 from Luap99/docker-dup-volume
compat container create: match duplicate mounts correctly
2023-05-04 09:34:01 -04:00
334adac745 fix(deps): update github.com/containers/common digest to ea87b34
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-04 13:32:22 +00:00
377b834245 Merge pull request #18455 from containers/renovate/github.com-containers-buildah-digest
fix(deps): update github.com/containers/buildah digest to e925b58
2023-05-04 09:10:46 -04:00
95557a532e libpod: do not Cleanup() more than once
If the container was already cleaned up we should not try to do it
again. Podman stop will always try to call Cleanup() if you look at the
podman event log and just keep calling podman stop --all you see a
cleanup event every time. This is not wanted. Also in case of the host
pidns we report a error every single time, see the linked issue.

Fixes #18460

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-04 13:53:40 +02:00
b5387da839 Merge pull request #18456 from hussam-qasem/patch-1
[CI:DOCS] Update podman-completion.1.md
2023-05-04 06:10:47 -04:00
df9344ac4b compat container create: match duplicate mounts correctly
The logic which checks for duplicated volumes here did not work
correctly because it used filepath.Clean(). However the writes to the
volDestinations map did not thus the string no longer matched when you
included a final slash for example.

So we can either call Clean() on all or no paths. I decided to call it
on no path because this is what we do right now. Just the check did it.

Fixed #18454

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-04 11:57:02 +02:00