Commit graph

10709 commits

Author SHA1 Message Date
Paul Holzinger 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
OpenShift Merge Robot 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
OpenShift Merge Robot 15e5a5c32b
Merge pull request #9151 from rhatdan/mount
Docker ignores mount flags that begin with constency
2021-02-01 05:10:55 -05:00
OpenShift Merge Robot 4ead8067cd
Merge pull request #9138 from mlegenovic/master
podman generate kube ignores --network=host
2021-02-01 04:16:53 -05:00
Milivoje Legenovic 51c11fea8b Endpoint that lists containers does not return correct Status value
Eclipse and Intellij Docker plugin determines the state of the
container via the Status field, returned from /containers/json call.
Podman always returns empty string, and because of that, both IDEs
show the wrong state of the container.

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-01-31 21:06:39 +01:00
Daniel J Walsh 4a6d042c28
Docker ignores mount flags that begin with constency
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1915332

```
According to the Docker docs, the consistency option should be ignored on Linux.

the possible values are 'cached', 'delegated', and 'consistent', but they should be ignored equally.

This is a widely used option in scripts run by developer machines, as this makes file I/O less horribly slow on MacOS.
```

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-30 06:50:18 -05:00
OpenShift Merge Robot 735b16e347
Merge pull request #9063 from cevich/master_fix_validate
Cirrus: Fix running Validate task on branches
2021-01-30 06:26:58 -05:00
Milivoje Legenovic cdbbc6120b podman generate kube ignores --network=host
Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-01-30 09:08:36 +01:00
OpenShift Merge Robot 2686e406a6
Merge pull request #9161 from baude/macosbuild
[CI:DOCS]build instructions for macOS
2021-01-29 15:10:40 -05:00
OpenShift Merge Robot f7573efa04
Merge pull request #9160 from rhatdan/VENDOR
Vendor in containers/buildah v1.19.3
2021-01-29 15:09:40 -05:00
OpenShift Merge Robot f3a7bc1a7b
Merge pull request #9150 from baude/playkubedns
Honor custom DNS in play|generate kube
2021-01-29 14:15:21 -05:00
OpenShift Merge Robot 8f3bcf6247
Merge pull request #9144 from vrothberg/fix-9134
Revert "podman build --pull: use correct policy"
2021-01-29 13:27:19 -05:00
baude b842d97f5b [CI:DOCS]build instructions for macOS
add instructions on how to build podman on macOS.

big thanks to acui for help in getting this written down.

Fixes: #9032

Signed-off-by: baude <bbaude@redhat.com>
2021-01-29 12:13:53 -06:00
OpenShift Merge Robot 4ee66c2c2e
Merge pull request #9149 from rhatdan/docs
Podman-remote push can support --format
2021-01-29 12:05:20 -05:00
Daniel J Walsh 280f332bd9
Vendor in containers/buildah v1.19.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-29 11:57:20 -05:00
OpenShift Merge Robot b59848a2b9
Merge pull request #9143 from cevich/static_remote
Cirrus: Build static podman-remote
2021-01-29 11:51:19 -05:00
OpenShift Merge Robot 755d9b33ec
Merge pull request #9156 from containers/dependabot/go_modules/github.com/containers/image/v5-5.10.1
Bump github.com/containers/image/v5 from 5.10.0 to 5.10.1
2021-01-29 11:48:22 -05:00
OpenShift Merge Robot 0fe3d43ef1
Merge pull request #9133 from rhatdan/pull1
Cleanup bindings for image pull
2021-01-29 11:47:20 -05:00
baude ca0dd76bf3 Honor custom DNS in play|generate kube
when creating kubernetes yaml from containers and pods, we should honor
any custom dns settings the user provided. in the case of generate kube,
these would be provided by --dns, --dns-search, and --dns-opt. if
multiple containers are involved in the generate, the options will be
cumulative and unique with the exception of dns-opt.

when replaying a kube file that has kubernetes dns information, we now
also add that information to the pod creation.

the options for dnspolicy is not enabled as there seemed to be no direct
correlation between kubernetes and podman.

Fixes: #9132

Signed-off-by: baude <bbaude@redhat.com>
2021-01-29 08:49:45 -06:00
Daniel J Walsh d7c356552e
Podman-remote push can support --format
Fix man page to document podman push --format fully.

