kas-container: Make sure privileged podman will find sbin tools
The user environment may lack /usr/sbin while certain podman configuration will need, e.g., iptables for the setup. This can cause Error: plugin type="bridge" failed (add): cni plugin bridge failed: failed to locate iptables: exec: "iptables": executable file not found in $PATH Resolved that by appending /usr/sbin to the PATH in privileged podman mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
a39d5a00c5
commit
f748c17023
@ -97,6 +97,8 @@ enable_isar_mode() {
|
||||
if [ "${KAS_CONTAINER_ENGINE}" = "podman" ]; then
|
||||
# sudo is needed for a privileged podman container
|
||||
KAS_CONTAINER_COMMAND="sudo --preserve-env ${KAS_CONTAINER_COMMAND}"
|
||||
# preserved user PATH may lack sbin needed by privileged podman
|
||||
export PATH="${PATH}:/usr/sbin"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user