app/models/miq_server/ntp_management.rb
# Called when zone ntp settings changed... run by the appropriate server
# Also, called in atStartup of miq_server and on a configuration change for the server
Called when zone ntp settings changed... run by the appropriate server
Also, called in atStartup of miq_server and on a configuration change for the server
Called when zone ntp settings changed ... run by the appropriate server Also called in atStartup of miq_server and on a configuration change for the server
def ntp_reload(ntp_settings = server_ntp_settings)
    return unless MiqEnvironment::Command.is_appliance? 
    if @ntp_settings && @ntp_settings == ntp_settings
      _log.info("Skipping reload of ntp settings since they are unchanged")
      return
    end
    unless ntp_settings.kind_of?(Hash)
      _log.warn("NTP settings, expected hash, received: #{ntp_settings.class}, #{ntp_settings.inspect}")
      return
    end
    if ntp_settings.delete(:source) != :server && !server_ntp_settings_blank?(ntp_config)
      _log.info("Skipping reload of ntp settings from zone since this server is configured with it's own ntp settings")
      return
    end
    if ntp_settings[:server].nil?
      _log.warn("No ntp server settings to synchronize")
      return
    end
    _log.info("Synchronizing ntp settings: #{ntp_settings.inspect}")
    apply_ntp_server_settings(ntp_settings)
    @ntp_settings = ntp_settings
  end
def ntp_reload ( ntp_settings = server_ntp_settings ) return unless MiqEnvironment :: Command . is_appliance? if @ntp_settings && @ntp_settings == ntp_settings _log . info ( "Skipping reload of ntp settings since they are unchanged" ) return end unless ntp_settings . kind_of? ( Hash ) _log . warn ( "NTP settings, expected hash, received: #{ntp_settings.class}, #{ntp_settings.inspect}" ) return end if ntp_settings . delete ( :source ) != :server && ! server_ntp_settings_blank? ( ntp_config ) _log . info ( "Skipping reload of ntp settings from zone since this server is configured with it's own ntp settings" ) return end if ntp_settings [ :server ] . nil? _log . warn ( "No ntp server settings to synchronize" ) return end _log . info ( "Synchronizing ntp settings: #{ntp_settings.inspect}" ) apply_ntp_server_settings ( ntp_settings ) @ntp_settings = ntp_settings end
Called when zone ntp settings changed... run by the appropriate server
Also, called in atStartup of miq_server and on a configuration change for the server
Called when zone ntp settings changed ... run by the appropriate server Also called in atStartup of miq_server and on a configuration change for the server
# matches ntp_reload_queue's guard clause
ntp_settings
<not_specific>
server_ntp_settings
<not_specific>