Skip to content

Commit

Permalink
Merge 66946f2 into a739a56
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Feb 3, 2022
2 parents a739a56 + 66946f2 commit 5675fb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/models/miq_server/worker_management/monitor/quiesce.rb
Expand Up @@ -3,9 +3,6 @@ module MiqServer::WorkerManagement::Monitor::Quiesce

def workers_quiesced?
# do a subset of the monitor_workers loop to allow for graceful exit
my_server.heartbeat

check_not_responding
check_pending_stop
clean_worker_records

Expand Down Expand Up @@ -43,6 +40,8 @@ def quiesce_workers_loop

loop do
my_server.reload # Reload from SQL this MiqServer AND its miq_workers association
my_server.heartbeat

break if self.workers_quiesced?
sleep worker_monitor_poll
end
Expand Down
5 changes: 5 additions & 0 deletions app/models/miq_server/worker_management/process.rb
Expand Up @@ -32,6 +32,11 @@ def cleanup_failed_workers
super
end

def workers_quiesced?
check_not_responding
super
end

def check_not_responding
worker_deleted = false
miq_workers.each do |w|
Expand Down

0 comments on commit 5675fb4

Please sign in to comment.