11131 Commits

Author SHA1 Message Date
7b0155cf78 Fix array instead of one elem network http api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-12 00:03:03 +01:00
e2d35e55d0 Merge pull request #9652 from alvistack/master-linux-amd64
Update nix pin with `make nixpkgs`
2021-03-10 19:39:50 +01:00
2343161593 Merge pull request #9668 from rhatdan/man
Document CONTAINERS_CONF/CONTAINERS_STORAGE_CONF Env variables
2021-03-10 19:38:49 +01:00
786757fb01 Merge pull request #9681 from rhatdan/rm
Removing a non existing container API should return 404
2021-03-10 14:04:51 +01:00
c9ef260710 Document CONTAINERS_CONF/CONTAINERS_STORAGE_CONF Env variables
Also Switch to using CONTAINERS_REGISTRIES_CONF for registries.conf
overrides.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-10 06:34:47 -05:00
5331096b38 Merge pull request #9612 from containers/dependabot/go_modules/github.com/coreos/go-systemd/v22-22.2.0
Bump github.com/coreos/go-systemd/v22 from 22.1.0 to 22.2.0
2021-03-10 10:31:48 +01:00
1ac2fb7817 Merge pull request #9676 from giuseppe/cli-overrides-conf
options: append CLI graph driver options
2021-03-10 10:30:49 +01:00
4d9227d22c Merge pull request #9678 from xcffl/doc-sock-in-container-privileged
[CI:DOCS] Add docs about how to access APIs inside containers
2021-03-10 10:11:48 +01:00
d98b55f03b Merge pull request #9669 from edsantiago/apiv2_registry
apiv2 tests: add helpers to start/stop a local registry
2021-03-10 10:10:48 +01:00
f1eb8e8162 Removing a non existing container API should return 404
Currently we were overwrapping error returned from removal
of a non existing container.

$ podman rm bogus -f
Error: failed to evict container: "": failed to find container "bogus" in state: no container with name or ID bogus found: no such container

Removal of wraps gets us to.

./bin/podman rm bogus -f
Error: no container with name or ID "bogus" found: no such container

Finally also added quotes around container name to help make it standout
when you get an error, currently it gets lost in the error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-10 04:08:29 -05:00
dc0c72a48b Docs: Add docs to access APIs inside container
Signed-off-by: xcffl <2216902+xcffl@users.noreply.github.com>
2021-03-10 07:47:52 +08:00
09473d4300 Merge pull request #9677 from vrothberg/fix-9672
podman load: fix error handling
2021-03-09 15:11:49 +01:00
66ac9426ec Merge pull request #9630 from vrothberg/cp-rootless-eperms
podman cp: ignore EPERMs in rootless mode
2021-03-09 14:33:48 +01:00
6d4899745c options: append CLI graph driver options
if --storage-opt are specified on the CLI append them after what is
specified in the configuration files instead of overriding it.

Closes: https://github.com/containers/podman/issues/9657

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-09 12:54:23 +01:00
930bec4d3a podman load: fix error handling
Make sure to properly return loading errors and to set the exit code
accordingly.

Fixes: #9672
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 11:53:50 +01:00
36ec835298 Merge pull request #9671 from vrothberg/fix-9670
rm pkg/api/handlers/libpod/copy.go
2021-03-09 11:33:26 +01:00
1f2f7e7459 podman cp: evaluate symlink correctly when copying from container
When copying from a container, make sure to evaluate the symlinks
correctly.  Add tests copying a symlinked directory from a running and
a non-running container to execute both path-resolution paths.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 10:45:15 +01:00
2033fa4c79 rm pkg/api/handlers/libpod/copy.go
Remove the file since it only contains dead code.  The archive endpoints
are shared between the libpod and the compat API and both use the compat
package.

[NO TESTS NEEDED] since we're removing dead code.

Fixes: #9670
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:27:03 +01:00
31b11b5cd6 podman cp: fix copying to a non-existent dir
Copy is full of perils.  Some of them are the nuances when copying
directories.  Who would have thought that
 * cp dir   foo
 * cp dir/  foo
 * cp dir/. foo
are all supposed to yield the same result when foo does not exist.

`podman cp` now supports all three notations, which required to massage
the front-end code in `cmd/podman` a bit.  The tests have been extended
and partially rewritten to test container->host and host->container
copy operations.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:02:14 +01:00
a61d70cf8e podman cp: fix ownership
Make sure the files are chowned to the host/container user, depending on
where things are being copied to.

Fixes: #9626
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:02:14 +01:00
2abfef3809 podman cp: ignore EPERMs in rootless mode
Ignore permission errors when copying from a rootless container.
TTY devices inside rootless containers are owned by the host's
root user which is "nobody" inside the container's user namespace
rendering us unable to even read them.

Enable the integration test which was temporarily disabled for rootless
users.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:02:14 +01:00
d175fbfdb4 vendor buildah@v1.19.8
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:02:14 +01:00
e33f523907 apiv2 tests: add helpers to start/stop a local registry
...and a rudimentary set of /auth tests for PR#9589 (disabled).

This simply adds a new start_registry() helper function that
allocates a random unused port, pulls a registry image, creates
a local certificate + random username + random password, and
fires everything up. Since none of this is (yet) used in CI,
this is very low risk.

