From 490e70e5d13d18c3fe07396d02ccf137207c53a5 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Thu, 29 Feb 2024 16:01:31 -0500 Subject: [PATCH] Require kubeclient in connection_rescue_block Ensure that the Kubeclient::HttpError exception class is loaded in the connection_rescue_block method. ``` [NameError]: uninitialized constant ManageIQ::Providers::Kubernetes::ContainerManager::Kubeclient rescue RestClient::Unauthorized, Kubeclient::HttpError => err ^^^^^^^^^^ ``` --- app/models/manageiq/providers/kubernetes/container_manager.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/manageiq/providers/kubernetes/container_manager.rb b/app/models/manageiq/providers/kubernetes/container_manager.rb index dc3144b8c8..2651c82b81 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager.rb @@ -586,6 +586,7 @@ def self.verify_credentials(args) end def self.connection_rescue_block + require "kubeclient" require "rest-client" yield rescue SocketError,