Commit graph

11918 commits

Author SHA1 Message Date
Valentin Rothberg 5307218419 generate systemd: make mounts portable
Commit 748826fc88 fixed a bug where slow mounting of the runroot was
causing issues when the units are started at boot.  The fix was to add
the container's runroot to the required mounts; the graph root has been
added as well.

Hard-coding the run- and graphroot to the required mounts, however,
breaks the portability of units generated with --now.  Those units are
intended to be running on any machine as, theoreticaly, any user.

Make the mounts portable by using the `%t` macro for the run root.
Since the graphroot's location varies across root and ordinary users,
drop it from the list of required mounts.  The graphroot was not causing
issues.

Fixes: #10493
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-31 11:31:27 +02:00
OpenShift Merge Robot 59236762ec
Merge pull request #10481 from flouthoc/fix-sigsegv-rootless
rootless: fix SIGSEGV, Make `LISTEN_FDNAMES` optional
2021-05-30 02:20:31 +02:00
OpenShift Merge Robot ffca97a01e
Merge pull request #10499 from edsantiago/libera
[CI:DOCS] point IRC to libera.chat
2021-05-30 00:41:32 +02:00
Ed Santiago 51a8e01f82 [CI:DOCS] point IRC to libera.chat
Project IRC comms are moving to Libera. Update docs.

