Skip to content

Commit

Permalink
Start Apache if roles were changed and it is needed by the current roles
Browse files Browse the repository at this point in the history
Fixes a bug that was introduced in da9523e when the Apache load balancer was made static.
That removed the code that started Apache up after the role or worker count changed.

https://bugzilla.redhat.com/show_bug.cgi?id=1449766
  • Loading branch information
gtanzillo committed May 11, 2017
1 parent ba54d13 commit 5a8f28e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/miq_server/environment_management.rb
Expand Up @@ -121,6 +121,10 @@ def restart_apache
MiqApache::Control.restart(false)
end

def start_apache
MiqApache::Control.start
end

def stop_apache
MiqApache::Control.stop(false)
end
Expand Down
2 changes: 2 additions & 0 deletions app/models/miq_server/worker_management/monitor.rb
Expand Up @@ -148,7 +148,9 @@ def sync_needed?
log_role_changes if roles_changed
sync_active_roles if roles_changed
set_active_role_flags if roles_changed

stop_apache if roles_changed && !apache_needed?
start_apache if roles_changed && apache_needed?

reset_queue_messages if config_changed || roles_changed
end
Expand Down

0 comments on commit 5a8f28e

Please sign in to comment.