From 561dba968389370d55e9ec94250d50990cd7de73 Mon Sep 17 00:00:00 2001 From: Ladislav Smola Date: Mon, 27 Nov 2017 09:48:57 +0100 Subject: [PATCH] Make sure Container has always the right STI type Make sure Container has always the right STI type. Before, the missing image could cause the STI type is Container, which made metrics capture fail. Fixes BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1517676 --- .../providers/kubernetes/container_manager/refresh_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb b/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb index c6fb885951..285e1d6803 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb @@ -1032,6 +1032,7 @@ def parse_conditions(entity) def parse_container_spec(container_spec, pod_id) new_result = { + :type => 'ManageIQ::Providers::Kubernetes::ContainerManager::Container', :ems_ref => "#{pod_id}_#{container_spec.name}_#{container_spec.image}", :name => container_spec.name, :image => container_spec.image, @@ -1079,7 +1080,6 @@ def parse_container_status(container, pod_id) return if container_image.nil? h = { - :type => 'ManageIQ::Providers::Kubernetes::ContainerManager::Container', :restart_count => container.restartCount, :backing_ref => container.containerID, :container_image => container_image