Config load error - 1.4 rolling

Latest 1.4 rolling.

Go into configure, load the current config and get the following error

“Loading configuration from ‘config.boot’
Traceback (most recent call last):
File “/usr/libexec/vyos/vyos-load-config.py”, line 86, in
virtual_migration.run()
File “/usr/lib/python3/dist-packages/vyos/migrator.py”, line 213, in run
cfg_versions = self.read_config_file_versions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/vyos/migrator.py”, line 65, in read_config_file_versions
cfg_versions = component_version.from_file(cfg_file, vintage=‘vyos’)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/vyos/component_version.py”, line 80, in from_file
version_dict = from_string(line_in_config, vintage=vintage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/vyos/component_version.py”, line 57, in from_string
raise ValueError(f"malformed configuration string: {string_line}”)
ValueError: malformed configuration string: // vyos-config-version: “bgp@3:broadcast-relay@1:cluster@1:config-management@1:conntrack@3:conntrack-sync@2:container@1:dhcp-relay@2:dhcp-server@6:dhcpv6-server@1:dns-forwarding@4:firewall@9:flow-accounting@1:https@4:ids@1:interfaces@28:ipoe-server@1:ipsec@12:isis@2:l2tp@4:lldp@1:mdns@1:”

@phillipmcmahon Assuming that you have updated from an earlier image, this issue was observed and fixed recently:
https://vyos.dev/T5136
To update from an image before this fix (should one encounter the problem; sightings have been rare), one should explicitly sync before the reboot into the new image.

Thanks for the reply, I don’t quite get what you mean by “explicitly sync before the reboot into the new image.”

I.e. what do I need to do to clear this error?

Before rebooting into the new image, issue the command ‘sync’.

That isn’t fixing my issue unfortunately.

I did the standard “add system image https://s3-us.vyos.io/rolling/current/vyos-rolling-latest.iso

Once completed I issued the “sync” command. Rebooted.

On “configure - load” I get the same error.

“Loading configuration from ‘config.boot’
Traceback (most recent call last):
File “/usr/libexec/vyos/vyos-load-config.py”, line 86, in
virtual_migration.run()
File “/usr/lib/python3/dist-packages/vyos/migrator.py”, line 213, in run
cfg_versions = self.read_config_file_versions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/vyos/migrator.py”, line 65, in read_config_file_versions
cfg_versions = component_version.from_file(cfg_file, vintage=‘vyos’)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/vyos/component_version.py”, line 80, in from_file
version_dict = from_string(line_in_config, vintage=vintage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/vyos/component_version.py”, line 57, in from_string
raise ValueError(f"malformed configuration string: {string_line}”)
ValueError: malformed configuration string: // vyos-config-version: “bgp@3:broadcast-relay@1:cluster@1:config-management@1:conntrack@3:conntrack-sync@2:container@1:dhcp-relay@2:dhcp-server@6:dhcpv6-server@1:dns-forwarding@4:firewall@9:flow-accounting@1:https@4:ids@1:interfaces@28:ipoe-server@1:ipsec@12:isis@2:l2tp@4:lldp@1:mdns@1:”

The version line appears to be incomplete, in the error message, at least. Before the reboot, if you view the config file itself, is the string complete ? Also, out of curiosity, why are you loading the config file explicitly ? (edited)

It looks incomplete as well, and I was wrongly assuming that an update would rewrite its own “new” configuration string.

Loading my own config is a quick way to see if after an update the active config is the same as the config stored in config.boot by then doing a compare. Or at least I think it is… :slight_smile:

Can you simply insert a fully formed config string from a vanilla install of 1.4-rolling form a VM?

Just to confirm, as I edited the previous comment: I was curious about the ‘health’ of the existing config file before the reboot — as that will be the first step.

Regarding the question: migration of the config file takes place at boot, so you want the correct version string for the config from the original image, before rebooting to a new image. So, in the original image, in config mode, re-save the config, exit config mode, check the config file, ‘sync’ (just for the heck of it), ‘add system image’, ‘sync’, reboot.

The intermittent issue, that seems to have emerged (or at least first noticed) since the move to debian bookworm, has been addressed as above, in the case I’m familiar with.

Thanks for the help here. It’s appreciated.

I don’t have any version history on my setup (lessons for the future…), just a rolling image with a corrupted configuration string. The rest of the file looks fine on inspection, and my network is working as expected.

I’ve got the config string from the latest rolling, of which my vyos installation is the same version. I will manually add this to the bottom of my config and see how I get on…

Update - adding in the fully formed config string from the latest rolling release is still throwing the same error. What obvious thing am I missing…?

“problem solved”

I upgraded a 1.3.2 LTS image I had still on the system. Updated the config to reflect my 1.4-rolling changes and all is well with my vyos config once again.

Thanks again.

Great to hear; thanks for the update. Following discussions with a colleague, it was suggested that the source may well have been a buggy kernel version along the way, which makes some sense.

1 Like