From 18c2515d9a630242387a90c70f421622531a8dec Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
Date: Thu, 16 Feb 2023 14:36:23 +0800
Subject: [PATCH 13/19] add CRI ContainerStats Service

Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
---
 .../connect/grpc/runtime_image_service.cc     | 12 ++---
 .../connect/grpc/runtime_runtime_service.cc   | 45 +++++++++++-----
 .../connect/grpc/runtime_runtime_service.h    |  3 ++
 .../entry/cri/cri_container_manager_service.h |  3 ++
 .../cri/cri_container_manager_service_impl.cc | 54 +++++++++++++++++++
 .../cri/cri_container_manager_service_impl.h  |  3 ++
 src/daemon/entry/cri/cri_runtime_service.h    |  3 ++
 .../entry/cri/cri_runtime_service_impl.cc     |  6 +++
 .../entry/cri/cri_runtime_service_impl.h      |  3 ++
 src/daemon/modules/events/collector.c         |  4 +-
 src/daemon/modules/image/image.c              | 16 +++---
 .../modules/image/oci/oci_common_operators.c  |  8 +--
 12 files changed, 128 insertions(+), 32 deletions(-)

diff --git a/src/daemon/entry/connect/grpc/runtime_image_service.cc b/src/daemon/entry/connect/grpc/runtime_image_service.cc
index 23447baf..e593a9c6 100644
--- a/src/daemon/entry/connect/grpc/runtime_image_service.cc
+++ b/src/daemon/entry/connect/grpc/runtime_image_service.cc
@@ -54,7 +54,7 @@ grpc::Status RuntimeImageServiceImpl::ListImages(grpc::ServerContext *context,
     std::vector<std::unique_ptr<runtime::v1alpha2::Image>> images;
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Listing all images}");
+    INFO("Event: {Object: CRI, Type: Listing all images}");
 
     rService->ListImages(request->filter(), &images, error);
     if (!error.Empty()) {
@@ -70,7 +70,7 @@ grpc::Status RuntimeImageServiceImpl::ListImages(grpc::ServerContext *context,
         *image = *(iter->get());
     }
 
-    WARN("Event: {Object: CRI, Type: Listed all images}");
+    INFO("Event: {Object: CRI, Type: Listed all images}");
 
     return grpc::Status::OK;
 }
@@ -82,7 +82,7 @@ grpc::Status RuntimeImageServiceImpl::ImageStatus(grpc::ServerContext *context,
     std::unique_ptr<runtime::v1alpha2::Image> image_info = nullptr;
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Statusing image %s}", request->image().image().c_str());
+    INFO("Event: {Object: CRI, Type: Statusing image %s}", request->image().image().c_str());
 
     image_info = rService->ImageStatus(request->image(), error);
     if (!error.Empty() && !CRIHelpers::IsImageNotFoundError(error.GetMessage())) {
@@ -96,7 +96,7 @@ grpc::Status RuntimeImageServiceImpl::ImageStatus(grpc::ServerContext *context,
         *image = *image_info;
     }
 
-    WARN("Event: {Object: CRI, Type: Statused image %s}", request->image().image().c_str());
+    INFO("Event: {Object: CRI, Type: Statused image %s}", request->image().image().c_str());
 
     return grpc::Status::OK;
 }
@@ -108,7 +108,7 @@ grpc::Status RuntimeImageServiceImpl::ImageFsInfo(grpc::ServerContext *context,
     std::vector<std::unique_ptr<runtime::v1alpha2::FilesystemUsage>> usages;
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Statusing image fs info}");
+    INFO("Event: {Object: CRI, Type: Statusing image fs info}");
 
     rService->ImageFsInfo(&usages, error);
     if (!error.Empty()) {
@@ -125,7 +125,7 @@ grpc::Status RuntimeImageServiceImpl::ImageFsInfo(grpc::ServerContext *context,
         *fs_info = *(iter->get());
     }
 
-    WARN("Event: {Object: CRI, Type: Statused image fs info}");
+    INFO("Event: {Object: CRI, Type: Statused image fs info}");
     return grpc::Status::OK;
 }
 
diff --git a/src/daemon/entry/connect/grpc/runtime_runtime_service.cc b/src/daemon/entry/connect/grpc/runtime_runtime_service.cc
index 7cceefc9..451eeeef 100644
--- a/src/daemon/entry/connect/grpc/runtime_runtime_service.cc
+++ b/src/daemon/entry/connect/grpc/runtime_runtime_service.cc
@@ -181,7 +181,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ListContainers(grpc::ServerContext *cont
 {
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Listing all Container}");
+    INFO("Event: {Object: CRI, Type: Listing all Container}");
 
     std::vector<std::unique_ptr<runtime::v1alpha2::Container>> containers;
     rService->ListContainers(request->has_filter() ? &request->filter() : nullptr, &containers, error);
@@ -199,7 +199,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ListContainers(grpc::ServerContext *cont
         *container = *(iter->get());
     }
 
-    WARN("Event: {Object: CRI, Type: Listed all Container}");
+    INFO("Event: {Object: CRI, Type: Listed all Container}");
 
     return grpc::Status::OK;
 }
@@ -210,7 +210,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ListContainerStats(grpc::ServerContext *
 {
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Listing all Container stats}");
+    INFO("Event: {Object: CRI, Type: Listing all Container stats}");
 
     std::vector<std::unique_ptr<runtime::v1alpha2::ContainerStats>> containers;
     rService->ListContainerStats(request->has_filter() ? &request->filter() : nullptr, &containers, error);
@@ -228,7 +228,28 @@ grpc::Status RuntimeRuntimeServiceImpl::ListContainerStats(grpc::ServerContext *
         *container = *(iter->get());
     }
 
-    WARN("Event: {Object: CRI, Type: Listed all Container stats}");
+    INFO("Event: {Object: CRI, Type: Listed all Container stats}");
+
+    return grpc::Status::OK;
+}
+
+grpc::Status RuntimeRuntimeServiceImpl::ContainerStats(grpc::ServerContext *context,
+                                                       const runtime::v1alpha2::ContainerStatsRequest *request,
+                                                       runtime::v1alpha2::ContainerStatsResponse *reply)
+{
+    Errors error;
+
+    INFO("Event: {Object: CRI, Type: Getting Container Stats: %s}", request->container_id().c_str());
+
+    std::unique_ptr<runtime::v1alpha2::ContainerStats> contStats =
+        rService->ContainerStats(request->container_id(), error);
+    if (!error.Empty() || !contStats) {
+        ERROR("Object: CRI, Type: Failed to get container stats %s", request->container_id().c_str());
+        return grpc::Status(grpc::StatusCode::UNKNOWN, error.GetMessage());
+    }
+    *(reply->mutable_stats()) = *contStats;
+
+    INFO("Event: {Object: CRI, Type: Got Container stats: %s}", request->container_id().c_str());
 
     return grpc::Status::OK;
 }
@@ -239,7 +260,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ContainerStatus(grpc::ServerContext *con
 {
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Statusing Container: %s}", request->container_id().c_str());
+    INFO("Event: {Object: CRI, Type: Statusing Container: %s}", request->container_id().c_str());
 
     std::unique_ptr<runtime::v1alpha2::ContainerStatus> contStatus =
         rService->ContainerStatus(request->container_id(), error);
@@ -249,7 +270,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ContainerStatus(grpc::ServerContext *con
     }
     *(reply->mutable_status()) = *contStatus;
 
-    WARN("Event: {Object: CRI, Type: Statused Container: %s}", request->container_id().c_str());
+    INFO("Event: {Object: CRI, Type: Statused Container: %s}", request->container_id().c_str());
 
     return grpc::Status::OK;
 }
