Skip to content

Commit

Permalink
remove cockpit
Browse files Browse the repository at this point in the history
remove the custom cockpit thread/service
Also remove references to the cockpit console
  • Loading branch information
kbrock committed Oct 20, 2021
1 parent 3b968e3 commit 3552749
Show file tree
Hide file tree
Showing 28 changed files with 6 additions and 963 deletions.
1 change: 0 additions & 1 deletion app/models/container_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class ContainerGroup < ApplicationRecord
include TenantIdentityMixin
include ArchivedMixin
include CustomActionsMixin
include CockpitSupportMixin
include_concern 'Purging'

# :name, :uid, :creation_timestamp, :resource_version, :namespace
Expand Down
6 changes: 0 additions & 6 deletions app/models/container_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class ContainerNode < ApplicationRecord
include TenantIdentityMixin
include SupportsFeatureMixin
include ArchivedMixin
include CockpitMixin
include CustomActionsMixin
include_concern 'Purging'

Expand Down Expand Up @@ -83,11 +82,6 @@ def kubernetes_hostname
labels.find_by(:name => "kubernetes.io/hostname").try(:value)
end

def cockpit_url
address = kubernetes_hostname || name
MiqCockpit::WS.url(cockpit_server, cockpit_worker, address)
end

def evaluate_alert(_alert_id, _event)
# This is a no-op on container node, and used to be implemented only for
# Hawkular-generated EmsEvents.
Expand Down
46 changes: 0 additions & 46 deletions app/models/miq_cockpit_ws_worker.rb

This file was deleted.

50 changes: 0 additions & 50 deletions app/models/miq_cockpit_ws_worker/authenticator.rb

This file was deleted.

200 changes: 0 additions & 200 deletions app/models/miq_cockpit_ws_worker/runner.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/miq_server/role_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def set_active_role_flags
self.has_active_userinterface = has_active_role?("user_interface")
self.has_active_remote_console = has_active_role?("remote_console")
self.has_active_webservices = has_active_role?("web_services")
self.has_active_cockpit_ws = has_active_role?("cockpit_ws")
save
end

Expand Down
9 changes: 2 additions & 7 deletions app/models/miq_server/worker_management/kubernetes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def enough_resource_to_start_worker?(_worker_class)

def cleanup_orphaned_worker_rows
unless current_pods.empty?
orphaned_rows = podified_miq_workers.where.not(:system_uid => current_pods.keys)
orphaned_rows = miq_workers.where.not(:system_uid => current_pods.keys)
unless orphaned_rows.empty?
_log.warn("Removing orphaned worker rows without corresponding pods: #{orphaned_rows.collect(&:system_uid).inspect}")
orphaned_rows.destroy_all
Expand All @@ -46,7 +46,7 @@ def failed_deployments(restart_count = 5)

def sync_deployment_settings
checked_deployments = Set.new
podified_miq_workers.each do |worker|
miq_workers.each do |worker|
next if checked_deployments.include?(worker.worker_deployment_name)

if deployment_resource_constraints_changed?(worker)
Expand All @@ -57,11 +57,6 @@ def sync_deployment_settings
end
end

def podified_miq_workers
# Cockpit is a threaded worker in the orchestrator that spins off a process it monitors and isn't a pod worker.
miq_workers.where.not(:type => %w[MiqCockpitWsWorker])
end

def deployment_resource_constraints_changed?(worker)
return false unless ::Settings.server.worker_monitor.enforce_resource_constraints

Expand Down
1 change: 0 additions & 1 deletion app/models/miq_worker_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class MiqWorkerType < ApplicationRecord
KILL_PRIORITY_EVENT_CATCHERS = 120
KILL_PRIORITY_UI_WORKERS = 130
KILL_PRIORITY_REMOTE_CONSOLE_WORKERS = 140
KILL_PRIORITY_COCKPIT_WS_WORKERS = 150

scope :in_kill_order, -> { order(:kill_priority => :asc) }

Expand Down
10 changes: 0 additions & 10 deletions app/models/mixins/cockpit_mixin.rb

This file was deleted.

Loading

0 comments on commit 3552749

Please sign in to comment.