11031 Commits

Author SHA1 Message Date
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
690c02f602 Add missing params for podman-remote build
Fixes: https://github.com/containers/podman/issues/9290

Currently we still have hard coded --isolation=chroot for podman-remote build.

Implement missing arguments for podman build

Implements
--jobs, --disable-compression, --excludes

Fixes:
MaxPullPushRetries
RetryDuration

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 06:48:35 -05: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
adfcb74602 make layer-tree lookup errors non-fatal
Internally, Podman constructs a tree of layers in containers/storage to
quickly compute relations among layers and hence images.  To compute the
tree, we intersect all local layers with all local images.  So far,
lookup errors have been fatal which has turned out to be a mistake since
it seems fairly easy to cause storage corruptions, for instance, when
killing builds.  In that case, a (partial) image may list a layer which
does not exist (anymore).  Since the errors were fatal, there was no
easy way to clean up and many commands were erroring out.

To improve usability, turn the fatal errors into warnings that guide the
user into resolving the issue.  In this case, a `podman system reset`
may be the approriate way for now.

[NO TESTS NEEDED] because I have no reliable way to force it.

[1] https://github.com/containers/podman/issues/8148#issuecomment-778253474

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-12 17:23:01 +01:00
1b284a298c Merge pull request #9302 from giuseppe/cgroup-split-v1
utils: takes the longest path on cgroup v1
2021-02-11 17:46:37 -05:00
78c8a87362 Enable whitespace linter
Use the whitespace linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:56 +01:00
69ab67bf90 Enable golint linter
Use the golint linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:49 +01:00
ef2fc90f2d Enable stylecheck linter
Use the stylecheck linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:29 +01:00
b38b1433b3 Merge pull request #9329 from mheon/update_master_300
[CI:DOCS] Update Master to reflect the 3.0 release
2021-02-11 16:11:36 -05:00
40c3c972d5 Update Master to reflect the 3.0 release
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-02-11 15:35:04 -05:00
a500d93975 Merge pull request #9320 from baude/issue9315
container ps json format miscue
2021-02-11 13:33:36 -05:00
660a06f2f7 utils: takes the longest path on cgroup v1
now getCgroupProcess takes the longest path on cgroup v1, instead of
complaining if the paths are different.

This should help when --cgroups=split is used on cgroup v1 and the
process cgroups look like:

$ cat /proc/self/cgroup
11:pids:/user.slice/user-0.slice/session-4.scope
10:blkio:/
9:cpuset:/
8:devices:/user.slice
7:freezer:/
6:memory:/user.slice/user-0.slice/session-4.scope
5:net_cls,net_prio:/
4:hugetlb:/
3:cpu,cpuacct:/
2:perf_event:/

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-11 16:46:42 +01:00
5f999b6bcd container ps json format miscue
when printing out json format, we mistakenly changed the Created field
output to be a time.time in a different commit.  This allows for
override of the Created field to be a unix ts as type int64.

Fixes: #9315

Signed-off-by: baude <bbaude@redhat.com>
2021-02-11 09:38:54 -06:00
afe4ce6b1c Merge pull request #9312 from baude/issue9310
Correct compat network prune response
2021-02-11 05:38:35 -05:00
8e2fae186d Bump github.com/spf13/cobra from 1.1.2 to 1.1.3
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-11 05:37:56 -05:00
ca354f13f2 Merge pull request #9308 from mheon/fix_6003
Rewrite copy-up to use buildah Copier
2021-02-11 05:23:34 -05:00
1b5f3ed24d utils: create parent cgroups
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-11 09:38:36 +01:00
9196a5ce36 utils: ignore unified on cgroupv1 if not present
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-11 09:38:35 +01:00
f4fd25a005 utils: skip empty lines
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-11 09:38:34 +01:00
db64865164 Merge pull request #9309 from baude/issue9303
Display correct value for unlimited ulimit
2021-02-10 18:36:38 -05:00