11893 Commits

Author SHA1 Message Date
d9eb126925 Merge pull request #10447 from mheon/rootlesscni_default
Add the option of Rootless CNI networking by default
2021-05-26 23:13:40 +02:00
5b4ffc7ba7 Merge pull request #10431 from vrothberg/journald-logs
journald logger: fix race condition
2021-05-26 22:38:37 +02:00
533d88b656 Add the option of Rootless CNI networking by default
When the containers.conf field "NetNS" is set to "Bridge" and the
"RootlessNetworking" field is set to "cni", Podman will now
handle rootless in the same way it does root - all containers
will be joined to a default CNI network, instead of exclusively
using slirp4netns.

If no CNI default network config is present for the user, one
will be auto-generated (this also works for root, but it won't be
nearly as common there since the package should already ship a
config).

I eventually hope to remove the "NetNS=Bridge" bit from
containers.conf, but let's get something in for Brent to work
with.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-05-26 15:03:30 -04:00
ac94be37e9 Merge pull request #10465 from containers/dependabot/go_modules/github.com/containers/common-0.39.0
Bump github.com/containers/common from 0.38.4 to 0.39.0
2021-05-26 17:06:22 +02:00
d6b4e7a195 Merge pull request #10466 from vrothberg/fix-10459
libimage-events channel: fix data race
2021-05-26 16:32:19 +02:00
10569c988f journald logger: fix race condition
Fix a race in journald driver.  Following the logs implies streaming
until the container is dead.  Streaming happened in one goroutine,
waiting for the container to exit/die and signaling that event happened
in another goroutine.

The nature of having two goroutines running simultaneously is pretty
much the core of the race condition.  When the streaming goroutines
received the signal that the container has exitted, the routine may not
have read and written all of the container's logs.

Fix this race by reading both, the logs and the events, of the container
and stop streaming when the died/exited event has been read.  The died
event is guaranteed to be after all logs in the journal which guarantees
not only consistencty but also a deterministic behavior.

Note that the journald log driver now requires the journald event
backend to be set.

Fixes: #10323
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-26 14:51:58 +02:00
e81457dc8e Merge pull request #10430 from sjug/noop_gpu_flag
Add podman run --gpus flag for compatibility
2021-05-26 00:51:14 -07:00
d1c9e034ff libimage-events channel: fix data race
Fix a data race between creating and using the libimage-events channel.

[NO TESTS NEEDED] since it really depends on the scheduler and we
couldn't hit the race so far.

Fixes: #10459
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-26 09:28:44 +02:00
568e911b84 Bump github.com/containers/common from 0.38.4 to 0.39.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.38.4 to 0.39.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.38.4...v0.39.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-26 06:27:00 +00:00
c5b3cba9c3 Merge pull request #10429 from ashley-cui/manifestdocs
[CI:DOCS] Document all transports for podman manifest add
2021-05-25 18:11:10 -07:00
738a8fe637 Add podman run --gpus flag for compatibility
- Add log message for --gpus flag
- Add test

Signed-off-by: Sebastian Jug <seb@stianj.ug>
2021-05-25 17:26:50 -04:00
f6f6edc480 Merge pull request #10408 from Luap99/fix-10283
Fix network create macvlan with subnet option
2021-05-25 12:42:07 -07:00
8f71881a63 Merge pull request #10456 from rhatdan/flake1
Fix race on podman start --all
2021-05-25 09:42:57 -07:00
e6a3d6aacc Fix race on podman start --all
Make sure all containers exit after start

