930 Commits

Author SHA1 Message Date
4a4d86d40f Bump Buildah to v1.24.0
Bumps Buildah to v1.24.0 and adopts the new values for pull:
true, false, never, and always.  The pull-never and pull-always options
for the build command are still usable, but they have been removed from
the man page documentation with this change.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-01-27 07:03:56 -05:00
42e1c29816 [CI:DOCS] Fix typos and improve language
* Add more documentation fixes similar to
  8099a61b648a1cfc862461487f1db9ecd47d065e

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 23:32:09 +01:00
8099a61b64 [CI:DOCS] Fix typos and improve language
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 19:34:36 +01:00
b75d6baf07 Merge pull request #12976 from patrycja-guzik/docs-labels
[CI:DOCS] Fix filter description and unify filters docs for containers/images prune
2022-01-24 09:30:23 -05:00
e68d188f64 [CI:DOCS] fix typo subpordinate
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-22 22:47:28 +01:00
aff6a5af88 Fix filter description and unify filters docs for containers/images prune
Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>
2022-01-22 16:22:02 +01:00
5736649eb8 Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 09:52:12 -05:00
b9a2d8698a Handlers for generate systemd with custom dependencies
This commit includes:
* Handlers for generate systemd unit
  with manually defined dependencies such as:
  Wants=, After= and Requires=

* The new unit and e2e tests for checking generated systemd units
  for container and pod with custom dependencies

* Documented descriptions for custom dependencies options

Signed-off-by: Eugene (Evgenii) Shubin <esendjer@gmail.com>
2022-01-19 21:46:16 +05:00
c0e0723463 rename --cni-config-dir to --network-config-dir
Since this option will also be used for netavark we should rename it to
something more generic. It is important that --cni-config-dir still
works otherwise we could break existing container cleanup commands.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-18 19:28:25 +01:00
d6e55577cf [CI:DOCS] fix default branch links
* Replace https://github.com/containers/podman/blob/master
  with https://github.com/containers/podman/blob/main
  to match the new default branch "main". Previously
  the default branch was "master". The substitutions were
  made in the documentation but not the code.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 20:56:19 +01:00
ab8a508489 [CI:DOCS] Fix typo in --env
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 12:50:03 +01:00
482e0b11d9 Merge pull request #12849 from cdoern/podProhibit
Prohibit --uid/gid map and --pod for container create/run
2022-01-14 13:08:17 +01:00
6996830104 Prohibit --uid/gid map and --pod for container create/run
add a check in namespaceOptions() that ensures the user is not setting a new uid/gid map
if entering or creating a pod that has an infra container

resolves #12669

Signed-off-by: cdoern <cdoern@redhat.com>
2022-01-13 14:03:51 -05:00
eeb76db0fd Merge pull request #12642 from Luap99/libnetwork
use libnetwork from c/common
2022-01-13 18:06:54 +01:00
ab7228b3c2 Merge pull request #12836 from cdoern/podSysCtl
Podman Pod Create --sysctl support
2022-01-13 16:44:52 +01:00
f257d98394 Podman Pod Create --sysctl support
added support for pod wide sysctls. The sysctls supported are the same as the continer run controls.

These controls are only valid if the proper namespaces are shared within the pod, otherwise only the infra ctr gets the sysctl

resolves #12747

Signed-off-by: cdoern <cdoern@redhat.com>
2022-01-12 20:49:04 -05:00
0151e10b62 update buildah to latest and use new network stack
Make sure buildah uses the new network stack.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-12 17:40:12 +01:00
fde6ad6373 Add --noout option to prevent the output of ids
Fixes: https://github.com/containers/podman/issues/11515

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-12 08:32:42 -05:00
6e208c2226 add additional fields to podman machine ls --json
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-11 16:42:56 -05:00
8f2358eeaa Add podman rm --depend
This option causes Podman to not only remove the specified containers
but all of the containers that depend on the specified
containers.
Fixes: https://github.com/containers/podman/issues/10360

