My 1.3 /config/config.boot
has this in the system
block:
ntp {
server time1.google.com
server time2.google.com
server time3.google.com
server time.example.com {
prefer {
}
}
}
On upgrade to a 1.4, config migration breaks, leaving this error in /tmp/boot-config-trace
:
Traceback (most recent call last):
File "/usr/libexec/vyos/vyos-boot-config-loader.py", line 141, in <module>
load_out = session.load_config(file_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 200, in load_config
out = self.__run_command(LOAD_CONFIG + [file_path])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 143, in __run_command
raise ConfigSessionError(output)
vyos.configsession.ConfigSessionError: Invalid config file (syntax error): error at line 318, text [.]
Failed to parse specified config file
Line 318 in the new /config/config.boot
is in the middle of the ntp
block in service
:
312 ntp {
313 allow-client {
314 address "0.0.0.0/0"
315 address "::/0"
316 }
317 server {
318 time.example.com {
319 prefer
320 }
321 }
322 }
I found that if I go back to 1.3 and remove and re-add the server with prefer
, I get a slightly different config.boot
without the empty { }
after prefer
. And this config correctly migrates to 1.4.