Skip to content

Commit

Permalink
Merge pull request #15078 from gtanzillo/start-apache
Browse files Browse the repository at this point in the history
Start Apache if roles were changed and it is needed by the current roles
  • Loading branch information
carbonin authored May 12, 2017
2 parents 49005d9 + 5a8f28e commit d335171
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 d335171

Please sign in to comment.