mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 12:29:49 +00:00
fix: oci hook
1. when do the deserialization for the oci hook, we should use camel case for createRuntime 2. we should pass the dir of bundle path instead of the path of config.json Fixes:#4693 Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
This commit is contained in:
@@ -236,7 +236,7 @@ impl RuntimeHandlerManager {
|
||||
id: container_config.container_id.to_string(),
|
||||
status: oci::ContainerState::Creating,
|
||||
pid: 0,
|
||||
bundle: bundler_path,
|
||||
bundle: container_config.bundle.clone(),
|
||||
annotations: spec.annotations.clone(),
|
||||
};
|
||||
|
||||
|
@@ -188,9 +188,9 @@ impl Sandbox for VirtSandbox {
|
||||
info!(sl!(), "start vm");
|
||||
|
||||
// execute pre-start hook functions, including Prestart Hooks and CreateRuntime Hooks
|
||||
let (prestart_hooks, create_runtime_hooks) = match spec.hooks.as_ref() {
|
||||
Some(hooks) => (hooks.prestart.clone(), hooks.create_runtime.clone()),
|
||||
None => (Vec::new(), Vec::new()),
|
||||
let (prestart_hooks, create_runtime_hooks, _has_oci_hook) = match spec.hooks.as_ref() {
|
||||
Some(hooks) => (hooks.prestart.clone(), hooks.create_runtime.clone(), true),
|
||||
None => (Vec::new(), Vec::new(), false),
|
||||
};
|
||||
self.execute_oci_hook_functions(&prestart_hooks, &create_runtime_hooks, state)
|
||||
.await?;
|
||||
|
Reference in New Issue
Block a user