2

After I deployed Maas and Canonical Distribution of Openstack on a virtual environment (VMware ESXi), I found out that Maas server has a correct clock time while the nodes used for Openstack have different time. On VMware the NTP server is set with ntp.ubuntu.com.

enter image description here

enter image description here

From juju status I saw the container ntpmaster/0 and its ntp.conf is so configurated:

ubuntu@juju-eba318-3-lxd-1:~$ more /etc/ntp.conf
# juju generated ntp configuration
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery


restrict 127.0.0.1
restrict ::1
# SERVERS


# LOCAL time source
server 127.127.1.0
fudge 127.127.1.0 stratum 5

# PEERS 

why different clock?

1

I was having the same issue, and didn't figure out any "elegant" or "built-in" solution. So I just did a workaround:

On the file /etc/maas/preseeds/curtin_userdata, right after the lines:

late_commands:
maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null']

Add something like:

late_commands:
maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null']
setup_timezone_01: ["curtin", "in-target", "--", "sh", "-c", "rm /etc/localtime && ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime"]

... and adjust that Europe/Berlin to 'Europe/Rome` or wherever your controller is running on.

This way, maas will set (hardcode) the timezone into the target machine during the installation process.

Once again, probably not the best solution, but it does the job for me.

  • that solution works also on my situation. thanks. I hope someone correct that on MAAS. – Riccardo Magrini Jul 13 '17 at 10:42
0

Have you checked the timezone settings?

e.g.

$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 27 Jun 28 12:37 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC
$ cat /etc/timezone
Etc/UTC

If the configured timezone is different, you will get a different time.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.