Confirmation cookie: libera-ieVeeGahbiaf1einguw1xav6bahquie

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-05-29 11:39:40 -06:00
flouthoc 2addc0f90d rootless: fix SIGSEGV ,make LISTEN_FDNAMES optional [Closes #10435].
[NO TESTS NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-05-29 15:16:26 +05:30
OpenShift Merge Robot 083746112f
Merge pull request #10477 from Procyhon/manpage_syntax
[CI:DOCS] Manpage syntax proposal
2021-05-29 03:48:30 +02:00
OpenShift Merge Robot 3d6c19c8be
Merge pull request #10487 from rhatdan/docs
[CI:DOCS] Update a way out of date transfer document
2021-05-28 12:18:41 +02:00
OpenShift Merge Robot aa1e15961e
Merge pull request #10385 from jwhonce/wip/engine_mode
[Techinal Debt][NO TESTS NEEDED] Cleanup ABI vs. Tunnel CLI commands
2021-05-28 12:14:42 +02:00
Daniel J Walsh 5bd1b7dfd5
Update a way out of date transfer document
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-28 05:59:16 -04:00
Alexander Richter 6deb1bc2ae Manpage syntax proposal
I looked at the man pages and found that while they are consistent in their basic concept, many things concerning formatting are not.
For example, it is not consistent that options are behind an H4 header.
The biggest criticism, however, is how commands and options are handled when referencing them in a text.
There is no clear structure between the man pages regarding this. Sometimes backticks are used and sometimes they are written in italic.
Also, the formatting regarding the appearance of the commands is not consistent either.
I would like to propose a uniform formatting and, if accepted, apply it to all man pages.
Uniformity is very important to me and it should be clear to the user when reading several man pages what exactly their content and references are about.

Signed-off-by: Alexander Richter <67486332+Procyhon@users.noreply.github.com>
2021-05-27 22:42:50 +02:00
OpenShift Merge Robot 3d8f37120d
Merge pull request #10383 from rhatdan/kube
Handle image user and exposed ports in podman play kube
2021-05-27 21:18:05 +02:00
OpenShift Merge Robot 3223cb56dd
Merge pull request #10490 from rhatdan/VENDOR
Vendor in containers/storage v1.32.1
2021-05-27 20:43:06 +02:00
Jhon Honce 33944cefe7 [Techinal Debt] Cleanup ABI vs. Tunnel CLI commands
[NO TESTS NEEDED]

This commit cleans up two issues:
* Most commands support all EngineModes so default to that. Let
  outlayers declare their intent.
* Use cobra.Annotations to set supported EngineMode. This simplies
  instantiating commands as there is now one method to communicate a
  commands requirements rather than two.
* Combined aliased commands into one file
* Fixed aliased commands where Args field did not match
* Updated examples in README.md for writing commands
* Remove redundant flag DisableFlagsInUseLine in cobra.Command
  initialization.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-05-27 11:40:43 -07:00
OpenShift Merge Robot 4f4a440afd
Merge pull request #10489 from vrothberg/fix-data-race
create libimage-events channel in main routine
2021-05-27 19:42:04 +02:00
Daniel J Walsh 9cc6093602
Merge pull request #10434 from cevich/sync_multi-arch
Sync. workflow across skopeo, buildah, and podman
2021-05-27 13:00:59 -04:00
Daniel J Walsh c59ae7c87c
Merge pull request #10485 from baude/machinesshkeys
Add options to podman machine ssh
2021-05-27 12:57:44 -04:00
Daniel J Walsh c9609d820b
Vendor in containers/storage v1.32.1
Theoretically this should fix the aweful flake we have
been suffering with.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-27 12:34:26 -04:00
Valentin Rothberg 9822c3309c create libimage-events channel in main routine
Move the creation of the channel outside of the sub-routine to fix a
data race between writing the channel (implicitly by calling
EventChannel()) and using that channel in libimage.

[NO TESTS NEEDED]

Fixes: #10459
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-27 16:52:56 +02:00
Brent Baude 8e5388e41d Add options to podman machine ssh
Add options to the podman machine ssh command that ignore
hostkeychecking and hosts file

-o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-05-27 09:10:39 -05:00
OpenShift Merge Robot cd1f99d063
Merge pull request #10483 from containers/dependabot/go_modules/github.com/onsi/gomega-1.13.0
Bump github.com/onsi/gomega from 1.12.0 to 1.13.0
2021-05-27 15:06:07 +02:00
dependabot[bot] 61167834f2
Bump github.com/onsi/gomega from 1.12.0 to 1.13.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.12.0 to 1.13.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.12.0...v1.13.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 07:02:40 +00:00
OpenShift Merge Robot 542d730987
Merge pull request #10476 from mheon/ensure_exists_on_remove
Ensure that container still exists when removing
2021-05-27 08:55:03 +02:00
OpenShift Merge Robot 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
Daniel J Walsh de293c9802
Handle image user and exposed ports in podman play kube
Currently if a user runs an image with a user specified or
exposed ports with podman play kube, the fields are ignored.

Fixed: https://github.com/containers/podman/issues/9609

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-26 16:39:04 -04:00
OpenShift Merge Robot 5b4ffc7ba7
Merge pull request #10431 from vrothberg/journald-logs
journald logger: fix race condition
2021-05-26 22:38:37 +02:00
Matthew Heon fad6e1d3ef Ensure that container still exists when removing
After #8906, there is a potential race condition in container
removal of running containers with `--rm`. Running containers
must first be stopped, which was changed to unlock the container
to allow commands like `podman ps` to continue to run while
stopping; however, this also means that the cleanup process can
potentially run before we re-lock, and remove the container from
under us, resulting in error messages from `podman rm`. The end
result is unchanged, the container is still cleanly removed, but
the `podman rm` command will seem to have failed.

Work around this by pinging the database after we stop the
container to make sure it still exists. If it doesn't, our job is
done and we can exit cleanly.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-05-26 15:33:28 -04:00
Matthew Heon 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
OpenShift Merge Robot 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
OpenShift Merge Robot d6b4e7a195
Merge pull request #10466 from vrothberg/fix-10459
libimage-events channel: fix data race
2021-05-26 16:32:19 +02:00
Valentin Rothberg 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
OpenShift Merge Robot 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
Valentin Rothberg 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
dependabot[bot] 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
OpenShift Merge Robot 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
Sebastian Jug 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
OpenShift Merge Robot f6f6edc480
Merge pull request #10408 from Luap99/fix-10283
Fix network create macvlan with subnet option
2021-05-25 12:42:07 -07:00
OpenShift Merge Robot 8f71881a63
Merge pull request #10456 from rhatdan/flake1
Fix race on podman start --all
2021-05-25 09:42:57 -07:00
Daniel J Walsh 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
Daniel J Walsh 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
OpenShift Merge Robot 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
Valentin Rothberg 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
OpenShift Merge Robot 78df4f6fb2
Merge pull request #10446 from rhatdan/build
Handle hard links in different directories
2021-05-25 02:39:51 -07:00
Daniel J Walsh 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
OpenShift Merge Robot a6f0ac229f
Merge pull request #10436 from rhatdan/errors
Improve OCI Runtime error
2021-05-24 19:17:29 +02:00
OpenShift Merge Robot 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
OpenShift Merge Robot 2311a02c38
Merge pull request #10421 from rhatdan/build
Handle hard links in remote builds
2021-05-24 16:38:26 +02:00
flouthoc 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
OpenShift Merge Robot 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
Daniel J Walsh 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
Daniel J Walsh 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