From d77ceb183fa0047d8940f8c31c251ae4d5962dce Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Wed, 24 Apr 2024 12:00:37 +0200 Subject: [PATCH] fix(userspace/libsinsp): properly set successful lookup state when parsing old container json events. Signed-off-by: Federico Di Pierro --- userspace/libsinsp/parsers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userspace/libsinsp/parsers.cpp b/userspace/libsinsp/parsers.cpp index ea05ab6674..f4fe2e7494 100644 --- a/userspace/libsinsp/parsers.cpp +++ b/userspace/libsinsp/parsers.cpp @@ -5125,6 +5125,11 @@ void sinsp_parser::parse_container_json_evt(sinsp_evt *evt) container_info->set_lookup_status(sinsp_container_lookup::state::FAILED); } } + else + { + // Fallback at successful state + container_info->set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL); + } const Json::Value& created_time = container["created_time"]; if(check_int64_json_is_convertible(created_time, "created_time"))