Also found that push was not handling the tlsverify so fixed this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-29 08:48:35 -05:00
dependabot-preview[bot] b74f939fb5 Bump github.com/containers/image/v5 from 5.10.0 to 5.10.1
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.10.0...v5.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-29 10:27:35 +01:00
OpenShift Merge Robot 0c6a889a7e
Merge pull request #9110 from rhatdan/cgroups
Don't fail if one of the cgroups is not setup
2021-01-28 16:37:19 -05:00
OpenShift Merge Robot 2ee034c1e6
Merge pull request #9140 from containers/dependabot/go_modules/github.com/containers/image/v5-5.10.0
Bump github.com/containers/image/v5 from 5.9.0 to 5.10.0
2021-01-28 14:39:31 -05:00
OpenShift Merge Robot a4c255a939
Merge pull request #9115 from rhatdan/pull
Switch podman image push handlers to use abi
2021-01-28 14:37:30 -05:00
Chris Evich 8d979e093e
Cirrus: Build static podman-remote
Prior to this commit, the "Static Build" task only produced a
`bin/podman`.  Update this to also include a `bin/podman-remote`
binary.

Update the pr-should-include-tests checker to ignore the `nix`
directory, which isn't applicable.

Lastly, restore the static build task to 'required' for CI success.
Leaving the comment inplace in case it needs to be bypassed in the
future on short notice.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-28 13:58:11 -05:00
Valentin Rothberg c0bf0ba9e5 podman build --pull: refine help message and docs
Refine and correct the wording of the `--pull` flag in the help message
and the docs.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-28 18:00:22 +01:00
Valentin Rothberg c450092fde Revert "podman build --pull: use correct policy"
This reverts commit 15caebfe56.

The previous behaviour of `--pull` to *always* attempt to pull the image
and error out if the pull failed aligns with Docker.  Since Podman aims
at feature parity with Docker, the `--pull` behaviour must match.

Fixes: #9134
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-28 17:53:12 +01:00
OpenShift Merge Robot fb653c43ed
Merge pull request #8585 from Luap99/rootless-net-alias
Add support for rootless network-aliases and static ip/mac
2021-01-28 04:58:28 -05:00
dependabot-preview[bot] 75c3b33899
Bump github.com/containers/image/v5 from 5.9.0 to 5.10.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.9.0...v5.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-28 04:51:57 -05:00
Daniel J Walsh 59076888d9
Cleanup bindings for image pull
Remove bindings that are not handled over the API.

Leaving this one to not use image pull, since this would
break progress handling.  We should revisit this in the
future.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 16:11:35 -05:00
OpenShift Merge Robot 9d59daa7cc
Merge pull request #9082 from saschagrunert/static-build
Fix static build cache by using cachix
2021-01-27 15:18:22 -05:00
Daniel J Walsh 89bb8a9b36
Don't fail if one of the cgroups is not setup
It is fairly common for certain cgroups controllers to
not be enabled on a system.  We should Warn when this happens
versus failing, when doing podman stats command.  This way users
can get information from the other controllers.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 15:16:24 -05:00
Paul Holzinger 1fac43654c Add support for rootless network-aliases
Make sure we pass the network aliases as capability args to the
cnitool in the rootless-cni-infra container. Also update the
dnsname plugin in the cni-infra container.

Fixes #8567

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 20:58:03 +01:00
OpenShift Merge Robot 14cc4aaf0a
Merge pull request #9127 from vrothberg/fix-9111
podman build --pull: use correct policy
2021-01-27 14:56:07 -05:00
OpenShift Merge Robot 1814fa2d21
Merge pull request #9105 from vrothberg/fix-8281
remote exec: write conmon error on hijacked connection
2021-01-27 14:25:06 -05:00
Paul Holzinger c717b3caca Allow static ip and mac with rootless cni network
Make sure we pass the ip and mac address as CNI_ARGS to
the cnitool which is executed in the rootless-cni-infra
container.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 17:35:54 +01:00
Valentin Rothberg 15caebfe56 podman build --pull: use correct policy
The `--pull` flag should be using the "pull if newer" pull policy rather
than "pull always".  This aligns with what the help message states, what
Buildah does and, according to #9111, what was done before,

