Skip to content

Commit

Permalink
Remove changes to enable workers to be started in containers
Browse files Browse the repository at this point in the history
This will allow us to use the G-release architecture for the
H-release container images without undoing all of the work
in ManageIQ#15884

https://www.pivotaltracker.com/story/show/157774394
  • Loading branch information
carbonin committed May 29, 2018
1 parent 2903440 commit 8467e94
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion app/models/miq_server/worker_management/monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def check_pending_stop(class_name = nil)
end

def check_not_responding(class_name = nil)
return [] if MiqEnvironment::Command.is_podified?
processed_workers = []
miq_workers.each do |w|
next unless class_name.nil? || (w.type == class_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ module MiqServer::WorkerManagement::Monitor::SystemLimits
}

def kill_workers_due_to_resources_exhausted?
return false if MiqEnvironment::Command.is_podified?
options = worker_monitor_settings[:kill_algorithm].merge(:type => :kill)
invoke_algorithm(options)
end

def enough_resource_to_start_worker?(worker_class)
return true if MiqEnvironment::Command.is_podified?
# HACK, sync_config is done in the server, while this method is called from miq_worker
# This method should move to the worker and the server should pass the settings.
sync_config if worker_monitor_settings.nil? || child_worker_settings.nil?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module MiqServer::WorkerManagement::Monitor::Validation
extend ActiveSupport::Concern

def validate_worker(w)
return true if MiqEnvironment::Command.is_podified?
time_threshold = get_time_threshold(w)
restart_interval = get_restart_interval(w)
memory_threshold = get_memory_threshold(w)
Expand Down
5 changes: 0 additions & 5 deletions app/models/miq_ui_worker/runner.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
class MiqUiWorker::Runner < MiqWorker::Runner
include MiqWebServerRunnerMixin

def prepare
super
MiqApache::Control.start if MiqEnvironment::Command.is_podified?
end
end
4 changes: 2 additions & 2 deletions app/models/miq_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ def self.supports_container?
end

def self.containerized_worker?
# un-rearch containers for Hammer
return false
MiqEnvironment::Command.is_podified? && supports_container?
end

Expand Down Expand Up @@ -527,8 +529,6 @@ def log_destroy_of_worker_messages
end

def status_update
return if MiqEnvironment::Command.is_podified?

begin
pinfo = MiqProcess.processInfo(pid)
rescue Errno::ESRCH
Expand Down

0 comments on commit 8467e94

Please sign in to comment.