When we have the _precise_ knowledge of where the parameter boundaries
are, and an API that allows us to express that, just _do that_ instead
of completely unnecessarily worrying about spaces in parameter values.
Also, this allows us to format the code to make the option and value
correspondence much easier to see.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Quadlet list always reports the heading, even when using custom
formatting strings. This doesn't follow the behavior of other podman
list commands. Borrow some logic and the "--noheading" flag from the
container list command to make this behavior uniform.
Signed-off-by: Randolph Sapp <rs@ti.com>
Statement
for line in "${lines[*]}"
does not make sense since line will be a single value consisting of
all elements of lines array, space-separated.
It should be
for line in "${lines[@]}"
if we want to iterate through each value.
Fixes: 00292ae1c4 ("systests: test instrumentation")
Fixes: c33ba70f95 ("system tests: instrument, to try to catch unlinkat-ebusy")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add a per-volume 'nocreate' option that prevents automatic creation of
named volumes when they don't exist. When specified, Podman will fail
if the volume is not found instead of creating it automatically.
Usage: -v myvolume:/data:nocreate
--mount type=volume,src=myvolume,dst=/data,nocreate
See: #27862
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
That test uses process substitution for the Containerfile which fails
because podman tries to use /dev/fd as context directory.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Given the new config file logic will read many files pritning one
specific one here has no meaning anymore, just delete it.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Calling append can lead to resizing the slice. In case we have all
elements beforehand, it is not necessary to call append in the first
place and this avoid resizing.
This is the first part of fixing issues reported by prealloc linter from
golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The main purpose of the transient services/timers is to trigger the
healthcheck execution in regular intervals, their own state should
not depend on the result of the healthchecks. This way there are no
failing systemd services unless there is actually a fatal error.
Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
This is useful for triggering the execution of a healthcheck
without caring about it's result as long as no fatal error occured.
Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
With the config file rewrite we now get other error messages so fix the
tests.
Also note the shell completion test is skipped for now as the logic to
get the directories is not yet exposed in container-libs. I enable that
later.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Remove user-facing CLI options for CNI network backend:
CLI flags:
- Keep --network-backend global flag as hidden and deprecated for
backward compatibility with cleanup commands from 5.x containers
- Map flag to a throwaway variable (value is ignored)
- Remove shell completion for network backend values
Shell completions:
- Remove AutocompleteNetworkBackend() function
- Remove references to CNI and Netavark type constants
Backward compatibility:
- Remove --rootless-cni flag alias for podman unshare
- Remove SetNormalizeFunc that mapped rootless-cni to rootless-netns
- Update --rootless-netns flag description to mention only netavark
The --network-backend flag remains as a hidden deprecated flag to
prevent failures when upgrading from 5.x where containers may have
cleanup commands that include this flag. The flag is accepted but
ignored. Users can no longer specify CNI as a network backend option.
The --rootless-cni alias is removed; users must use --rootless-netns.
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Remove test framework code that supported dual network backends:
Test utilities:
- Remove NetworkBackend enum type and constants (CNI, Netavark)
- Remove NetworkBackend.ToString() method
- Remove NetworkBackend field from PodmanTest struct
Test infrastructure:
- Remove SkipIfCNI() helper function
- Remove SkipIfNetavark() helper function
- Remove network backend selection logic based on NETWORK_BACKEND env var
- Remove CNI-specific network config directory setup
- Hardcode "netavark" in podman command line construction (flag will be removed in later commit)
Simplify test helpers:
- Simplify generateNetworkConfig() to only generate Netavark configs
- Remove conditional CNI vs Netavark network ID logic
- Update IP allocation comment to remove CNI-specific behavior description
Remove SkipIfCNI() calls from tests:
- Remove skip guards from Netavark-only feature tests
- These tests now run universally since Netavark is the only backend
Documentation:
- Remove NETWORK_BACKEND environment variable from test/README.md
All tests that were previously skipped with SkipIfCNI (Netavark-only
features) will now run for all users since Netavark is the only
supported network backend.
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>