From 1da2aba063527cbda6dab60f03a11a1f92fa60c4 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Fri, 1 Mar 2024 12:37:04 -0500 Subject: [PATCH] Remove MonitoringManager The Prometheus AlertBuffer MonitoringManager is not supported any any versions of OpenShift that are supported --- .../providers/openshift/container_manager.rb | 7 ------- .../providers/openshift/monitoring_manager.rb | 20 ------------------- .../monitoring_manager/event_catcher.rb | 5 ----- .../event_catcher/runner.rb | 3 --- ...ft_monitoring_manager_event_catcher.target | 2 -- ..._monitoring_manager_event_catcher@.service | 13 ------------ 6 files changed, 50 deletions(-) delete mode 100644 app/models/manageiq/providers/openshift/monitoring_manager.rb delete mode 100644 app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb delete mode 100644 app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb delete mode 100644 systemd/manageiq-providers-openshift_monitoring_manager_event_catcher.target delete mode 100644 systemd/manageiq-providers-openshift_monitoring_manager_event_catcher@.service diff --git a/app/models/manageiq/providers/openshift/container_manager.rb b/app/models/manageiq/providers/openshift/container_manager.rb index 11ba2c1a..a26f012c 100644 --- a/app/models/manageiq/providers/openshift/container_manager.rb +++ b/app/models/manageiq/providers/openshift/container_manager.rb @@ -5,13 +5,6 @@ class ManageIQ::Providers::Openshift::ContainerManager < ManageIQ::Providers::Ku include ManageIQ::Providers::Openshift::ContainerManager::Options - # Override HasMonitoringManagerMixin - has_one :monitoring_manager, - :foreign_key => :parent_ems_id, - :class_name => "ManageIQ::Providers::Openshift::MonitoringManager", - :autosave => true, - :dependent => :destroy - supports :catalog supports :create supports :external_logging diff --git a/app/models/manageiq/providers/openshift/monitoring_manager.rb b/app/models/manageiq/providers/openshift/monitoring_manager.rb deleted file mode 100644 index b748ff2e..00000000 --- a/app/models/manageiq/providers/openshift/monitoring_manager.rb +++ /dev/null @@ -1,20 +0,0 @@ -ManageIQ::Providers::Kubernetes::MonitoringManager.include(ActsAsStiLeafClass) - -class ManageIQ::Providers::Openshift::MonitoringManager < ManageIQ::Providers::Kubernetes::MonitoringManager - belongs_to :parent_manager, - :foreign_key => :parent_ems_id, - :class_name => "ManageIQ::Providers::Openshift::ContainerManager", - :inverse_of => :monitoring_manager - - def self.ems_type - @ems_type ||= "openshift_monitor".freeze - end - - def self.description - @description ||= "Openshift Monitor".freeze - end - - def self.event_monitor_class - ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher - end -end diff --git a/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb b/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb deleted file mode 100644 index 1013ebcc..00000000 --- a/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher < ManageIQ::Providers::BaseManager::EventCatcher - def self.settings_name - :event_catcher_prometheus - end -end diff --git a/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb b/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb deleted file mode 100644 index 9e305339..00000000 --- a/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher::Runner < ManageIQ::Providers::BaseManager::EventCatcher::Runner - include ManageIQ::Providers::Kubernetes::MonitoringManager::EventCatcher::RunnerMixin -end diff --git a/systemd/manageiq-providers-openshift_monitoring_manager_event_catcher.target b/systemd/manageiq-providers-openshift_monitoring_manager_event_catcher.target deleted file mode 100644 index 4a988087..00000000 --- a/systemd/manageiq-providers-openshift_monitoring_manager_event_catcher.target +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -PartOf=manageiq.target diff --git a/systemd/manageiq-providers-openshift_monitoring_manager_event_catcher@.service b/systemd/manageiq-providers-openshift_monitoring_manager_event_catcher@.service deleted file mode 100644 index 2327d505..00000000 --- a/systemd/manageiq-providers-openshift_monitoring_manager_event_catcher@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -PartOf=manageiq-providers-openshift_monitoring_manager_event_catcher.target -[Install] -WantedBy=manageiq-providers-openshift_monitoring_manager_event_catcher.target -[Service] -WorkingDirectory=/var/www/miq/vmdb -Environment=BUNDLER_GROUPS=manageiq_default,ui_dependencies -EnvironmentFile=/etc/default/manageiq*.properties -ExecStart=/usr/bin/ruby lib/workers/bin/run_single_worker.rb ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher --heartbeat --guid=%i -User=manageiq -Restart=no -Type=notify -Slice=manageiq-providers-openshift_monitoring_manager_event_catcher.slice