From 6d265c99fe8daa88b85ce9e9eb9f79741c67901d Mon Sep 17 00:00:00 2001 From: jikai Date: Tue, 7 Nov 2023 15:57:55 +0800 Subject: [PATCH] Add succeed message info for ocihook Signed-off-by: jikai --- src/lxc/conf.c | 5 +++-- src/lxc/start.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 3e31691..8cb00cd 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -6513,13 +6513,13 @@ static int run_ocihook_buffer(struct oci_hook_conf *oconf, const char *inmsg) conf->pid = f->child_pid; conf->startat = lxc_get_process_startat(conf->pid); - INFO("hook_conf timeout %d", oconf->ocihook->timeout); if(oconf->ocihook->timeout > 0) conf->timeout = oconf->ocihook->timeout; else { conf->timeout = 30; - INFO("Set hook timeout 30s"); } + INFO("start running hook: %s with hook_conf timeout %d", buffer, conf->timeout); + conf->errfd = oconf->errfd; conf->which = oconf->which; @@ -6560,6 +6560,7 @@ static int run_ocihook_buffer(struct oci_hook_conf *oconf, const char *inmsg) goto print_hook; } + INFO("succeed running hook: %s with hook_conf timeout: %d", buffer, conf->timeout); return 0; on_error: diff --git a/src/lxc/start.c b/src/lxc/start.c index 5de444d..ec64546 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -280,9 +280,9 @@ restart: #endif if (closeall) { if (close(fd)) - SYSINFO("Closed inherited fd %d", fd); + SYSDEBUG("Closed inherited fd %d", fd); else - INFO("Closed inherited fd %d", fd); + DEBUG("Closed inherited fd %d", fd); closedir(dir); goto restart; } -- 2.33.0