mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-18 17:33:02 +00:00
kata-deploy: execute in the host environment
`containerd` command should be executed in the host environment. (To generate the config that matches the host's containerd version.) Fixes: #11092 Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
This commit is contained in:
parent
d3edc90d80
commit
9a8d64d6b1
@ -91,6 +91,10 @@ function host_systemctl() {
|
|||||||
nsenter --target 1 --mount systemctl "${@}"
|
nsenter --target 1 --mount systemctl "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function host_exec() {
|
||||||
|
nsenter --target 1 --mount bash -c "$*"
|
||||||
|
}
|
||||||
|
|
||||||
function print_usage() {
|
function print_usage() {
|
||||||
echo "Usage: $0 [install/cleanup/reset]"
|
echo "Usage: $0 [install/cleanup/reset]"
|
||||||
}
|
}
|
||||||
@ -876,9 +880,9 @@ function main() {
|
|||||||
mkdir -p $(dirname "$containerd_conf_file")
|
mkdir -p $(dirname "$containerd_conf_file")
|
||||||
touch "$containerd_conf_file"
|
touch "$containerd_conf_file"
|
||||||
elif [[ "$runtime" == "containerd" ]]; then
|
elif [[ "$runtime" == "containerd" ]]; then
|
||||||
if [ ! -f "$containerd_conf_file" ] && [ -d $(dirname "$containerd_conf_file") ] && [ -x "$(command -v containerd)" ]; then
|
if [ ! -f "$containerd_conf_file" ] && [ -d $(dirname "$containerd_conf_file") ]; then
|
||||||
containerd config default > "$containerd_conf_file"
|
host_exec containerd config default > "$containerd_conf_file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $use_containerd_drop_in_conf_file = "true" ]; then
|
if [ $use_containerd_drop_in_conf_file = "true" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user