cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #03039
Re: [Merge] ~raharper/cloud-init:ntp-configure-timesyncd-fallback-lp-1686485 into cloud-init:master
Thanks for the review, I'll fix the issues you raised and push in an update.
Diff comments:
> diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py
> index 31ed64e..0b92a40 100644
> --- a/cloudinit/config/cc_ntp.py
> +++ b/cloudinit/config/cc_ntp.py
> @@ -185,19 +217,25 @@ def write_ntp_config_template(cfg, cloud):
> 'pools': pools,
> }
>
> - template_fn = cloud.get_template_filename('ntp.conf.%s' %
> - (cloud.distro.name))
> + if template is None:
> + template = 'ntp.conf.%s' % cloud.distro.name
> +
> + if target is None:
OK
> + target = NTP_CONF
> +
> + template_fn = cloud.get_template_filename(template)
> if not template_fn:
> template_fn = cloud.get_template_filename('ntp.conf')
> if not template_fn:
> raise RuntimeError(("No template found, "
> - "not rendering %s"), NTP_CONF)
> + "not rendering %s"), target)
>
> - templater.render_to_file(template_fn, NTP_CONF, params)
> + templater.render_to_file(template_fn, target, params)
>
>
> -def reload_ntp(systemd=False):
> - service = 'ntp'
> +def reload_ntp(systemd=False, service=None):
> + if service is None:
> + service = 'ntp'
OK
> if systemd:
> cmd = ['systemctl', 'reload-or-restart', service]
> else:
--
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/328427
Your team cloud-init commiters is requested to review the proposed merge of ~raharper/cloud-init:ntp-configure-timesyncd-fallback-lp-1686485 into cloud-init:master.
References