10760 Commits

Author SHA1 Message Date
821ef6486a fix logic when not creating a workdir
When resolving the workdir of a container, we may need to create unless
the user set it explicitly on the command line.  Otherwise, we just do a
presence check.  Unfortunately, there was a missing return that lead us
to fall through into attempting to create and chown the workdir.  That
caused a regression when running on a read-only root fs.

Fixes: #9230
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-05 09:50:07 +01:00
4e1bcf30f3 Merge pull request #9188 from jwhonce/issues/8865
Report StatusConflict on Pod opt partial failures
2021-02-03 15:30:39 -05:00
4a1614e73f Merge pull request #9217 from vrothberg/attach-warn
bindings: attach: warn correct error
2021-02-03 12:09:39 -05:00
1c0d249609 Merge pull request #9216 from containers/dependabot/go_modules/github.com/containers/storage-1.25.0
Bump github.com/containers/storage from 1.24.5 to 1.25.0
2021-02-03 12:08:40 -05:00
be568738b1 Merge pull request #9215 from containers/dependabot/go_modules/github.com/containernetworking/cni-0.8.1
Bump github.com/containernetworking/cni from 0.8.0 to 0.8.1
2021-02-03 12:07:40 -05:00
4945abb7d1 Merge pull request #9208 from edsantiago/bats
System test for #9096 (truncated stdout)
2021-02-03 12:06:40 -05:00
301e54deb3 Merge pull request #9214 from rhatdan/wait
Fix invalid wait condition on kill
2021-02-03 12:05:40 -05:00
e8db5bb6e3 Merge pull request #9210 from edsantiago/makefile_fixes
Makefile: make bin/* real targets!
2021-02-03 10:57:04 -05:00
ebc42f5086 Bump github.com/containers/storage from 1.24.5 to 1.25.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.24.5 to 1.25.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.24.5...v1.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-03 09:10:07 -05:00
9dc7951915 Bump github.com/containernetworking/cni from 0.8.0 to 0.8.1
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-03 09:08:19 -05:00
bc149a4dd2 bindings: attach: warn correct error
The resize warning logged the wrong error.  While this does not fix
 #9172, it may very well be helpful finding its root cause.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-03 14:35:42 +01:00
d87f54fbba Fix invalid wait condition on kill
When using the compatability tests on kill, the kill
function goes into an infinite wait loop taking all of the CPU.

This change will use the correct wait function and exit properly.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-03 07:56:13 -05:00
dfa9a340ad Makefile: make bin/* real targets!
Backstory: every time you run 'make podman' or even
just 'make', you get a full recompile. This is sub-ideal.

Cause: I don't really know. It looks complicated. #5017
introduced a .PHONY for bin/podman, for reasons not
explained in the PR. Then, much later, #5880 well-
intentionedly but improperly tweaked the 'find'
command used in defining SOURCES, adding a -prune
but without the corresponding and required -print.
Let's just say, it was an unfortunate cascade of events.

This PR fixes the SOURCES definition and removes the
highly-undesired .PHONY from podman & podman-remote,
making it so you can type 'make' and, oh joy, not
build anything if it's current. The way 'make' is
supposed to work.

Why fix this now? Because my PR (#9209) was failing in CI,
in the Validate step:

    Can't exec "./bin/podman": No such file or directory at hack/xref-helpmsgs-manpages line 223.

It failed even on Re-run, and only passed once I force-pushed
the PR (with no changes, just a new commit SHA). I have no idea
why bin/podman wasn't built, and I have zero interest in pursuing
that right now, but the proper solution is to add bin/podman as
a Makefile dependency for that particular test. So done.

While I'm at it, fix what is pretty clearly a typo in a .PHONY

And, finally, fix a go-md2man warning introduced in #9189

[NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-03 05:49:17 -07:00
4ce8b1281e Merge pull request #9197 from containers/dependabot/go_modules/github.com/onsi/gomega-1.10.5
Bump github.com/onsi/gomega from 1.10.4 to 1.10.5
2021-02-03 07:01:23 -05:00
a086f601e3 Merge pull request #9103 from mattcen/patch-1
[CI:DOCS] typo
2021-02-03 06:57:23 -05:00
8f51d325af Merge pull request #9174 from bitstrings/master
Make slirp MTU configurable (network_cmd_options)
2021-02-03 06:51:23 -05:00
ec0041ebff Merge pull request #9209 from edsantiago/bats_diff_workaround
Gating tests: diff test: workaround for RHEL8 failure
2021-02-03 06:41:24 -05:00
3d105015f6 typo
Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
2021-02-03 21:22:30 +11:00
c40cd1be98 Bump github.com/onsi/gomega from 1.10.4 to 1.10.5
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.4 to 1.10.5.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.10.4...v1.10.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-03 11:00:57 +01:00
97421651d3 Merge pull request #9204 from baude/macvlanextra
Honor network options for macvlan networks
2021-02-03 05:00:24 -05:00
881f3d788d Merge pull request #9203 from matejvasek/improve_param_serder_generator
[NO TESTS NEEDED] Improve binding generator
2021-02-03 04:59:23 -05:00
1c50e09b06 System test for #9096 (truncated stdout)
This actually tests conmon, not podman; but that's the whole
point of system tests in the first place: if a problem exists,
we want to fail loudly, no matter whose fault it is.

(I can't get this to fail on my f33 laptop; OP on #9096 claims
it only fails on Ubuntu. We'll see what happens in CI).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-02 17:48:00 -07:00
e0bc8ffb59 Gating tests: diff test: workaround for RHEL8 failure
RHEL8 rootless gating tests are inconsistently failing with:

   $ podman diff --format json -l
   #
   {"changed":["/etc"],"added":["/sys/fs","/sys/fs/cgroup","/pMOm1Q0fnN"],"deleted":["/etc/services"]}
   # #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
   # #|     FAIL: added
   # #| expected: '/pMOm1Q0fnN'
   # #|   actual: '/sys/fs'
   # #|         > '/sys/fs/cgroup'
   # #|         > '/pMOm1Q0fnN'
   # #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Reason: PR #8561, I think (something to do with /sys on RHEL).

Workaround: ignore '/sys/fs' in diffs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-02 15:23:48 -07:00
d1e0afdd47 Merge pull request #9200 from edsantiago/make_ginkgo_refactor
Makefile: refactor ginkgo * ginkgo-remote
2021-02-02 16:02:55 -05:00
bde23a0219 [NO TESTS NEEDED] style: indendation
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-02 21:15:29 +01:00
89df89b5fb [NO TESTS NEEDED] fixup: remove debug code
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-02 21:13:51 +01:00
aab8a934f5 Merge pull request #9185 from mheon/pod_no_network
Allow pods to use --net=none
2021-02-02 14:57:37 -05:00
7e4d696d94 Report StatusConflict on Pod opt partial failures
- When one or more containers in the Pod reports an error on an operation
report StatusConflict and report the error(s)

- jsoniter type encoding used to marshal error as string using error.Error()

- Update test framework to allow setting any flag when creating pods

- Fix test_resize() result check

Fixes #8865

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-02-02 12:44:08 -07:00
bd0e22ed14 Honor network options for macvlan networks
when creating a macvlan network, we should honor gateway, subnet, and
mtu as provided by the user.

Fixes: #9167

Signed-off-by: baude <bbaude@redhat.com>
2021-02-02 13:24:14 -06:00
628b0d79b5 Merge pull request #9116 from iwita/ls-volumes-before-pruning
List volumes before pruning
2021-02-02 14:02:58 -05:00
0959196807 Make slirp MTU configurable (network_cmd_options)
The mtu default value is currently forced to 65520.
This let the user control it using the config key network_cmd_options,
i.e.: network_cmd_options=["mtu=9000"]

Signed-off-by: bitstrings <pino.silvaggio@gmail.com>
2021-02-02 13:50:26 -05:00
ac3bd4c331 [NO TESTS NEEDED] Generated files
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-02 19:49:41 +01:00
5a746c08f7 [NO TESTS NEEDED] Improve generator
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-02 19:49:38 +01:00
e9f936a29d Makefile: refactor ginkgo * ginkgo-remote
Create a new common target, ginkgo-run, with the main ginkgo
test incantation; ginkgo and ginkgo-remote now invoke that,
with a clearer distinction between their arguments.

Reason for this: 'make remoteintegration' was not generating
ginkgo logs in CI. Reason: '-debug' option was missing from
the ginkgo incantation. Reason: impossibility of maintaining
duplicate long-complicated lines. This PR distills the common
aspects, making the differences clearer between local & remote.

IMPORTANT NOTE: '-nodes 3' was also missing from remote ginkgo.
This PR adds it. If this was intentionally omitted, please let
me know (with reasons) so I can refactor that too.

[NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-02 09:25:44 -07:00
931ea939ac Allow pods to use --net=none
We need an extra field in the pod infra container config. We may
want to reevaluate that struct at some point, as storing network
modes as bools will rapidly become unsustainable, but that's a
discussion for another time. Otherwise, straightforward plumbing.

Fixes #9165

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-02 10:35:23 -05:00
d66a18cb11 Merge pull request #9195 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.15.0
Bump github.com/onsi/ginkgo from 1.14.2 to 1.15.0
2021-02-02 08:48:52 -05:00
828279dac2 Merge pull request #9192 from mheon/release_notes_300
[CI:DOCS] Update release notes for v3.0.0
2021-02-02 07:02:52 -05:00
323ab314ef Bump github.com/onsi/ginkgo from 1.14.2 to 1.15.0
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.14.2 to 1.15.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.14.2...v1.15.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-02 06:28:26 -05:00
2314af70bd Merge pull request #9189 from baude/macvlandriver
add macvlan as a supported network driver
2021-02-02 05:53:15 -05:00
077fd670be Update release notes for v3.0.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-01 22:02:38 -05:00
52575db9b4 Merge pull request #9190 from edsantiago/make_completions
New 'make completions' target
2021-02-01 20:45:15 -05:00
ee8ee651d5 New 'make completions' target
Generate shell completion files for podman and podman-remote
and for all known shells (bash, fish, zsh). Fix Readme file
in completions dir: it suggested running 'make completion',
singular; no such target existed. Since the install target
is plural, I choose to make the new target plural also.

This is intended for use in CI some day, in a check such as:

  (in contrib/cirrus/runner.sh):

    make completions
    SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh

The goal would be to make sure that any new podman subcommands
or flags are accompanied by their corresponding shell helpers
on all commits.

IT IS NOT POSSIBLE TO ENFORCE THIS NOW. As I understand it,
Cobra is slow to incorporate community PRs, so the podman team
has chosen to sneak in completion files generated by an
unreleased and un-vendored version of Cobra. Running 'make
completions' right now would clobber those and result in
a diminished user experience.

I'm submitting this anyway as a stepping-stone toward that
future day when we can create such a CI hook.

[NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-01 13:47:54 -07:00
e11d8f15e8 add macvlan as a supported network driver
instead of using the --macvlan to indicate that you want to make a
macvlan network, podman network create now honors the driver name of
*macvlan*.  Any options to macvlan, like the parent device, should be
specified as a -o option.  For example, -o parent=eth0.

the --macvlan option was marked as deprecated in the man page but is
still supported for the duration of 3.0.

Signed-off-by: baude <bbaude@redhat.com>
2021-02-01 14:42:38 -06:00
48a0e002d5 Merge pull request #9177 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.13.0
Bump github.com/rootless-containers/rootlesskit from 0.12.0 to 0.13.0
2021-02-01 15:42:32 -05:00
182e8414d4 Merge pull request #9178 from Luap99/fix-9176
Fix podman generate systemd --new special char handling
2021-02-01 12:45:11 -05:00
20183349fd Merge pull request #9168 from Luap99/fix-pod-create-network-parsing
Fix --network parsing for podman pod create
2021-02-01 08:48:54 -05:00
81a3ba36ae Merge pull request #9051 from rhatdan/rm
Switch podman stop/kill/wait handlers to use abi
2021-02-01 08:47:54 -05:00
5352df226b Fix podman generate systemd --new special char handling
In a systemd unit dollar and percent signs are used for variables. A backslash
is used for escape sequences. If any of these characters are used in the create
command we have to properly escape them so systemd does not try to interpret them.

Fixes #9176

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-01 14:40:12 +01:00
eaafd975a9 Bump github.com/rootless-containers/rootlesskit from 0.12.0 to 0.13.0
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](https://github.com/rootless-containers/rootlesskit/compare/v0.12.0...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-01 06:59:04 -05:00
b045c17375 Merge pull request #9173 from mlegenovic/api_fixes
Endpoint that lists containers does not return correct Status value
2021-02-01 05:41:53 -05:00