Skip to content

Commit

Permalink
remove ntp references from core
Browse files Browse the repository at this point in the history
ntp settings can be updated at configuration time along with timezone
and current time. makes more sense to consolidate these in one place.
Since all 3 are so necessary, they are available from the cloud/infra
configuration scripts and ui
  • Loading branch information
kbrock committed Oct 2, 2020
1 parent baafa9c commit 50c6272
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 331 deletions.
1 change: 0 additions & 1 deletion app/models/miq_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class MiqServer < ApplicationRecord
include_concern 'ConfigurationManagement'
include_concern 'EnvironmentManagement'
include_concern 'LogManagement'
include_concern 'NtpManagement'
include_concern 'QueueManagement'
include_concern 'RoleManagement'
include_concern 'StatusManagement'
Expand Down
16 changes: 0 additions & 16 deletions app/models/miq_server/configuration_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,10 @@ def reload_settings

Vmdb::Settings.reload!

activate_settings_for_appliance
reset_server_caches
notify_workers_of_config_change(Time.now.utc)
end

# The purpose of this method is to do special activation of things
# that can only happen once per server. Normally, the
# Vmdb::Settings::Activator would be used, however the activations
# will end up occurring once per worker on the entire server, which
# can be detrimental.
#
# As an example, ntp_reload works by telling systemctl to restart
# chronyd. However, if this occurs on every worker, you end up with
# dozens of calls to `systemctl restart chronyd` simultaneously.
# Instead, this method will allow it to only happen once on
# the reload of settings in evmserverd.
private def activate_settings_for_appliance
ntp_reload_queue
end

def servers_for_settings_reload
[self]
end
Expand Down
41 changes: 0 additions & 41 deletions app/models/miq_server/ntp_management.rb

This file was deleted.

14 changes: 0 additions & 14 deletions app/models/miq_server/queue_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,4 @@ def restart_queue
_log.info(log_message)
enqueue_for_server('restart')
end

def ntp_reload_queue
# matches ntp_reload's guard clause
return if !MiqEnvironment::Command.is_appliance? || MiqEnvironment::Command.is_container?

MiqQueue.put(
:class_name => "MiqServer",
:instance_id => id,
:method_name => "ntp_reload",
:server_guid => guid,
:priority => MiqQueue::HIGH_PRIORITY,
:zone => my_zone
)
end
end
8 changes: 0 additions & 8 deletions app/models/zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,6 @@ def any_started_miq_servers?
miq_servers.any?(&:started?)
end

def ntp_reload_queue
servers = active_miq_servers
return if servers.blank?
_log.info("Zone: [#{name}], Queueing ntp_reload for [#{servers.length}] active_miq_servers, ids: #{servers.collect(&:id)}")

servers.each(&:ntp_reload_queue)
end

def message_for_invalid_delete
return _("cannot delete default zone") if name == "default"
return _("cannot delete maintenance zone") if self == self.class.maintenance_zone
Expand Down
5 changes: 0 additions & 5 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,6 @@
:history:
:purge_window_size: 1000
:keep_notifications: 1.week
:ntp:
:server:
- 0.pool.ntp.org
- 1.pool.ntp.org
- 2.pool.ntp.org
:performance:
:capture_threshold:
:default: 10.minutes
Expand Down
1 change: 0 additions & 1 deletion lib/workers/evm_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def start_server

Vmdb::Appliance.log_config_on_startup

@current_server.ntp_reload
@current_server.set_database_application_name

EvmDatabase.seed_rest
Expand Down
14 changes: 0 additions & 14 deletions locale/en/manageiq.po
Original file line number Diff line number Diff line change
Expand Up @@ -37663,12 +37663,6 @@ msgstr ""
msgid "SmartProxy Server IP"
msgstr ""

#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_zone_form.html.haml:43
msgid "NTP Servers"
msgstr ""

#: ../app/views/ops/_settings_evm_servers_tab.html.haml:32
msgid "Max active VM Scans"
msgstr ""
Expand Down Expand Up @@ -37885,10 +37879,6 @@ msgstr ""
msgid "None Available"
msgstr ""

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr ""

#: ../app/views/ops/_settings_server_tab.html.haml:150
msgid "Outgoing SMTP E-mail Server"
msgstr ""
Expand Down Expand Up @@ -37979,10 +37969,6 @@ msgstr ""
msgid "Zone Information"
msgstr ""

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr ""

