Skip to content

Commit

Permalink
make_master_server uncached again!
Browse files Browse the repository at this point in the history
https://bugzilla.redhat.com/show_bug.cgi?id=1402943

We lock on the region row and base all of our server is_master
queries and changes on it, therefore, it's really important we don't
have a cached region.
  • Loading branch information
jrafanie committed Dec 8, 2016
1 parent f4bb169 commit bbf28c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_server/server_monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def mark_as_not_responding(seconds = miq_server_time_threshold)

def make_master_server(last_master)
_log.info "Master server has #{last_master.nil? ? "not been set" : "died, #{last_master.name}"}. Attempting takeover as new master server, #{name}."
parent = MiqRegion.my_region
parent = MiqRegion.my_region(true)
parent.lock do
# See if an ACTIVE server has already taken over
active_servers = parent.active_miq_servers
Expand Down

0 comments on commit bbf28c2

Please sign in to comment.