From 9424545fcc3d7c8d8357ec8419b631a7f54d62e4 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Thu, 24 Oct 2024 12:15:10 -0400 Subject: [PATCH 1/2] Fix Azure NetworkManager refresh not delegated All refreshes should be done via the CloudManager, instance methods are delegated to the network_manager's parent_manager however the class-level refresh_ems method was not being delegated causing failures and disconnected inventory. --- app/models/manageiq/providers/azure/network_manager.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/manageiq/providers/azure/network_manager.rb b/app/models/manageiq/providers/azure/network_manager.rb index af962d1a..3369b756 100644 --- a/app/models/manageiq/providers/azure/network_manager.rb +++ b/app/models/manageiq/providers/azure/network_manager.rb @@ -25,6 +25,10 @@ class ManageIQ::Providers::Azure::NetworkManager < ManageIQ::Providers::NetworkM :to => :parent_manager, :allow_nil => true + class << self + delegate :refresh_ems, :to => ManageIQ::Providers::Azure::CloudManager + end + def self.ems_type @ems_type ||= "azure_network".freeze end From d1c796a4ee366e8716fab3295cf0cabe2f0c22d3 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 29 Oct 2024 14:16:23 -0400 Subject: [PATCH 2/2] Disable schedule refresh for Network Manager --- config/settings.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/settings.yml b/config/settings.yml index 7c851b4d..ddf66624 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -72,6 +72,9 @@ # Strategy for saving, another allowed is batch, doing batch SQL queries [Graph refresh only] :saver_strategy: default :azure_network: + # Disable scheduled full refresh for the network manager as this will be + # refreshed automatically by the parent cloud manager. + :refresh_interval: 0 :inventory_collections: :saver_strategy: default :http_proxy: