Page MenuHomeVyOS Platform

[1.3.x -> 1.5.x] migrating threw exception in /opt/vyatta/etc/config-migrate/migrate/https/5-to-6, performed workaround
Closed, ResolvedPublicBUG

Description

VyOS booted with a migration exception in /opt/vyatta/etc/config-migrate/migrate/https/5-to-6. The error reproduces with my pre-migration configuration which was valid under 1.3-rolling-202302030433.

vyos@vyos:/config$ /opt/vyatta/etc/config-migrate/migrate/https/5-to-6 ~/test.config
Traceback (most recent call last):
  File "/opt/vyatta/etc/config-migrate/migrate/https/5-to-6", line 48, in <module>
    domain_names = config.return_values(base + ['certificates', 'certbot', 'domain-name'])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 305, in return_values
    raise ConfigTreeError("Path [{}] doesn't exist".format(path_str))
vyos.configtree.ConfigTreeError: Path [b'service https certificates certbot domain-name'] doesn't exist

Snippet from pre-migration config file:

service {
    https {
        api {
            keys {
                id default {
                    key privatekey
                }
            }
        }
        certificates {
            system-generated-certificate {
                lifetime 3000
            }
        }
        virtual-host vh0 {
            listen-address 10.2.0.1
            listen-port 443
        }
    }
...
}

Excising this snippet worked around the problem.

version:

Version:          VyOS 1.5-rolling-202401260023
Release train:    current

Built by:         [email protected]
Built on:         Fri 26 Jan 2024 02:16 UTC
Build UUID:       a910324d-c275-44d3-b026-bde38781fd97
Build commit ID:  6c6a5856122790

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  HP
Hardware model:   HP EliteDesk 800 G5 Desktop Mini
Hardware S/N:     MXL95025NY
Hardware UUID:    800b5dc3-e6c8-ba65-0bcb-dc6bfdfbccb2

Copyright:        VyOS maintainers and contributors

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.5-rolling-202401260023
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Config syntax change (non-migratable)
Issue type
Bug (incorrect behavior)