Also add a test to prevent future regressions.

Fixes: #9111
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-27 16:49:47 +01:00
OpenShift Merge Robot 2ff4da9b59
Merge pull request #9124 from vrothberg/fix-8358
e2e tests: synchronize test results
2021-01-27 10:39:30 -05:00
Chris Evich bfc1b66be1
Cirrus: Fix running Validate task on branches
Followup to dbb9943

Despite skipping the `Smoke` check, it was observed on a *new* branch,
the `validate` task (specifically `git-validation`) will fail.  This
is because:

* `$CIRRUS_LAST_GREEN_CHANGE` will be empty on a new branch.
* `$CIRRUS_BASE_SHA` is always empty for runs triggered by branch-push
* `$EPOCH_TEST_COMMIT` will be set to `YOU_FOUND_A_BUG`.

Fix this by eliminating the `Smoke` task entirely, simplifying all
the `make validate` operations into the `validate` cirrus task.  Ensure
this task does not run when a new branch or tag is pushed.

Also, eliminate the `$CIRRUS_BUILD_ID` value as it's confusing and not
actually used anywhere.  It was formerly used for building VM images,
but this has moved to another repo entirely.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-27 10:35:27 -05:00
OpenShift Merge Robot d8f3450008
Merge pull request #9095 from rhatdan/ps
podman-remote ps --external --pod --sort do not work.
2021-01-27 10:33:30 -05:00
Sascha Grunert f8bf509d16
Fix static build cache by using cachix
It looks like we always hit the caching issue in Cirrus CI described
within #8313. A solution around that is to use cachix, which has been
pre-populated from my local machine.

To push all (runtime and build) dependencies, we can leverage a
pre-populated store by:

```
> nix-store -qR --include-outputs $(nix-instantiate nix/default.nix) | cachix push podman
```

The cache can be re-used by everybody to rapidly build static Podman
binaries: https://app.cachix.org/cache/podman

[NO TESTS NEEDED]

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-01-27 16:15:23 +01:00
Daniel J Walsh 84f7bdc4db
Switch podman image push handlers to use abi
Change API Handlers to use the same functions that the
local podman uses.

At the same time:

Cleanup and pass proper bindings.  Remove cli options from
podman-remote push.  Cleanup manifest push.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 09:27:25 -05:00
Valentin Rothberg fee2fadc3c e2e tests: synchronize test results
Use a mutex to synchronize the slice for storing tests results.
Running the e2e tests in parallel is otherwise subject to race
conditions surfacing in lost entries.

Fixes: #8358
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-27 14:18:12 +01:00
OpenShift Merge Robot 179b9d1745
Merge pull request #9025 from mheon/add_support_volumes_field
Ensure the Volumes field in Compat Create is honored
2021-01-27 12:50:11 +01:00
OpenShift Merge Robot 5c6175df39
Merge pull request #9122 from Luap99/fix-9120
Fix podman history --no-trunc for the CREATED BY field
2021-01-27 12:48:10 +01:00
Daniel J Walsh 21cb3043fc
podman-remote ps --external --pod --sort do not work.
Fixup the bindings and the handling of the --external --por and --sort
flags.

The --storage option was renamed --external, make sure we use
external up and down the stack.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 06:44:43 -05:00
Paul Holzinger f79d68eeae Fix podman history --no-trunc for the CREATED BY field
Fixes #9120

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 10:44:54 +01:00
Valentin Rothberg c63599d361 remote exec: write conmon error on hijacked connection
Make sure to write error from conmon on the hijacked http connection.
This fixes issues where errors were not reported on the client side,
for instance, when specified command was not found on the container.

To future generations: I am sorry.  The code is complex, and there are
many interdependencies among the concurrent goroutines.  I added more
complexity on top but I don't have a good idea of how to reduce
complexity in the available time.

Fixes: #8281
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-27 09:58:27 +01:00
OpenShift Merge Robot 2102e26506
Merge pull request #9109 from mheon/issue6618
Fix #6618
2021-01-27 09:31:15 +01:00
OpenShift Merge Robot c3b39842ce
Merge pull request #9101 from gbraad/console-mode-message
Fix #9100 Change console mode message to debug
2021-01-27 07:15:12 +01:00