Also ran codespell on the code

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-11 14:33:54 -05:00
c085fb3c97 Pretty Print output of podman machine ls --format json
Make JSON more prominent in podman machine ls --help and man page.

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-11 06:36:45 -05:00
37c0b27b6f [CI:DOCS] fixes indentation of example pod yaml
The example as previously shown would result in "Error: multi doc yaml
could not be split". The change here has been tested to work, and it
matches the example in the [kubernetes
docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables).

Signed-off-by: Michael Hrivnak <mhrivnak@hrivnak.org>
2022-01-07 19:54:25 -05:00
d627528192 Merge pull request #11454 from afbjorklund/virtfs-volumes
Implement virtfs volumes for podman machine
2022-01-06 21:04:12 +01:00
50e156b605 Merge pull request #12208 from cdoern/podSecurityOpt
Pod Security Option support and Infra Inheritance changes
2022-01-05 17:56:36 +01:00
32e845028a Fix wrong 'podman search --format' placeholder
Signed-off-by: Pavel Dostál <pdostal@suse.cz>
2022-01-04 17:04:19 +01:00
aaf90c5596 Merge pull request #12611 from Luap99/ipv6
add --ip6 flag to podman create/run
2022-01-03 18:42:12 +01:00
c496001d03 add --ip6 flag to podman create/run
Add the --ipv6 flag to podman create/run and pod create. We support the
--network name:ip6=<ip> syntax now but for docker compat we should also
support the --ip6 flag.
Note that there is no validation if the ip is actually a v6 or v4 address
because the backend does not care either.

Fixes #7511

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-03 14:26:34 +01:00
6630e5cf66 Make it possible to select the volume driver
Use the same type of mounts for all the machine volumes.

The default could change in the future, depending on OS.

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:47:16 +01:00
8e7eeaa4dd Implement virtfs volumes for podman machine
Allow using the built-in 9pfs feature of qemu,
mounting host directories into vm mountpoints.

The volumes are generic, the mounts are specific.

Wait for the machine to be "running", otherwise
the SSH function might throw an error instead.

Increase the default msize from 8 KiB to 128 KiB

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:36:56 +01:00
289270375a Pod Security Option support
Added support for pod security options. These are applied to infra and passed down to the
containers as added (unless overridden).

Modified the inheritance process from infra, creating a new function Inherit() which reads the config, and marshals the compatible options into an intermediate struct `InfraInherit`
This is then unmarshaled into a container config and all of this is added to the CtrCreateOptions. Removes the need (mostly) for special additons which complicate the Container_create
code and pod creation.

resolves #12173

Signed-off-by: cdoern <cdoern@redhat.com>
2021-12-27 13:39:36 -05:00
410082f25f docs: sort swagger operations alpabetically
Use `sort-operations-alphabetically` to sort swagger operations
alphabetically