@@ -339,7 +360,7 @@ grpc::Status RuntimeRuntimeServiceImpl::PodSandboxStatus(grpc::ServerContext *co
 {
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Status Pod: %s}", request->pod_sandbox_id().c_str());
+    INFO("Event: {Object: CRI, Type: Status Pod: %s}", request->pod_sandbox_id().c_str());
 
     std::unique_ptr<runtime::v1alpha2::PodSandboxStatus> podStatus;
     podStatus = rService->PodSandboxStatus(request->pod_sandbox_id(), error);
@@ -350,7 +371,7 @@ grpc::Status RuntimeRuntimeServiceImpl::PodSandboxStatus(grpc::ServerContext *co
     }
     *(reply->mutable_status()) = *podStatus;
 
-    WARN("Event: {Object: CRI, Type: Statused Pod: %s}", request->pod_sandbox_id().c_str());
+    INFO("Event: {Object: CRI, Type: Statused Pod: %s}", request->pod_sandbox_id().c_str());
 
     return grpc::Status::OK;
 }
@@ -361,7 +382,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ListPodSandbox(grpc::ServerContext *cont
 {
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Listing all Pods}");
+    INFO("Event: {Object: CRI, Type: Listing all Pods}");
 
     std::vector<std::unique_ptr<runtime::v1alpha2::PodSandbox>> pods;
     rService->ListPodSandbox(request->has_filter() ? &request->filter() : nullptr, &pods, error);
@@ -378,7 +399,7 @@ grpc::Status RuntimeRuntimeServiceImpl::ListPodSandbox(grpc::ServerContext *cont
         *pod = *(iter->get());
     }
 
-    WARN("Event: {Object: CRI, Type: Listed all Pods}");
+    INFO("Event: {Object: CRI, Type: Listed all Pods}");
 
     return grpc::Status::OK;
 }
@@ -470,7 +491,7 @@ grpc::Status RuntimeRuntimeServiceImpl::Status(grpc::ServerContext *context,
 {
     Errors error;
 
-    WARN("Event: {Object: CRI, Type: Statusing daemon}");
+    INFO("Event: {Object: CRI, Type: Statusing daemon}");
 
     std::unique_ptr<runtime::v1alpha2::RuntimeStatus> status = rService->Status(error);
     if (status == nullptr || error.NotEmpty()) {
@@ -479,7 +500,7 @@ grpc::Status RuntimeRuntimeServiceImpl::Status(grpc::ServerContext *context,
     }
     *(reply->mutable_status()) = *status;
 
-    WARN("Event: {Object: CRI, Type: Statused daemon}");
+    INFO("Event: {Object: CRI, Type: Statused daemon}");
 
     return grpc::Status::OK;
 }
diff --git a/src/daemon/entry/connect/grpc/runtime_runtime_service.h b/src/daemon/entry/connect/grpc/runtime_runtime_service.h
index f6e1634e..94543793 100644
--- a/src/daemon/entry/connect/grpc/runtime_runtime_service.h
+++ b/src/daemon/entry/connect/grpc/runtime_runtime_service.h
@@ -58,6 +58,9 @@ public:
                                     const runtime::v1alpha2::ListContainerStatsRequest *request,
                                     runtime::v1alpha2::ListContainerStatsResponse *reply) override;
 
+    grpc::Status ContainerStats(grpc::ServerContext *context, const runtime::v1alpha2::ContainerStatsRequest *request,
+                                runtime::v1alpha2::ContainerStatsResponse *reply) override;
+
     grpc::Status ContainerStatus(grpc::ServerContext *context,
                                  const runtime::v1alpha2::ContainerStatusRequest *request,
                                  runtime::v1alpha2::ContainerStatusResponse *reply) override;
diff --git a/src/daemon/entry/cri/cri_container_manager_service.h b/src/daemon/entry/cri/cri_container_manager_service.h
index f9090971..f362f798 100644
--- a/src/daemon/entry/cri/cri_container_manager_service.h
+++ b/src/daemon/entry/cri/cri_container_manager_service.h
@@ -46,6 +46,9 @@ public:
                                     std::vector<std::unique_ptr<runtime::v1alpha2::ContainerStats>> *containerstats,
                                     Errors &error) = 0;
 