#: ../app/views/ops/_zone_form.html.haml:70
msgid "Credentials - Windows Domain"
msgstr ""
Expand Down
18 changes: 0 additions & 18 deletions locale/es/manageiq.po
Original file line number Diff line number Diff line change
Expand Up @@ -48933,12 +48933,6 @@ msgstr ""
"* Algunos gráficos no producen resultados deseables con un determinado tipo "
"de campo"

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr ""
"* Los parámetros NTP especificados se aplican sólo a esta zona y no son "
"globales."

#: ../app/views/report/_form_styling.html.haml:104
msgid "* Style \"If\" conditions are evaluated top to bottom for each column"
msgstr ""
Expand Down Expand Up @@ -63961,12 +63955,6 @@ msgstr "Mis servicios"
msgid "NFS Server"
msgstr "Servidor NFS"

#: ../app/views/ops/_zone_form.html.haml:43
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
msgid "NTP Servers"
msgstr "Servidores NTP"

#: ../app/views/catalog/_sandt_tree_show.html.haml:23
#: ../app/views/catalog/_form_basic_info.html.haml:10
msgid "Name / Description"
Expand Down Expand Up @@ -73626,12 +73614,6 @@ msgstr "Hosts específicos"
msgid "Specific Tags"
msgstr "Etiquetas específicas"

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr ""
"La configuración de NTP especificada aplicada aquí reemplazará la "
"configuración de NTP de zona."

#: src/report-editor/consolidation-table.jsx:82
msgid "Specify Calculations for Summary Rows"
msgstr "Especificar cálculos para filas de resumen"
Expand Down
18 changes: 0 additions & 18 deletions locale/fr/manageiq.po
Original file line number Diff line number Diff line change
Expand Up @@ -48825,12 +48825,6 @@ msgstr ""
"* Certains diagrammes peuvent ne pas produire les résultats escomptés avec "
"un seul champ de tri."

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr ""
"* Les paramétrages NTP spécifiés ne s'appliquent qu'à cette zone et ne sont "
"pas globaux."

#: ../app/views/report/_form_styling.html.haml:104
msgid "* Style \"If\" conditions are evaluated top to bottom for each column"
msgstr ""
Expand Down Expand Up @@ -63949,12 +63943,6 @@ msgstr "Mes services"
msgid "NFS Server"
msgstr "Serveur NFS"

#: ../app/views/ops/_zone_form.html.haml:43
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
msgid "NTP Servers"
msgstr "Serveurs NTP"

#: ../app/views/catalog/_sandt_tree_show.html.haml:23
#: ../app/views/catalog/_form_basic_info.html.haml:10
msgid "Name / Description"
Expand Down Expand Up @@ -73625,12 +73613,6 @@ msgstr "Hôtes spécifiques"
msgid "Specific Tags"
msgstr "Balises spécifiques"

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr ""
"Les paramètres NTP spécifiés appliqués ici remplaceront les paramètres NTP "
"de la zone."

#: src/report-editor/consolidation-table.jsx:82
msgid "Specify Calculations for Summary Rows"
msgstr "Spécifier les calculs pour les lignes de synthèse"
Expand Down
14 changes: 0 additions & 14 deletions locale/ja/manageiq.po
Original file line number Diff line number Diff line change
Expand Up @@ -47605,10 +47605,6 @@ msgstr "* 1 つ以上の連続するグループを選択して上下に移動
msgid "* Some charts my not produce desired results with a single sort field"
msgstr "* 一部のチャートの場合、単一ソートフィールドで必要な結果が生成されない可能性があります"

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr "* 指定された NTP 設定はこのゾーンにのみ適用されるものでグローバル設定ではありません。"

#: ../app/views/report/_form_styling.html.haml:104
msgid "* Style \"If\" conditions are evaluated top to bottom for each column"
msgstr "* スタイル \"If\" 条件の評価は、1 列ごとに上から下に実行されます。"
Expand Down Expand Up @@ -62122,12 +62118,6 @@ msgstr "マイサービス"
msgid "NFS Server"
msgstr "NFS サーバー"

#: ../app/views/ops/_zone_form.html.haml:43
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
msgid "NTP Servers"
msgstr "NTP サーバー"

#: ../app/views/catalog/_sandt_tree_show.html.haml:23
#: ../app/views/catalog/_form_basic_info.html.haml:10
msgid "Name / Description"
Expand Down Expand Up @@ -71302,10 +71292,6 @@ msgstr "特定のホスト"
msgid "Specific Tags"
msgstr "特定のタグ"

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr "ここで指定される NTP 設定はゾーン NTP 設定をオーバーライドします。"

