Fix ntp configuration.

There was some configuration in hiera template and in
puppet-stack-config.pp, but both were faulty and there was no way to
specify any ntp server.

Change-Id: Ie9e9b5765521250b93a2aed567f253890672d6a8
Closes-Bug: #1664537
(cherry picked from commit d85b11c839)
This commit is contained in:
Sofer Athlan-Guyot 2017-02-14 13:23:39 +01:00 committed by Alex Schultz
parent 94d58fd71e
commit 74ad204741
5 changed files with 13 additions and 4 deletions

View File

@ -50,7 +50,7 @@ Exec<| title == 'mistral-db-populate' |> { refreshonly => false }
Exec<| title == 'zaqar-manage db_sync' |> { refreshonly => false }
if count(hiera('ntp::servers')) > 0 {
include ::ntp
include ::tripleo::profile::base::time::ntp
}
include ::rabbitmq

View File

@ -7,8 +7,7 @@ debug: {{UNDERCLOUD_DEBUG}}
controller_host: {{LOCAL_IP}} #local-ipv4
controller_admin_vip: {{UNDERCLOUD_ADMIN_VIP}}
controller_public_vip: {{UNDERCLOUD_PUBLIC_VIP}}
ntp::servers:
-
ntp::servers: {{UNDERCLOUD_NTP_SERVERS}}
sysctl_settings:
net.ipv4.ip_nonlocal_bind:

View File

@ -154,6 +154,9 @@ _opts = [
help=('Virtual IP address to use for the admin endpoints of '
'Undercloud services. Only used with SSL.')
),
cfg.ListOpt('undercloud_ntp_servers',
default=[],
help=('List of ntp servers to use.')),
cfg.StrOpt('undercloud_service_certificate',
default='',
help=('Certificate file to use for OpenStack service SSL '
@ -978,7 +981,6 @@ def _generate_init_data(instack_env):
open(_get_template_path('net-config.json.template')).read()
context['HIERADATA_OVERRIDE'] = hiera_entry
partials = {'net_config': net_config_json}
renderer = pystache.Renderer(partials=partials)
template = _get_template_path('config.json.template')

View File

@ -0,0 +1,5 @@
---
features:
- Add a UNDERCLOUD_NTP_SERVERS configuration in undercloud.conf
fixes:
- Fixes `bug 1664537 <https://launchpad.net/bugs/1664537>`__ undercloud ntp configuration.

View File

@ -36,6 +36,9 @@
# services. Only used with SSL. (string value)
#undercloud_admin_vip = 192.0.2.3
# List of ntp servers to use. (list value)
#undercloud_ntp_servers =
# Certificate file to use for OpenStack service SSL connections.
# Setting this enables SSL for the OpenStack API endpoints, leaving it
# unset disables SSL. (string value)