Commit Graph

14407 Commits

Author SHA1 Message Date
Brent Baude 5b51b42cc8 machine rm -f stops and removes machine
If you want to remove a running machine, you can now pass the --force/-f
to podman machine rm and the machine will be stopped and removed without
confirmations.

Fixes: #13448

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-03-08 15:47:32 -06:00
OpenShift Merge Robot f33b64d8b7
Merge pull request #13366 from idleroamer/inspect-joined-network-ns-main
Inspect network info of a joined network namespace
2022-03-08 08:30:03 -05:00
😎 Mostafa Emami 611b45c517 Inspect network info of a joined network namespace
Closes: https://github.com/containers/podman/issues/13150
Signed-off-by: 😎 Mostafa Emami <mustafaemami@gmail.com>
2022-03-08 11:00:36 +01:00
OpenShift Merge Robot 4a242b1327
Merge pull request #13409 from baude/virtfsdarwin
MacOS improvements
2022-03-07 17:28:01 -05:00
Brent Baude cdb6deb148 MacOS improvements
* Enable support of virtfs in Podman and darwin.  At the time of this writing, it requires a special patch not yet included in upstream qemu.
* Prefer to use a specially built qemu to support virtfs.  The qemu is installed under libexec/podman.

[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-03-07 14:05:06 -06:00
OpenShift Merge Robot 2873f089f7
Merge pull request #13414 from rvandernoort/exec_delay
Add ExitCommandDelay configuration use in API exec handler
2022-03-07 13:32:52 -05:00
OpenShift Merge Robot 861d16921b
Merge pull request #13431 from eriksjolund/fix_some_typos
[CI:DOCS] troubleshooting.md: Improve language and fix typos
2022-03-07 11:55:02 -05:00
OpenShift Merge Robot 5bba71c112
Merge pull request #13310 from lsm5/packaging
[CI:DOCS] DISTRO_PACKAGE.md: List the packaging changes for v4
2022-03-07 11:50:52 -05:00
Lokesh Mandvekar 6dfe63463b
[CI:DOCS] DISTRO_PACKAGE.md: List the packaging changes for v4
[NO NEW TESTS NEEDED]

Co-authored-by: Ashley Cui <ashleycui16@gmail.com>
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-07 11:34:05 -05:00
OpenShift Merge Robot 118b8fe986
Merge pull request #13418 from lsm5/release-artifacts-process-2
[CI:DOCS] RELEASE_PROCESS.md: cosmetic fix
2022-03-07 10:49:06 -05:00
Lokesh Mandvekar 639e6899b0
[CI:DOCS] RELEASE_PROCESS.md: cosmetic fix
Follow up to pr#13416

Insert line breaks to get rid of the horizontal scroll bar.

Resolves: https://github.com/containers/podman/pull/13416#discussion_r818991807

Co-authored-by: Ashley Cui <acui@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-07 10:25:21 -05:00
OpenShift Merge Robot e1f00b4512
Merge pull request #13442 from tricktron/rm-mounted-host-socket-on-macos
`podman machine rm` removes the mounted socket file on macOS
2022-03-07 08:36:52 -05:00
OpenShift Merge Robot be3858bcf1
Merge pull request #13406 from jwhonce/wip/docker-py
Move all python tests to pytest
2022-03-07 06:30:57 -05:00
OpenShift Merge Robot 87d911aca9
Merge pull request #13423 from umohnani8/kube
Throw an error if kube yaml has duplicate ctr names
2022-03-07 06:29:00 -05:00
Thibault Gagnaux 01514f33ba
Fixes: #13301 ("machine rm removes the mounted socket file on macos")
[NO NEW TESTS NEEDED]
Signed-off-by: Thibault Gagnaux <tgagnaux@gmail.com>
2022-03-06 16:24:56 +01:00
Erik Sjölund b209933930 [CI:DOCS] troubleshooting.md: Improve language and fix typos
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-03-05 18:06:36 +01:00
Urvashi Mohnani d302c08cff Throw an error if kube yaml has duplicate ctr names
Error out if the kube yaml passed to play kube has more
than one container or init container with the same name.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-03-04 15:08:52 -05:00
Jhon Honce dca2e7924b Move all python tests to pytest
* Add configuration to add report header for python client used in tests
* Move report headers into the individual test runners vs runner.sh

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-03-04 10:35:29 -07:00
OpenShift Merge Robot f4d6e87772
Merge pull request #13413 from giuseppe/pod-no-use-cgroups-if-disabled
libpod: pods do not use cgroups if --cgroups=disabled
2022-03-04 04:26:22 -05:00
Rover van der Noort 2fb6a8daf6 Add ExitCommandDelay configuration use in API exec handler
[NO NEW TESTS NEEDED]

Signed-off-by: Rover van der Noort <s.r.vandernoort@student.tudelft.nl>
2022-03-04 00:57:35 +01:00
OpenShift Merge Robot 5fc8c9b24a
Merge pull request #13416 from lsm5/release-artifacts-process
RELEASE_PROCESS.md: build artifacts locally
2022-03-03 14:24:51 -05:00
OpenShift Merge Robot 3cfb70f953
Merge pull request #13404 from flouthoc/bump-to-race-free-deps
deps: bump to race-free `c/image` and `c/storage` along with test to verify `concurrent/parallel` builds
2022-03-03 12:15:19 -05:00
Aditya R 63f92d0a66
test: add a test to verify race free concurrent/parallel builds
Invoking parallel/concurrent builds from podman race against each other
following behviour was fixed in
https://github.com/containers/storage/pull/1153 and https://github.com/containers/image/pull/1480

Test verifies if following bug is fixed in new race-free API or not.
Read more about this issue, see bz 2055487 for more details.

More details here: https://github.com/containers/buildah/pull/3794 and https://github.com/containers/podman/pull/13339

Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-03 21:03:35 +05:30
Lokesh Mandvekar a3497cee99
RELEASE_PROCESS.md: build artifacts locally
The current PR process for release bump has the HEAD commit which bumps
version/version.go to the form `release+1-dev`. This makes Cirrus
publish release artifacts with `release+1-dev` and not `release`.

For example, the msi generated at https://cirrus-ci.com/task/5403901196238848
says podman-v4.0.3-dev.msi .

Building locally by checking out the released tag would generate the
correct artifacts and would also be faster and more convenient.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-03 10:08:05 -05:00
Giuseppe Scrivano a901c919ab
libpod: pods do not use cgroups if --cgroups=disabled
do not attempt to use cgroups with pods if the cgroups are disabled.
A similar check is already in place for containers.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-03 13:23:07 +01:00
OpenShift Merge Robot ed59b89a43
Merge pull request #13399 from flouthoc/resolve-workdir-symlink
container: workdir resolution must consider `symlink` if explicitly configured
2022-03-02 10:56:26 -05:00
Aditya R 0bd0ad5943
container: workdir resolution must consider symlink if explicitly configured
While resolving `workdir` we mostly create a `workdir` when `stat`
fails with `ENOENT` or `ErrNotExist` however following cases are not
true when user explicitly specifies a `workdir` while `running` using
`--workdir` which tells `podman` to only use workdir if its exists on
the container. Following configuration is implicity set with other
`run` mechanism like `podman play kube`

Problem with explicit `--workdir` or similar implicit config in `podman play
kube` is that currently podman ignores the fact that workdir can also be
a `symlink` and actual `link` could be valid.

Hence following commit ensures that in such scenarios when a `workdir`
is not found and we cannot create a `workdir` podman must perform a
check to ensure that if `workdir` is a `symlink` and `link` is resolved
successfully and resolved link is present on the container then we
return as it is.

Docker performs a similar behviour.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-02 19:02:33 +05:30
Aditya R 410d286608
vendor: bump c/image to main/9a9cd9
Bump c/image to upstream main/9a9cd9 so podman could use new race-free
code.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-02 18:34:24 +05:30
Aditya R 08036e9af7
vendor: bump c/storage to main/d06b0f
Bump c/storage to main/d06b0f so we podman could use new `race-free`
`AddNames` and `RemoveNames` api

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-02 18:15:15 +05:30
OpenShift Merge Robot 7877b02aac
Merge pull request #13375 from kousu/repair-13123
Use storage that better supports rootless overlayfs
2022-03-01 19:14:38 -05:00
OpenShift Merge Robot a254086c9a
Merge pull request #13391 from baude/revert
Revert "use GetRuntimeDir() from c/common"
2022-03-01 16:02:40 -05:00
OpenShift Merge Robot f0c6114a39
Merge pull request #13380 from jwhonce/wip/docker-py
Refactor docker-py compatibility tests
2022-03-01 15:20:38 -05:00
Brent Baude 22f331e540 Revert "use GetRuntimeDir() from c/common"
This reverts commit fc5cf812c8.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-03-01 13:23:43 -06:00
Nick Guenther 572e6464f6 Use storage that better supports rootless overlayfs
overlayfs -- the kernel's version, not fuse-overlayfs -- recently learned
(as of linux 5.16.0, I believe) how to support rootless users. Previously,
rootless users had to use these storage.conf(5) settings:

* storage.driver=vfs          (aka STORAGE_DRIVER=vfs), or
* storage.driver=overlay      (aka STORAGE_DRIVER=overlay),
  storage.options.overlay.mount_program=/usr/bin/fuse-overlayfs
                              (aka STORAGE_OPTS=/usr/bin/fuse-overlayfs)

Now that a third backend is available, setting only:

* storage.driver=overlay      (aka STORAGE_DRIVER=overlay)

https://github.com/containers/podman/issues/13123 reported EXDEV errors
during the normal operation of their container. Tracing it out, the
problem turned out to be that their container was being mounted without
'userxattr'; I don't fully understand why, but mount(8) mentions this is
needed for rootless users:

> userxattr
>
>   Use the "user.overlay." xattr namespace instead of "trusted.overlay.".
>   This is useful for unprivileged mounting of overlayfs.

https://github.com/containers/storage/pull/1156 found and fixed the issue
in podman, and this just pulls in that via

    go get github.com/containers/storage@ebc90ab
    go mod vendor
    make vendor

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

Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>
2022-03-01 12:09:42 -05:00
Jhon Honce 7729afe979 Refactor docker-py compatibility tests
* Add which python client is being used to run tests, see "python
  client" below.
* Remove redundate code from test classes
* Update/Add comments to modules and classes

======================================================= test session starts ========================================================
platform linux -- Python 3.10.0, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
python client -- DockerClient
rootdir: /home/jhonce/Projects/go/src/github.com/containers/podman
plugins: requests-mock-1.8.0
collected 33 items

test/python/docker/compat/test_containers.py ...s..............  [ 54%]
test/python/docker/compat/test_images.py ............  [ 90%]
test/python/docker/compat/test_system.py ...  [100%]

Note: Follow-up PRs will verify the test results and expand the tests.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-03-01 09:06:52 -07:00
OpenShift Merge Robot 8bdda91ab7
Merge pull request #13362 from keonchennl/pod-logs-add-flag
Add the names flag for pod logs
2022-03-01 08:43:50 -05:00
OpenShift Merge Robot 87d22e1014
Merge pull request #13318 from rhatdan/volume
Add podman volume mount support
2022-03-01 03:53:21 -05:00
OpenShift Merge Robot 86a057e6be
Merge pull request #13374 from cevich/fix_dupe_docker_testing
Clarify v2 API testing for podman vs docker clients
2022-02-28 18:43:18 -05:00
OpenShift Merge Robot 4c529529bd
Merge pull request #13372 from ashley-cui/binarypath
Allow setting binarypath from Makefile
2022-02-28 18:41:28 -05:00
Xueyuan Chen 40c6192e9e Add the names flag for pod logs
Fixes containers#13261

Signed-off-by: Xueyuan Chen <X.Chen-47@student.tudelft.nl>
2022-03-01 00:18:39 +01:00
Ashley Cui 2e14c72707 Allow setting binarypath from Makefile
Packagers for other distributions and package managers may put their helper binaries in other location prefixes.
Add HELPER_BINARIES_DIR to the makefile so packagers can set the prefix when building Podman.
HELPER_BINARIES_DIR will be set at link-time.

Example usage: make podman-remote HELPER_BINARIES_DIR=/my/location/prefix

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-02-28 16:24:15 -05:00
Ashley Cui 569319d397 Vendor in containers/common@main
Signed-off-by: Ashley Cui <acui@redhat.com>
2022-02-28 16:23:26 -05:00
Daniel J Walsh 3dc1b8e83f
Add podman volume mount support
Fixes: https://github.com/containers/podman/issues/12768

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-28 14:26:22 -05:00
Chris Evich dbf34bfe70
Clarify v2 API testing for podman vs docker clients
Fixes: #13273

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-28 13:15:07 -05:00
OpenShift Merge Robot c39dffe83d
Merge pull request #13353 from lsm5/copr-packaging-macro
copr packaging: use generic macros for tmpfiles and modules load dirs
2022-02-26 11:29:25 -05:00
Lokesh Mandvekar 988190db58
copr packaging: use generic macros for tmpfiles and modules load dirs
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-02-25 13:56:19 -05:00
OpenShift Merge Robot 2225c65f74
Merge pull request #13343 from afbjorklund/dpkg-package
Show version of the deb package in info output
2022-02-25 08:53:01 -05:00
Anders F Björklund 6f71fa6d9d Show version of the deb package in info output
Previously just showing name of the package, followed by
the path repeated again (already stated on the line above)

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2022-02-24 20:24:31 +01:00
OpenShift Merge Robot 2cb011ef2b
Merge pull request #13336 from containers/dependabot/go_modules/github.com/containernetworking/plugins-1.1.0
Bump github.com/containernetworking/plugins from 1.0.1 to 1.1.0
2022-02-24 12:18:41 -05:00
OpenShift Merge Robot 874bde2050
Merge pull request #13325 from xordspar0/configmap-error-msg
Improve the error message for usused configMaps
2022-02-24 12:16:40 -05:00