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
(cherry picked from commit d335171)

https://bugzilla.redhat.com/show_bug.cgi?id=1458946
  • Loading branch information
carbonin authored and simaishi committed Jun 5, 2017
1 parent f9e3bcc commit 40eedfb
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 40eedfb

Please sign in to comment.