Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove changes to enable workers to be started in containers #17493

Merged
merged 1 commit into from
May 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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