首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maas服务器及其节点上的不同时钟时间

Maas服务器及其节点上的不同时钟时间
EN

Ask Ubuntu用户
提问于 2017-06-29 08:43:24
回答 1查看 806关注 0票数 2

在虚拟环境(VMware ESXi)上部署了Openstack的Maas和规范分布之后,我发现Maas服务器有一个正确的时钟时间,而用于Openstack的节点有不同的时间。在VMware上,NTP服务器是用ntp.ubuntu.com设置的。

从juju状态来看,我看到容器ntpmaster/0及其ntp.conf是如此配置的:

代码语言:javascript
复制
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 

为什么是不同的钟?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2017-07-11 15:56:58

我也有同样的问题,没有找到任何“优雅”或“内置”的解决方案。所以我做了个解决办法:

/etc/maas/preseeds/curtin_userdata文件中,就在行之后:

代码语言:javascript
复制
late_commands:
maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null']

添加如下内容:

代码语言:javascript
复制
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"]

..。并将该Europe/Berlin调整为“欧洲/罗马”或控制器运行的任何位置。

这样,maas将在安装过程中将时区设置到目标计算机中。

再一次,也许不是最好的解决方案,但它做了我的工作。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/930191

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档