clibcni/0002-add-error-info-for-failed-run-cni-plugin.patch
zhangxiaoyu 97901ccfb7 sync with upstream clibcni
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
2021-05-08 15:03:21 +08:00

28 lines
801 B
Diff

From 70b8a1516207cb9af774c6742d0973e022f3265b Mon Sep 17 00:00:00 2001
From: haozi007 <liuhao27@huawei.com>
Date: Fri, 26 Mar 2021 17:42:02 +0800
Subject: [PATCH 2/2] add error info for failed run cni plugin
Signed-off-by: haozi007 <liuhao27@huawei.com>
---
src/api.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/api.c b/src/api.c
index 97d166d..52d193f 100644
--- a/src/api.c
+++ b/src/api.c
@@ -348,6 +348,9 @@ static int run_cni_plugin(const struct network_config_list *list, size_t i, cons
*pret = NULL;
ret = exec_plugin_with_result(plugin_path, net.bytes, cargs, pret, err);
}
+ if (ret != 0) {
+ ERROR("pod %s CNI op failed with %s", rc->container_id, net.bytes);
+ }
free_out:
free_cni_args(cargs);
free(plugin_path);
--
2.25.1