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
This commit is contained in:
Sofer Athlan-Guyot 2017-02-14 13:23:39 +01:00
parent 10550e5676
commit d85b11c839
5 changed files with 13 additions and 5 deletions

View File

@ -36,7 +36,7 @@ Exec<| title == 'zaqar-manage db_sync' |> { refreshonly => false }
Exec<| title == 'cinder-manage db_sync' |> { refreshonly => false }
if count(hiera('ntp::servers')) > 0 {
include ::tripleo::profile::base::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_host: {{UNDERCLOUD_ADMIN_HOST}}
controller_public_host: {{UNDERCLOUD_PUBLIC_HOST}}
ntp::servers:
-
ntp::servers: {{UNDERCLOUD_NTP_SERVERS}}
sysctl_settings:
net.ipv4.ip_nonlocal_bind:

View File

@ -147,6 +147,9 @@ _opts = [
default=[],
help=('DNS nameserver(s) to use for the undercloud node.'),
),
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 '
@ -348,7 +351,6 @@ _opts = [
cfg.ListOpt('enabled_drivers',
default=['pxe_ipmitool', 'pxe_drac', 'pxe_ilo', 'pxe_ssh'],
help=('List of enabled bare metal drivers.')),
]
# Passwords, tokens, hashes
@ -1102,7 +1104,6 @@ def _generate_init_data(instack_env):
context['HIERADATA_OVERRIDE'] = hiera_entry
context['UNDERCLOUD_NAMESERVERS'] = json.dumps(
CONF.undercloud_nameservers)
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 @@
# DNS nameserver(s) to use for the undercloud node. (list value)
#undercloud_nameservers =
# 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)