Version (k3OS / kernel)
k3os-30178 [~]$ k3os --version
k3os version v0.9.0
Architecture
armv7l
Describe the bug
k3os-30178 [~]$ cat /k3os/system/config.yaml
ssh_authorized_keys:
k3os:
dns_nameservers:
- 192.168.88.28
- 192.168.88.1
ntp_servers:
- 0.us.pool.ntp.org
- 1.us.pool.ntp.org
k3s_args:
- server
- "--cluster-init"
- "--server https://k3s.sud0.com:6443"
k3os-30178 [~]$ cat /etc/connman/main.conf
[General]
NetworkInterfaceBlacklist=veth
FallbackNameservers=192.168.88.28,192.168.88.1
FallbackTimeservers=0.us.pool.ntp.org,1.us.pool.ntp.org
k3os-30178 [~]$ sudo connmanctl clock
Time = 2868
TimeUpdates = auto
TimezoneUpdates = auto
Timeservers = [ ]
k3os-30178 [~]$ date -u
Thu Jan 1 00:48:00 UTC 1970
k3os-30178 [~]$ k3s server --cluster-init
INFO[0000] Preparing data dir /home/rancher/.rancher/k3s/data/39a08c3192d96b9e0e5f20e12690a943b118bfe386f1d3df65a573a7a317787d
FATA[1970-01-01T00:51:44.169221723Z] server time isn't set properly: 1970-01-01 00:51:44.168967964 +0000 UTC m=+1.411071037
To Reproduce
Expected behavior
I'm expecting k3os to sync to the ntp servers I specified in config.yaml. Not having the proper time prevents k3s from starting up.
Actual behavior
ntp does not appear to be fully configured, based on the output of "connmanctl clock"
Additional context
This being a raspberry pi, rtc is not present.
I've have also seen this on arm7l+ when on wifi but not ethernet when talking to the exact same router.
I worked around this in config.yaml:
boot_cmd:
- "ln -sf /etc/init.d/swclock /etc/runlevels/boot/swclock"
Starting the software clock service only approximates a solution. The k3os.ntp_servers entries should do the trick so long as they are reachable. Is there anything in the log from connman re: ntp? e.g.:
$ sudo grep ntp /var/log/messages
Feb 25 00:04:36 k3os-30792 daemon.info connmand[1486]: ntp: adjust (jump): +0.455572 sec
My guess is you won't see any such entries and connman is silently failing. If such is the case, try setting up a timeserver on your network (recent open-wrt will install chrony) and using that for k3os.ntp_servers.
Most helpful comment
I worked around this in config.yaml: