From 81b28641eda2ed481f3907e4ebb0c8f872dcf073 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Tue, 5 Dec 2017 16:48:39 -0500 Subject: [PATCH] Cache invalidation... Typically changes are made in the UI and work is queued for another worker to write the file. Ensure that the worker has the latest settings before writing the changes to the file. https://bugzilla.redhat.com/show_bug.cgi?id=1517959 --- app/models/miq_server/ntp_management.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/miq_server/ntp_management.rb b/app/models/miq_server/ntp_management.rb index 92237671105..606673efdb6 100644 --- a/app/models/miq_server/ntp_management.rb +++ b/app/models/miq_server/ntp_management.rb @@ -9,6 +9,8 @@ def ntp_reload # matches ntp_reload_queue's guard clause return if !MiqEnvironment::Command.is_appliance? || MiqEnvironment::Command.is_container? + # Bust the settings cache allowing this worker to apply any recent changes made by another (UI) worker + Vmdb::Settings.reload! ntp_settings = get_config("vmdb").config[:ntp] if @ntp_settings && @ntp_settings == ntp_settings