10897 Commits

Author SHA1 Message Date
2e522ff29c Merge pull request #9404 from rhatdan/entrypoint
Ignore entrypoint=[""]
2021-02-17 09:55:32 -05:00
aa7c7bde79 Merge pull request #9407 from giuseppe/downgrade-warning-to-debug
[NO TEST NEEDED] infra: downgrade warning to debug
2021-02-17 09:40:31 -05:00
d55d80a041 Merge pull request #9360 from riyad/add-missing-early-returns
Add missing early returns in compat API
2021-02-17 07:34:32 -05:00
12b6342c3d infra: downgrade warning to debug
if the current process could not be moved to a different systemd
cgroup do not raise a warning but debug message.

[NO TESTS NEEDED]
Closes: https://github.com/containers/podman/issues/9353

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-17 13:18:27 +01:00
12a577aea5 Ignore entrypoint=[\"\"]
We recieved an issue with an image that was built with
entrypoint=[""]
This blows up on Podman, but works on Docker.

When we setup the OCI Runtime, we should drop
entrypoint if it is == [""]

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-17 07:00:53 -05:00
68a8d397ce Add missing early returns in compat API
[NO TESTS NEEDED]

Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2021-02-16 23:40:09 +01:00
50042120e9 Merge pull request #9240 from rhatdan/reset
Do not reset storage when running inside of a container
2021-02-16 17:11:26 -05:00
7bd1c1a297 Merge pull request #9367 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.13.1
Bump github.com/rootless-containers/rootlesskit from 0.13.0 to 0.13.1
2021-02-16 17:09:27 -05:00
fb6f143946 Merge pull request #9401 from rhatdan/stop
podman kill should report rawInput not container id
2021-02-16 16:08:26 -05:00
5d1ec2960d Do not reset storage when running inside of a container
Currently if the host shares container storage with a container
running podman, the podman inside of the container resets the
storage on the host. This can cause issues on the host, as
well as causes the podman command running the container, to
fail to unmount /dev/shm.

podman run -ti --rm --privileged -v /var/lib/containers:/var/lib/containers quay.io/podman/stable podman run alpine echo hello
	* unlinkat /var/lib/containers/storage/overlay-containers/a7f3c9deb0656f8de1d107e7ddff2d3c3c279c11c1635f233a0bffb16051fb2c/userdata/shm: device or resource busy
	* unlinkat /var/lib/containers/storage/overlay-containers/a7f3c9deb0656f8de1d107e7ddff2d3c3c279c11c1635f233a0bffb16051fb2c/userdata/shm: device or resource busy

Since podman is volume mounting in the graphroot, it will add a flag to
/run/.containerenv to tell podman inside of container whether to reset storage or not.

Since the inner podman is running inside of the container, no reason to assume this is a fresh reboot, so if "container" environment variable is set then skip
reset of storage.

Also added tests to make sure /run/.containerenv is runnig correctly.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 14:18:53 -05:00
7fb347a3d4 Merge pull request #9399 from vrothberg/home-sweet-home
do not set empty $HOME
2021-02-16 11:39:27 -05:00
958f901431 podman kill should report rawInput not container id
Docker always reports back the users input, not the full
id, we should do the same.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 09:47:38 -05:00
58a4793bec Merge pull request #9396 from rhatdan/stop
When stopping a container, print rawInput
2021-02-16 09:46:28 -05:00
aadb16da38 Merge pull request #9380 from baude/podinfra
Fix panic in pod creation
2021-02-16 09:25:28 -05:00
3eb2ce34dc Merge pull request #9397 from vrothberg/fix-9232
images/create: always pull image
2021-02-16 09:22:27 -05:00
6639b218a2 Merge pull request #9368 from vrothberg/fix-9365
podman build: pass runtime to buildah
2021-02-16 08:53:27 -05:00
0a6b76eba1 Merge pull request #9372 from matejvasek/fix_host_port
Docker [APIv2] create container: handle empty host port
2021-02-16 08:44:27 -05:00
271c5612e8 Merge pull request #9369 from vrothberg/startup-errors
correct startup error message
2021-02-16 08:41:26 -05:00
7b17c77adc Merge pull request #9391 from rhatdan/workdir
Don't chown workdir if it already exists
2021-02-16 08:27:28 -05:00
2ec0e3b650 do not set empty $HOME
Make sure to not set an empty $HOME for containers and let it default to
"/".

https://github.com/containers/crun/pull/599 is required to fully
address #9378.

Partially-Fixes: #9378
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-16 14:21:45 +01:00
2a21ecafa7 images/create: always pull image
The `images/create` endpoint should always attempt to pull a newer
image.  Previously, the local images was used which is not compatible
with Docker and caused issues in the Gitlab CI.

Fixes: #9232
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-16 13:32:31 +01:00
f2f18768a8 Fix panic in pod creation
when creating a pod with --infra-image and using a untagged image for
the infra-image (none/none), the lookup for the image's name was
creating a panic.

Fixes: #9374

Signed-off-by: baude <bbaude@redhat.com>
2021-02-16 06:29:49 -06:00
8c444e6f0b Merge pull request #9394 from paranlee/patch-1
[CI:DOCS] Fix typo podman run doc in flag -pid=mode "efault"
2021-02-16 07:08:26 -05:00
0fd4807080 Bump github.com/rootless-containers/rootlesskit from 0.13.0 to 0.13.1
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](https://github.com/rootless-containers/rootlesskit/compare/v0.13.0...v0.13.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 07:05:03 -05:00
2845f7b832 podman build: pass runtime to buildah
Make sure that Podman's default OCI runtime is passed to Buildah in
`podman build`.  In theory, Podman and Buildah should use the same
defaults but the projects move at different speeds and it turns out
we caused a regression in v3.0.

Fixes: #9365
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-16 13:01:56 +01:00
39c1fdb155 correct startup error message
The error message when failing to create an image engine unconditionally
pointed to the Podman socket which is quite confusing when running
locally.

Move the error message to the point where the first ping to the service
fails.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-16 12:49:02 +01:00
a532994f8b Fix typo podman run doc in flag -pid=mode "efault"
Signed-off-by: paranlee <paran.lee@mail.uk>
2021-02-16 20:46:21 +09:00
4a9bd7a18f When stopping a container, print rawInput
When we stop a container we are printing the full id,
this does not match Docker behaviour or the start behavior.
We should be printing the users rawInput when we successfully
stop the container.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 06:26:51 -05:00
714acf3267 fix create container: handle empty host port
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-16 12:24:44 +01:00
ac9a048b59 Merge pull request #9375 from Luap99/fix-9373
Fix broken podman generate systemd --new with pods
2021-02-16 05:56:26 -05:00
3d50393f09 Don't chown workdir if it already exists
Currently podman is always chowning the WORKDIR to root:root
This PR will return if the WORKDIR already exists.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 04:52:02 -05:00
bf083c185d Fix broken podman generate systemd --new with pods
The unit generation accidentally escaped the %t in the pod id file path.
This is a regression caused by #9178. This was not caught by the tests
because the test itself was wrong. It used a full path instead of the
systemd variable %t like the actual code does.

Fixes #9373

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-16 09:51:09 +01:00
df8ba7f4a9 Merge pull request #9385 from baude/fixci
Fixci
2021-02-16 03:44:25 -05:00
227c548130 fix dns resolution on ubuntu
ubuntu's dns seems a little odd and requires a fq name in its tests.

Signed-off-by: baude <bbaude@redhat.com>
2021-02-15 16:12:11 -06:00
0ab5bfd313 e2e: fix network alias test
The logic in the e2e test for multiple network aliases is indicating the
test should wait for the containerized nginx to be ready.  As this may
take some time, the test does an exponential backoff starting at 2050ms.

Fix the logic by removing the `Expect(...)` call during the exponential
backoff.  Otherwise, the test errors immediately.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-15 15:07:25 +01:00
704fa8b55e fix failing image e2e test
The timestamps of some images must have changed changing the number of
expected filtered images.  The test conditions seem fragile but for now
it's more important to get CI back.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-15 13:02:14 +01:00
30607d7278 Merge pull request #9348 from matejvasek/refactor_gen_code
Refactor generated code
2021-02-15 06:35:58 -05:00
db56e19f6a Merge pull request #9366 from xatier/patch-1
[CI:DOCS] Update troubleshooting.md for registries.conf v2
2021-02-15 06:23:00 -05:00
9a24d50989 Update troubleshooting.md
Note that `[registries.search]` (the v1 format) is still supported, but
`registries.conf` can not mix v1 with v2 syntax.

[1] c04fa24575 (diff-968a44bf11ad55a626a0d13a78ade8944ade3a36f53c7a3f985a9036cd64f5a5)

Signed-off-by: xatier <xatierlike@gmail.com>
2021-02-15 02:49:16 -08:00
6ffd05d0bd [NO TESTS NEEDED] Refactor generated code
Extracted common functionality to util function.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-14 15:44:22 +01:00
3ba0afdd0f Merge pull request #9342 from Luap99/lint
Enable more golangci-lint linters
2021-02-13 06:42:56 -05:00
9d57aa75a5 Merge pull request #9347 from edigaryev/fix-superfluous-writeheader
Fix superfluous response.WriteHeader call in WaitContainerLibpod()
2021-02-12 19:24:57 -05:00
2c31f38399 Fix superfluous response.WriteHeader call in WaitContainerLibpod()
When the query decoding fails at the beginning of WaitContainerLibpod(),
the Error() sets the header but doesn't returns after that.

This causes the execution flow to reach the WriteResponse() at the end
of WaitContainerLibpod(), which attempts to set another header, thus
causing the following error:

http: superfluous response.WriteHeader call from github.com/containers/podman/pkg/api/handlers/utils.WriteResponse (handler.go:124)

[NO TESTS NEEDED]

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-12 23:55:12 +03:00
87b2722c45 Merge pull request #9343 from baude/pstonano
change ps Created to unix
2021-02-12 15:54:46 -05:00
1d15ed708f Merge pull request #9341 from vrothberg/layer-tree-errors
make layer-tree lookup errors non-fatal
2021-02-12 13:32:00 -05:00
4067f3a4d6 change ps Created to unix
change from unixnano to unix for ps created --format json

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-02-12 12:08:59 -06:00
73cf06a453 Merge pull request #9319 from containers/dependabot/go_modules/github.com/spf13/cobra-1.1.3
Bump github.com/spf13/cobra from 1.1.2 to 1.1.3
2021-02-12 12:54:00 -05:00
64255f5fb8 Merge pull request #9311 from deadNightTiger/fix-pull-dockerjava
apiv2: handle docker-java clients pulling
2021-02-12 12:52:58 -05:00
78b419909b Enable more golangci-lint linters
Cleanup the golangci.yml file and enable more linters.

`pkg/spec` and `iopodman.io` is history. The vendor directory
is excluded by default. The dependencies dir was listed twice.

Fix the reported problems in `pkg/specgen` because that was also
excluded by `pkg/spec`.

Enable the structcheck, typecheck, varcheck, deadcode and depguard
linters.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-12 18:20:28 +01:00
291f59600b Merge pull request #9331 from Luap99/lint
Enable more golangci-lint linters
2021-02-12 11:30:00 -05:00