There is a race condition in that container could still be running when
we attempt to remove them.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-25 10:53:07 -04:00
9ab3fd876d Fix race condition in running ls container in a pod
All of the tests has an assumption that RunLsContainer and RunLsContainerInPod completes
the container before returning.  But since the container is running
in back ground mode, the container could be still running before tools
attempt to remove it. Removing the "-d" from the command fixes the
container to match the assumption.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-25 09:25:38 -04:00
d0f5796c39 Merge pull request #10453 from vrothberg/certs-docs
[CI:DOCS] docs: --cert-dir: point to containers-certs.d(5)
2021-05-25 06:14:22 -07:00
586af5c747 docs: --cert-dir: point to containers-certs.d(5)
Point to containers-certs.d(5) for details on the default paths, the
lookup logic and the structure of these directories.  Previously, the
man pages stated that the default path would be in `/etc/containers/...`
which is not entirely and a red herring for users (see #10116).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-25 14:00:06 +02:00
78df4f6fb2 Merge pull request #10446 from rhatdan/build
Handle hard links in different directories
2021-05-25 02:39:51 -07:00
afe33573d7 Handle hard links in different directories
Fixes: https://github.com/containers/podman/issues/10444

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-24 15:44:56 -04:00
a6f0ac229f Merge pull request #10436 from rhatdan/errors
Improve OCI Runtime error
2021-05-24 19:17:29 +02:00
4d6b66a452 Merge pull request #10387 from flouthoc/cgroupv1-v2-info
Podman info add support for status of standard available cgroup controllers
2021-05-24 17:15:28 +02:00
2311a02c38 Merge pull request #10421 from rhatdan/build
Handle hard links in remote builds
2021-05-24 16:38:26 +02:00
2f5552c32d Podman info add support for status of cgroup controllers
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-05-24 16:55:23 +05:30
b060a7726e Merge pull request #10424 from containers/dependabot/go_modules/github.com/containers/storage-1.31.2
Bump github.com/containers/storage from 1.31.1 to 1.31.2
2021-05-23 13:08:23 +02:00
f22791aec7 Handle hard links in remote builds
Fixes: https://github.com/containers/podman/issues/9893

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-22 05:27:03 -04:00
4c095aa7e2 Improve OCI Runtime error
ErrOCIRuntimeNotFound error is misleading. Try to make it more
understandable to the user that the OCI Runtime IE crun or runc is not
missing, but the command they attempted to run within the container is
missing.

[NO TESTS NEEDED] Regular tests should handle this.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-22 04:58:48 -04:00
490915c68e Merge pull request #10365 from jwhonce/issues/9578
Match swagger to "as built" output
2021-05-21 20:10:21 +02:00
7f4afe45ab Merge pull request #10427 from rhatdan/errors
Drop container does not exist on removal to debugf
2021-05-21 19:39:21 +02:00
8bf852d5f0 Match swagger to "as built" output
* Remove all Types no longer referenced, they were never used

A future API breaking version of Podman API, may restore these Types
and push formatting into presentation layer vs. server.

Fixes #9578

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-05-21 09:50:58 -07:00
6a6ef402c3 Merge pull request #10400 from rhatdan/root
Clear the storage-options from the graphdriver if users specifies --root
2021-05-21 17:40:24 +02:00
0766777d62 Document all transports for podman manifest add
[CI:DOCS] podman manifest add manpage was missing some transports.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-05-21 10:55:50 -04:00
6ca721cccd Drop container does not exist on removal to debugf
We have race conditions where a container can be removed
by two different processes when running podman --remove rm.

It can be cleaned up in the API or by the conmon executing
podman container cleanup.

When we fail to remove a container that does not exists we should
not be printing errors or warnings, we should just debug the fact.

[NO TESTS NEEDED] Since this is a race condition it is difficult to
test.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-21 09:37:53 -04:00
94665bdf01 Bump github.com/containers/storage from 1.31.1 to 1.31.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.31.1 to 1.31.2.
- [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.31.1...v1.31.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-21 07:25:04 +00:00
e48aa8c82f Merge pull request #10298 from jwhonce/wip/service
[NO TESTS NEEDED] Downgrade API service routing table output
2021-05-20 16:51:18 -04:00
4b3fc0c67a Merge pull request #10411 from rhatdan/VENDOR
Vendor in containers/buildah v1.21.0
2021-05-20 13:08:25 -04:00
7bcfae44b9 Downgrade API service routing table logging
[NO TESTS NEEDED]

* Log the routing table output at Trace vs. Debug level. Reduce noise
  in debugging output.
* Tweak SDNotify message to report Warn when it fails. Previously
  failures were silent.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-05-20 09:10:45 -07:00
c553181fd0 Vendor in containers/buildah v1.21.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-20 09:51:36 -04:00
7bcec8697f Merge pull request #10219 from vrothberg/image-events
add libimage events
2021-05-20 09:49:22 -04:00
62c14dcc4d Merge pull request #10407 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.0.0-rc95
Bump github.com/opencontainers/runc from 1.0.0-rc94 to 1.0.0-rc95
2021-05-20 09:44:22 -04:00
5a0257d463 Fix network create macvlan with subnet option
Creating a macvlan network with the subnet or ipRange option should set
the ipam plugin type to `host-local`. We also have to insert the default
route.

Fixes #10283

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-20 13:12:01 +02:00
f81c4d9fb2 Merge pull request #10402 from EmmanuelKasper/patch-1
[CI:DOCS] [NO TESTS NEEDED] Use conflist suffix when downloading the basic network configuration
2021-05-20 07:07:17 -04:00
8352e5bc3b add libimage events
libimage now supports events which `libpod.Runtime` now uses for image
events.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-20 12:33:09 +02:00
26652111b8 Bump github.com/opencontainers/runc from 1.0.0-rc94 to 1.0.0-rc95
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.0-rc94 to 1.0.0-rc95.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Commits](https://github.com/opencontainers/runc/compare/v1.0.0-rc94...v1.0.0-rc95)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-20 10:10:22 +00:00
12aa71ab83 Use correct extension for example network config
This solves the error:
 # podman network ls
 ERRO[0000] Error loading CNI config file /etc/cni/net.d/87-podman-bridge.conf: error parsing configuration: missing 'type

when creating an initial CNI config.

Signed-off-by: Emmanuel Kasper <emmanuel@libera.cc>
2021-05-20 12:02:04 +02:00
49a99be5b6 Merge pull request #10377 from vrothberg/test-common
update c/common
2021-05-20 06:01:20 -04:00
cb937f4aa8 Merge pull request #10235 from rhatdan/manifest
Add support for podman manifest rm command
2021-05-20 04:37:19 -04:00
898a8ad285 update c/common
Update containers common to the latest HEAD.  Some bug fixes in libimage
forced us to have a clearer separation between ordinary images and
manifest lists.  Hence, when looking up manifest lists without recursing
into any of their instances, we need to use `LookupManifestList()`.

Also account for some other changes in c/common (e.g., the changed order
in the security labels).

Further vendor the latest HEAD from Buildah which is required to get the
bud tests to pass.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-20 10:21:27 +02:00
8bc39f4a90 Merge pull request #10395 from containers/dependabot/go_modules/k8s.io/api-0.21.1
Bump k8s.io/api from 0.21.0 to 0.21.1
2021-05-19 20:36:24 -04:00
2b89b24146 Add support for podman manifest rm command
This is mainly to match command line of Docker.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-19 17:32:02 -04:00
55f00bac02 Clear the storage-options from the graphdriver if users specifies --root
Fixes: https://github.com/containers/podman/issues/10393

Currently if a user specifies a --root flag to override the location of
the container storage, we still enforce the storage-opts from
storage.conf. This causes issues with people trying to intereact with
the additional stores feature, and then forces them to use the obscure
--storage-opt="" option. I belive this should be the default and we
already do this when the user specifies the --storage-driver option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-19 15:35:59 -04:00