diff --git a/src/config/isulad_config.h b/src/config/isulad_config.h index 5e90c02e1c86e993daec354316a31266f7e1e62d..e06559b4e165b6e5b28bb8e7b5c58480c766a9b5 100644 --- a/src/config/isulad_config.h +++ b/src/config/isulad_config.h @@ -25,6 +25,7 @@ extern "C" { #endif #define DEFAULT_IM_SERVER_SOCK_ADDR "unix:///var/run/isulad/isula_image.sock" +#define DEFAULT_RUNTIME_NAME "lcr" struct isulad_conf { pthread_rwlock_t isulad_conf_rwlock; diff --git a/src/services/execution/execute/execution_create.c b/src/services/execution/execute/execution_create.c index a7d047694c80f21995fcb6445cb38ff2ba71ace5..336187ab9da5c50e764ce29fffff5245798c231f 100644 --- a/src/services/execution/execute/execution_create.c +++ b/src/services/execution/execute/execution_create.c @@ -729,9 +729,9 @@ static int preparate_runtime_environment(const container_create_request *request } else { *runtime = conf_get_default_runtime(); } + if (*runtime == NULL) { - *cc = ISULAD_ERR_INPUT; - return -1; + *runtime = util_strdup_s(DEFAULT_RUNTIME_NAME); } if (runtime_check(*runtime, &runtime_res) != 0) {