#: src/report-editor/consolidation-table.jsx:82
msgid "Specify Calculations for Summary Rows"
msgstr "概要列の計算を指定"
Expand Down
14 changes: 0 additions & 14 deletions locale/manageiq.pot
Original file line number Diff line number Diff line change
Expand Up @@ -46207,10 +46207,6 @@ msgstr ""
msgid "* Some charts my not produce desired results with a single sort field"
msgstr ""

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr ""

#: ../app/views/report/_form_styling.html.haml:104
msgid "* Style \"If\" conditions are evaluated top to bottom for each column"
msgstr ""
Expand Down Expand Up @@ -60756,12 +60752,6 @@ msgstr ""
msgid "NFS Server"
msgstr ""

#: ../app/views/ops/_zone_form.html.haml:43
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
msgid "NTP Servers"
msgstr ""

#: ../app/views/catalog/_sandt_tree_show.html.haml:23
#: ../app/views/catalog/_form_basic_info.html.haml:10
msgid "Name / Description"
Expand Down Expand Up @@ -69989,10 +69979,6 @@ msgstr ""
msgid "Specific Tags"
msgstr ""

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr ""

#: src/report-editor/consolidation-table.jsx:82
msgid "Specify Calculations for Summary Rows"
msgstr ""
Expand Down
17 changes: 0 additions & 17 deletions locale/pt_BR/manageiq.po
Original file line number Diff line number Diff line change
Expand Up @@ -48436,11 +48436,6 @@ msgstr ""
"* Alguns gráficos podem não produzir os resultados desejados com um único "
"campo de classificação"

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr ""
"* As configurações de NTP se aplicam somente a esta zona e não são globais."

#: ../app/views/report/_form_styling.html.haml:104
msgid "* Style \"If\" conditions are evaluated top to bottom for each column"
msgstr ""
Expand Down Expand Up @@ -63319,12 +63314,6 @@ msgstr "Meus serviços"
msgid "NFS Server"
msgstr "Servidor NFS"

#: ../app/views/ops/_zone_form.html.haml:43
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
msgid "NTP Servers"
msgstr "Servidores NTP"

#: ../app/views/catalog/_sandt_tree_show.html.haml:23
#: ../app/views/catalog/_form_basic_info.html.haml:10
msgid "Name / Description"
Expand Down Expand Up @@ -72868,12 +72857,6 @@ msgstr "Especificar hosts"
msgid "Specific Tags"
msgstr "Tags específicas"

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr ""
"As configurações de NTP especificadas e aplicadas aqui substituirão as "
"configurações da zona de NTP."

#: src/report-editor/consolidation-table.jsx:82
msgid "Specify Calculations for Summary Rows"
msgstr "Especificar cálculos para as linhas de resumo"
Expand Down
14 changes: 0 additions & 14 deletions locale/zh_CN/manageiq.po
Original file line number Diff line number Diff line change
Expand Up @@ -47596,10 +47596,6 @@ msgstr "* 选择一个或多个连续的组来上移或下移。"
msgid "* Some charts my not produce desired results with a single sort field"
msgstr "* 某些图表用单一排序字段可能不会产生想要的结果"

#: ../app/views/ops/_zone_form.html.haml:66
msgid "* Specified NTP settings apply to this zone only and are not global."
msgstr "* 指定的 NTP 设置只适用于这个区而不是全局。"

#: ../app/views/report/_form_styling.html.haml:104
msgid "* Style \"If\" conditions are evaluated top to bottom for each column"
msgstr "* 条件列中的每个条件都是从上至下进行判断的。"
Expand Down Expand Up @@ -62104,12 +62100,6 @@ msgstr "我的服务"
msgid "NFS Server"
msgstr "NFS 服务器"

#: ../app/views/ops/_zone_form.html.haml:43
#: ../app/views/ops/_settings_server_tab.html.haml:123
#: ../app/views/ops/_settings_evm_servers_tab.html.haml:25
msgid "NTP Servers"
msgstr "NTP 服务器"

#: ../app/views/catalog/_sandt_tree_show.html.haml:23
#: ../app/views/catalog/_form_basic_info.html.haml:10
msgid "Name / Description"
Expand Down Expand Up @@ -71274,10 +71264,6 @@ msgstr "特定主机"
msgid "Specific Tags"
msgstr "具体标签"

#: ../app/views/ops/_settings_server_tab.html.haml:147
msgid "Specified NTP settings applied here will override Zone NTP settings."
msgstr "在这里应用指定的 NTP 设置将覆盖区的 NTP 设置。"

#: src/report-editor/consolidation-table.jsx:82
msgid "Specify Calculations for Summary Rows"
msgstr "为总结行指定计算方式"
Expand Down
Loading

0 comments on commit 50c6272

Please sign in to comment.