[CI:DOCS]
[NO-NEW-TESTS-NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-27 12:53:52 +05:30
73a54ea54d Merge pull request #12627 from rhatdan/passwd
Allow users to add host user accounts to /etc/passwd
2021-12-23 19:28:08 +01:00
5570b5b975 Merge pull request #12679 from vrothberg/fix-12671
clarify `io.podman.annotations.seccomp`
2021-12-23 15:14:10 +01:00
e8c06fac97 Allow users to add host user accounts to /etc/passwd
Some containers require certain user account(s) to exist within the
container when they are run. This option will allow callers to add a
bunch of passwd entries from the host to the container even if the
entries are not in the local /etc/passwd file on the host.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1935831

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-23 07:51:27 -05:00
a7f1c05366 Merge pull request #12692 from giuseppe/fix-additional-ids-doc
[CI:DOCS] docs: document rootless userns mappings
2021-12-23 13:46:10 +01:00
cbcab43425 [CI:DOCS] clarify io.podman.annotations.seccomp
Clarify the semantics of the `io.podman.annotations.seccomp` annotation
which is set when a container has been created with a custom seccomp
profile.

Fixes: #12671
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-23 13:40:46 +01:00
d669dbfb9f Error out early if system does not support pre-copy checkpointing
CRIU's pre-copy migration support relies on the soft dirty page tracking
in the Linux kernel:

 https://www.kernel.org/doc/Documentation/vm/soft-dirty.txt

This functionality is not implemented for all architectures and it can
also be turned off in the kernel.

CRIU can check if the combination of architecture/kernel/CRIU supports
the soft dirty page tracking and exports this feature checking
functionality in go-criu.

This commit adds an early check if the user selects pre-copy
checkpointing to error out if the system does not support it.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-12-23 09:51:38 +00:00
cb4f498e4f [CI:DOCS] docs: document rootless userns mappings
document how the host IDs are mapped inside the rootless user
namespace.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-23 09:32:49 +01:00
85f21fb2bd Merge pull request #12664 from cdoern/noManagePasswd
Podman run --passwd
2021-12-22 12:09:56 +01:00
20ce6e5c60 Podman run --passwd
added support for a new flag --passwd which, when false prohibits podman from creating entries in
/etc/passwd and /etc/groups allowing users to modify those files in the container entrypoint

resolves #11805

Signed-off-by: cdoern <cdoern@redhat.com>
2021-12-21 17:19:41 -05:00
f3d6672c7d Merge pull request #12662 from adrianreber/2021-12-20-checkpoint-restore-man-pages
[CI:DOCS] Small checkpoint/restore man page fixes
2021-12-21 14:46:20 +01:00
bb096c3bf2 [CI:DOCS] Small checkpoint/restore man page fixes
At some places the checkpoint restore man pages were using the markdown
modifier `**` inside `*..*`. This does not seem to work as intended and
results in markdown modifiers present in the final man page. Switching
to `__` inside of `*..*` seems to fix this.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-12-20 15:38:33 +00:00
1ddb49c66d [CI:DOCS] Explicitly mention that checkpointing systemd containers might fail
Checkpoint a container using systemd as entrypoint will probably result
in an error as CRIU cannot handle all the resources latest systemd uses.

This updates the checkpoint man page with this information.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-12-20 15:37:32 +00:00
a86495ea6f Set machine timezone
Added an option to podman machine init to declare the timezone of the
resulting machine.  the default is to use the value of the host name or
else a given timezone name like America/Chicago.

Fixes: #11895

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-12-16 12:40:20 -06:00
9212c74ff1 Merge pull request #12600 from rhatdan/external
Show --external containers even without --all option
2021-12-15 15:43:11 +01:00
7dabcbd7bc Merge pull request #12534 from Luap99/network-db
network db rewrite
2021-12-15 15:25:14 +01:00
51a4bef2e6 Show --external containers even without --all option
We currently do not show --external containers when the user specifies
it, unless they also specify the --all flag. This has led to confusion.
I see no reason not to list them without the --all flag if the user
specifies the option.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-14 16:03:21 -05:00
3e9af2029f play kube add support for multiple networks
Allow the same --network options for play kube as for podman run/create.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:40 +01:00
535818414c support advanced network configuration via cli
Rework the --network parse logic to support multiple networks with
specific network configuration settings.
--network can now be set multiple times. For bridge network mode the
following options have been added:
  - **alias=name**: Add network-scoped alias for the container.
  - **ip=IPv4**: Specify a static ipv4 address for this container.
  - **ip=IPv6**: Specify a static ipv6 address for this container.
  - **mac=MAC**: Specify a static mac address address for this container.
  - **interface_name**: Specify a name for the created network interface inside the container.

So now you can set --network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99
for the default bridge network as well as for network names.
This is better than using --ip because we can set the ip per network
without any confusion which network the ip address should be assigned
to.
The --ip, --mac-address and --network-alias options are still supported
but --ip or --mac-address can only be set when only one network is set.
This limitation already existed previously.

The ability to specify a custom network interface name is new
Fixes #11534

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:39 +01:00
4791595b5c network connect allow ip, ipv6 and mac address
Network connect now supports setting a static ipv4, ipv6 and mac address
for the container network. The options are added to the cli and api.

Fixes #9883

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:39 +01:00