Comment 8 for bug 1257082

Revision history for this message
dann frazier (dannf) wrote : Re: [Bug 1257082] Re: MAAS does not use NTP servers specified in DHCPD options

On Tue, Dec 3, 2013 at 12:35 PM, Brian Rzycki <email address hidden> wrote:
> Robie: Yes, changing NTPDATE_USE_NTP_CONF=no makes everything work, at
> least when I change it after the node is deployed. I am not aware of how
> to try this with a preeseed late_command. Do you have instructions for
> me to attempt this?

I think you need to edit /usr/share/maas/preseeds/generic. Find the
preseed/late_command section.
Then, just before the final true, add another command with &&:

in-target sed -i 's/NTPDATE_USE_NTP_CONF=yes/NTPDATE_USE_NTP_CONF=no/'
/etc/default/ntpdate

BEFORE:
{{def post_scripts}}
# Executes late command and disables PXE.
d-i preseed/late_command string true && \
    in-target sh -c 'f=$1; shift; echo $0 > $f && chmod 0440 $f $*'
'ubuntu ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/maas && \
    in-target wget --no-proxy "{{node_disable_pxe_url|escape.shell}}"
--post-data "{{node_disable_pxe_data|escape.shell}}" -O /dev/null && \
    true
{{enddef}}

AFTER:
{{def post_scripts}}
# Executes late command and disables PXE.
d-i preseed/late_command string true && \
    in-target sh -c 'f=$1; shift; echo $0 > $f && chmod 0440 $f $*'
'ubuntu ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/maas && \
    in-target wget --no-proxy "{{node_disable_pxe_url|escape.shell}}"
--post-data "{{node_disable_pxe_data|escape.shell}}" -O /dev/null && \
    in-target sed -i
's/NTPDATE_USE_NTP_CONF=yes/NTPDATE_USE_NTP_CONF=no/'
/etc/default/ntpdate && \
    true
{{enddef}}

> Will this mean all newly-deployed MAAS nodes get
> this change?

Yup.