From c2dc13ebaa797cf35ad34db0784be8c0097fb011 Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Fri, 22 Mar 2024 10:18:17 +0800 Subject: [PATCH] runtime: support to configure CreateContainer Timeout in configurations support to configure CreateContainerRequestTimeout in the configurations. e.g.: [runtime] ... create_container_timeout = 300 Note: The effective timeout is determined by the lesser of two values: runtime-request-timeout from kubelet config (https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=runtime%2Drequest%2Dtimeout) and create_container_timeout. In essence, the timeout used for guest pull=runtime-request-timeout --- src/runtime/Makefile | 4 ++++ src/runtime/config/configuration-acrn.toml.in | 8 ++++++++ src/runtime/config/configuration-clh.toml.in | 8 ++++++++ src/runtime/config/configuration-fc.toml.in | 8 ++++++++ src/runtime/config/configuration-qemu-nvidia-gpu.toml.in | 8 ++++++++ src/runtime/config/configuration-qemu-se.toml.in | 8 ++++++++ src/runtime/config/configuration-qemu-sev.toml.in | 8 ++++++++ src/runtime/config/configuration-qemu-snp.toml.in | 8 ++++++++ src/runtime/config/configuration-qemu-tdx.toml.in | 8 ++++++++ src/runtime/config/configuration-qemu.toml.in | 8 ++++++++ src/runtime/config/configuration-remote.toml.in | 8 ++++++++ src/runtime/config/configuration-stratovirt.toml.in | 8 ++++++++ 12 files changed, 92 insertions(+) diff --git a/src/runtime/Makefile b/src/runtime/Makefile index ea209f8613..72345ac9fe 100644 --- a/src/runtime/Makefile +++ b/src/runtime/Makefile @@ -265,6 +265,9 @@ DEFBINDMOUNTS := [] # Image Service Offload DEFSERVICEOFFLOAD ?= false +# Create Container Timeout in seconds +DEFCREATECONTAINERTIMEOUT ?= 60 + SED = sed CLI_DIR = cmd @@ -679,6 +682,7 @@ USER_VARS += DEFSTATICRESOURCEMGMT_STRATOVIRT USER_VARS += DEFSTATICRESOURCEMGMT_TEE USER_VARS += DEFBINDMOUNTS USER_VARS += DEFSERVICEOFFLOAD +USER_VARS += DEFCREATECONTAINERTIMEOUT USER_VARS += DEFVFIOMODE USER_VARS += BUILDFLAGS diff --git a/src/runtime/config/configuration-acrn.toml.in b/src/runtime/config/configuration-acrn.toml.in index ef02075897..7297059cad 100644 --- a/src/runtime/config/configuration-acrn.toml.in +++ b/src/runtime/config/configuration-acrn.toml.in @@ -240,3 +240,11 @@ experimental=@DEFAULTEXPFEATURES@ # If enabled, user can run pprof tools with shim v2 process through kata-monitor. # (default: false) # enable_pprof = true + +# Indicates the CreateContainer request timeout needed for the workload(s) +# It using guest_pull this includes the time to pull the image inside the guest +# Defaults to @DEFCREATECONTAINERTIMEOUT@ second(s) +# Note: The effective timeout is determined by the lesser of two values: runtime-request-timeout from kubelet config +# (https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=runtime%2Drequest%2Dtimeout) and create_container_timeout. +# In essence, the timeout used for guest pull=runtime-request-timeout