The only infinitessimally-risky change is using a dedicated
subdirectory of $WORKDIR (instead of $WORKDIR itself) as
the podman root. This fixes a dumb oversight on my part:
the workdir has grown to be used for much more than just
podman root; this change removes clutter and makes it
easier for humans to debug in cases of problems.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-08 18:08:17 -07:00
789d579bc4 Merge pull request #9651 from rhatdan/volume
[NO TESTS NEEDED] podman-remote build does not support volumes
2021-03-08 23:35:47 +01:00
021ff992ff Merge pull request #8172 from rhatdan/storage
[NO TESTS NEEDED] allow the removal of storage images
2021-03-08 23:32:34 +01:00
ff46d13ea6 Merge pull request #9667 from mheon/bump-3.1.0-rc1
[CI:DOCS] Bump to v3.1.0-RC1
2021-03-08 22:33:36 +01:00
e926b5d73e Bump to v3.1.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-03-08 15:45:43 -05:00
aa9616cd4d Bump to v3.1.0-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
v3.1.0-rc1
2021-03-08 15:45:40 -05:00
ba36d790db Merge pull request #9665 from psgreco/master-checkexistentvolumes
[NO TESTS NEEDED] Compat API: Avoid trying to create volumes if they already exist
2021-03-08 21:35:52 +01:00
e9db604922 allow the removal of storage images
Sometimes if the system crashes while an image is being pulled
containers/storage can get into a bad state.  This PR allows the
user to call into container storage to remove the image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-08 13:55:45 -05:00
9eac4a7f7b podman-remote build does not support volumes
Remove --volume option from podman-remote since it is
not supported, also add information to podman-build man page
indicating options not supported over remote connections.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-08 13:46:42 -05:00
d1878cc675 Compat API: Avoid trying to create volumes if they already exist
Fixes commit: 53d22c779c5d2df5ccda5a8e23db0501a0dadf44

Signed-off-by: Pablo Greco <pgreco@centosproject.org>
2021-03-08 15:18:42 -03:00
b386d23bf0 Merge pull request #9627 from xatier/master
[NO TESTS NEEDED] Bump pre-commit-hooks version
2021-03-08 19:06:18 +01:00
1e1035cf74 Merge pull request #9659 from containers/dependabot/go_modules/github.com/onsi/gomega-1.11.0
Bump github.com/onsi/gomega from 1.10.5 to 1.11.0
2021-03-08 11:53:18 -05:00
b6079bcf4a Merge pull request #9592 from rhatdan/timestamp
Numerous buildah fixes found by Ed's testing of buildah tests against podman.
2021-03-08 10:07:54 -05:00
bbb9d9b078 Merge pull request #9649 from rhatdan/kube
Allow users to generate a kubernetes yaml off non running containers
2021-03-08 10:06:56 -05:00
7e289833ed Bump github.com/onsi/gomega from 1.10.5 to 1.11.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.5 to 1.11.0.
- [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.5...v1.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-08 08:54:47 -05:00
6fe634c916 Merge pull request #9658 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.15.1
Bump github.com/onsi/ginkgo from 1.15.0 to 1.15.1
2021-03-08 08:33:53 -05:00
7c09752fb8 Merge pull request #9525 from vrothberg/prune
[NO TESTS NEEDED] Prune and debloat
2021-03-08 06:21:54 -05:00
0e36e65eaa Allow users to generate a kubernetes yaml off non running containers
Currently if you attempt to create a kube.yaml file off of a non running
container where the container runs as a specific User, the creation
fails because the storage container is not mounted. Podman is supposed to
read the /etc/passwd entry inside of the container but since the
container is not mounted, the c.State.Mountpoint == "".  Podman
incorrectly attempts to read /etc/passwd on the host, and fails if the
specified user is not in the hosts /etc/passwd.

This PR mounts the storage container, if it was not mounted so the read
succeeds.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-08 06:14:08 -05:00
80390dd180 Bump github.com/onsi/ginkgo from 1.15.0 to 1.15.1
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.15.0 to 1.15.1.
- [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.15.0...v1.15.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-08 06:10:15 -05:00
d0d084dd8c turn hidden --trace into a NOP
The --trace has helped in early stages analyze Podman code.  However,
it's contributing to dependency and binary bloat.  The standard go
tooling can also help in profiling, so let's turn `--trace` into a NOP.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-08 09:22:42 +01:00
320df83881 pkg/terminal: use c/storage/pkg/homedir
This also prunes the dependency on `k8s.io/client-go`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-08 09:21:13 +01:00
b7c00f2cc0 Merge pull request #9647 from mlegenovic/master
Compat API: Fix the response of 'push image' endpoint
2021-03-07 14:25:52 -05:00
4174b06a4b Merge pull request #9648 from jmguzik/unify-mount-consts
[NO TESTS NEEDED] Cleanup/unify mount consts
2021-03-07 14:13:51 -05:00
cc7a7568aa Update nix pin with make nixpkgs
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2021-03-07 21:36:33 +08:00
9e75cafd5c build-arg
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-07 08:08:32 -05:00
326f3eda31 Handle podman build --dns-search
Fixes: https://github.com/containers/podman/issues/9574

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-07 08:08:32 -05:00
01ffe2c30a podman build --build-arg should fall back to environment
Fixes: https://github.com/containers/podman/issues/9571

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-07 06:42:02 -05:00
2c500a8145 Add support for podman build --ignorefile
Fixes: https://github.com/containers/podman/issues/9570

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-07 06:42:02 -05:00