+    virtual auto ContainerStats(const std::string &containerID,
+                                Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStats> = 0;
+
     virtual auto ContainerStatus(const std::string &containerID,
                                  Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStatus> = 0;
 
diff --git a/src/daemon/entry/cri/cri_container_manager_service_impl.cc b/src/daemon/entry/cri/cri_container_manager_service_impl.cc
index b160ce31..93b939c9 100644
--- a/src/daemon/entry/cri/cri_container_manager_service_impl.cc
+++ b/src/daemon/entry/cri/cri_container_manager_service_impl.cc
@@ -891,6 +891,60 @@ cleanup:
     free_container_stats_response(response);
 }
 
+auto ContainerManagerServiceImpl::ContainerStats(const std::string &containerID, Errors &error)
+-> std::unique_ptr<runtime::v1alpha2::ContainerStats>
+{
+    container_stats_request *request { nullptr };
+    container_stats_response *response { nullptr };
+    std::unique_ptr<runtime::v1alpha2::ContainerStats> contStats { nullptr };
+    std::vector<std::unique_ptr<runtime::v1alpha2::ContainerStats>> contStatsVec;
+
+    if (containerID.empty()) {
+        error.SetError("Empty container id");
+        return nullptr;
+    }
+
+    if (m_cb == nullptr || m_cb->container.stats == nullptr) {
+        error.SetError("Unimplemented callback");
+        return nullptr;
+    }
+
+    request = (container_stats_request *)util_common_calloc_s(sizeof(container_stats_request));
+    if (request == nullptr) {
+        error.SetError("Out of memory");
+        return nullptr;
+    }
+
+    request->containers = (char **)util_smart_calloc_s(sizeof(char *), 1);
+    if (request->containers == nullptr) {
+        error.SetError("Out of memory");
+        goto cleanup;
+    }
+
+    request->containers[0] = util_strdup_s(containerID.c_str());
+    request->containers_len = 1;
+
+    if (m_cb->container.stats(request, &response) != 0) {
+        if (response != nullptr && response->errmsg != nullptr) {
+            error.SetError(response->errmsg);
+        } else {
+            error.SetError("Failed to call stats container callback");
+        }
+        goto cleanup;
+    }
+
+    ContainerStatsToGRPC(response, &contStatsVec, error);
+    if (error.NotEmpty()) {
+        goto cleanup;
+    }
+    contStats = std::move(contStatsVec[0]);
+
+cleanup:
+    free_container_stats_request(request);
+    free_container_stats_response(response);
+    return contStats;
+}
+
 void ContainerManagerServiceImpl::PackContainerImageToStatus(
     container_inspect *inspect, std::unique_ptr<runtime::v1alpha2::ContainerStatus> &contStatus, Errors &error)
 {
diff --git a/src/daemon/entry/cri/cri_container_manager_service_impl.h b/src/daemon/entry/cri/cri_container_manager_service_impl.h
index 805ef100..6ac1cbc4 100644
--- a/src/daemon/entry/cri/cri_container_manager_service_impl.h
+++ b/src/daemon/entry/cri/cri_container_manager_service_impl.h
@@ -56,6 +56,9 @@ public:
                             std::vector<std::unique_ptr<runtime::v1alpha2::ContainerStats>> *containerstats,
                             Errors &error) override;
 
+    auto ContainerStats(const std::string &containerID,
+                        Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStats> override;
+
     auto ContainerStatus(const std::string &containerID,
                          Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStatus> override;
 
diff --git a/src/daemon/entry/cri/cri_runtime_service.h b/src/daemon/entry/cri/cri_runtime_service.h
index 4727230f..5e4740cb 100644
--- a/src/daemon/entry/cri/cri_runtime_service.h
+++ b/src/daemon/entry/cri/cri_runtime_service.h
@@ -49,6 +49,9 @@ public:
                                     std::vector<std::unique_ptr<runtime::v1alpha2::ContainerStats>> *containerstats,
                                     Errors &error) = 0;
 
+    virtual auto ContainerStats(const std::string &containerID,
+                                Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStats> = 0;
+
     virtual auto ContainerStatus(const std::string &containerID,
                                  Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStatus> = 0;
 
diff --git a/src/daemon/entry/cri/cri_runtime_service_impl.cc b/src/daemon/entry/cri/cri_runtime_service_impl.cc
index 46643a05..e00bc6e2 100644
--- a/src/daemon/entry/cri/cri_runtime_service_impl.cc
+++ b/src/daemon/entry/cri/cri_runtime_service_impl.cc
@@ -60,6 +60,12 @@ void CRIRuntimeServiceImpl::ListContainerStats(const runtime::v1alpha2::Containe
     m_containerManager->ListContainerStats(filter, containerstats, error);
 }
 
+auto CRIRuntimeServiceImpl::ContainerStats(const std::string &containerID,
+                                           Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStats>
+{
+    return m_containerManager->ContainerStats(containerID, error);
+}
+
 auto CRIRuntimeServiceImpl::ContainerStatus(const std::string &containerID,
                                             Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStatus>
 {
diff --git a/src/daemon/entry/cri/cri_runtime_service_impl.h b/src/daemon/entry/cri/cri_runtime_service_impl.h
index 13d92aba..95f1424f 100644
--- a/src/daemon/entry/cri/cri_runtime_service_impl.h
+++ b/src/daemon/entry/cri/cri_runtime_service_impl.h
@@ -58,6 +58,9 @@ public:
                             std::vector<std::unique_ptr<runtime::v1alpha2::ContainerStats>> *containerstats,
                             Errors &error) override;
 
+    auto ContainerStats(const std::string &containerID,
+                        Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStats> override;
+
     auto ContainerStatus(const std::string &containerID,
                          Errors &error) -> std::unique_ptr<runtime::v1alpha2::ContainerStatus> override;
 
diff --git a/src/daemon/modules/events/collector.c b/src/daemon/modules/events/collector.c
index 433cb88b..b3c7622a 100644
--- a/src/daemon/modules/events/collector.c
+++ b/src/daemon/modules/events/collector.c
@@ -484,7 +484,7 @@ static int write_events_log(const struct isulad_events_format *events)
 
     len = calculate_annaotation_info_len(events);
     if (len == 1) {
-        WARN("Event: {Object: %s, Type: %s}", events->id, events->opt);
+        INFO("Event: {Object: %s, Type: %s}", events->id, events->opt);
     } else {
         annotation = (char *)util_common_calloc_s(len);
         if (annotation == NULL) {
@@ -502,7 +502,7 @@ static int write_events_log(const struct isulad_events_format *events)
         }
         (void)strcat(annotation, ")");
 
-        WARN("Event: {Object: %s, Type: %s %s}", events->id, events->opt, annotation);
+        INFO("Event: {Object: %s, Type: %s %s}", events->id, events->opt, annotation);
     }
 
 out:
diff --git a/src/daemon/modules/image/image.c b/src/daemon/modules/image/image.c
index 158b3aa8..923e72b2 100644
--- a/src/daemon/modules/image/image.c
+++ b/src/daemon/modules/image/image.c
@@ -400,7 +400,7 @@ int im_get_filesystem_info(const char *image_type, im_fs_info_response **respons
         goto out;
     }
 
-    WARN("Event: {Object: get image filesystem info, Type: inspecting}");
+    INFO("Event: {Object: get image filesystem info, Type: inspecting}");
     ret = q->ops->get_filesystem_info(response);
     if (ret != 0) {
         if (response != NULL && *response != NULL) {
@@ -410,7 +410,7 @@ int im_get_filesystem_info(const char *image_type, im_fs_info_response **respons
         }
         goto out;
     }
-    WARN("Event: {Object: get image filesystem info, Type: inspected}");
+    INFO("Event: {Object: get image filesystem info, Type: inspected}");
 
 out:
     return ret;
@@ -450,7 +450,7 @@ int im_get_container_filesystem_usage(const char *image_type, const char *id, im
         request->name_id = util_strdup_s(id);
     }
 
-    WARN("Event: {Object: container \'%s\' filesystem info, Type: inspecting}", id != NULL ? id : "");
+    INFO("Event: {Object: container \'%s\' filesystem info, Type: inspecting}", id != NULL ? id : "");
     ret = q->ops->container_fs_usage(request, &filesystemusage);
     if (ret != 0) {
         ERROR("Failed to get filesystem usage for container %s", id);
@@ -460,7 +460,7 @@ int im_get_container_filesystem_usage(const char *image_type, const char *id, im
 
     *fs_usage = filesystemusage;
     filesystemusage = NULL;
-    WARN("Event: {Object: container \'%s\' filesystem info, Type: inspected}", id != NULL ? id : "");
+    INFO("Event: {Object: container \'%s\' filesystem info, Type: inspected}", id != NULL ? id : "");
 
 out:
     free_im_container_fs_usage_request(request);
@@ -900,7 +900,7 @@ int im_list_images(const im_list_request *ctx, im_list_response **response)
         return -1;
     }
 
-    WARN("Event: {Object: list images, Type: listing}");
+    INFO("Event: {Object: list images, Type: listing}");
 
     for (i = 0; i < g_numbims; i++) {
         if (g_bims[i].ops->list_ims == NULL) {
@@ -920,7 +920,7 @@ int im_list_images(const im_list_request *ctx, im_list_response **response)
         images_tmp = NULL;
     }
 
-    WARN("Event: {Object: list images, Type: listed}");
+    INFO("Event: {Object: list images, Type: listed}");
 
     if (g_isulad_errmsg != NULL) {
         (*response)->errmsg = util_strdup_s(g_isulad_errmsg);
@@ -1655,7 +1655,7 @@ int im_inspect_image(const im_inspect_request *request, im_inspect_response **re
 
     image_ref = util_strdup_s(request->image.image);
 
-    WARN("Event: {Object: %s, Type: image inspecting}", image_ref);
+    INFO("Event: {Object: %s, Type: image inspecting}", image_ref);
 
     bim_type = bim_query(image_ref);
     if (bim_type == NULL) {
@@ -1677,7 +1677,7 @@ int im_inspect_image(const im_inspect_request *request, im_inspect_response **re
         goto pack_response;
     }
 
-    WARN("Event: {Object: %s, Type: image inspected}", image_ref);
+    INFO("Event: {Object: %s, Type: image inspected}", image_ref);
 
 pack_response:
     if (g_isulad_errmsg != NULL) {
diff --git a/src/daemon/modules/image/oci/oci_common_operators.c b/src/daemon/modules/image/oci/oci_common_operators.c
index 7be1ecaa..d33c3585 100644
--- a/src/daemon/modules/image/oci/oci_common_operators.c
+++ b/src/daemon/modules/image/oci/oci_common_operators.c
@@ -431,7 +431,7 @@ int oci_summary_image(im_summary_request *request, im_summary_response *response
         goto pack_response;
     }
 
-    WARN("Event: {Object: %s, Type: statusing image summary}", resolved_name);
+    INFO("Event: {Object: %s, Type: statusing image summary}", resolved_name);
 
     image_summary = storage_img_get_summary(resolved_name);
     if (image_summary == NULL) {
@@ -444,7 +444,7 @@ int oci_summary_image(im_summary_request *request, im_summary_response *response
     response->image_summary = image_summary;
     image_summary = NULL;
 
-    WARN("Event: {Object: %s, Type: statused image summary}", resolved_name);
+    INFO("Event: {Object: %s, Type: statused image summary}", resolved_name);
 
 pack_response:
     free(resolved_name);
@@ -495,7 +495,7 @@ int oci_status_image(im_status_request *request, im_status_response *response)
         goto pack_response;
     }
 
-    WARN("Event: {Object: %s, Type: statusing image}", resolved_name);
+    INFO("Event: {Object: %s, Type: statusing image}", resolved_name);
 
     image_info = storage_img_get(resolved_name);
     if (image_info == NULL) {
@@ -508,7 +508,7 @@ int oci_status_image(im_status_request *request, im_status_response *response)
     response->image_info->image = image_info;
     image_info = NULL;
 
-    WARN("Event: {Object: %s, Type: statused image}", resolved_name);
+    INFO("Event: {Object: %s, Type: statused image}", resolved_name);
 
 pack_response:
     free(resolved_name);
-- 
2.25.1

