Error with old config

Hi,

I have a old Vyos I mean it is from 2017. Now we want to use this old config with latest vyos version.
But the latest Vyos version gives me an error message.
What are the meaning of this error message?

 load
Loading configuration from 'config.boot'
Traceback (most recent call last):
  File "/opt/vyatta/etc/config-migrate/migrate/conntrack/1-to-2", line 18, in <module>
    config = ConfigTree(config_file)
  File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 142, in __init__
    raise ValueError("Failed to parse config: {0}".format(msg))
ValueError: Failed to parse config: Node "nat source" has two children named "rule"

Migration script error: /opt/vyatta/etc/config-migrate/migrate/conntrack/1-to-2: Command '['/opt/vyatta/etc/config-migrate/migrate/conntrack/1-to-2', '/tmp/tmpcva4kaeu']' returned non-zero exit status 1..



Hi @tomcat667, could you share nat source config part and describe which exactly VyOS version is running?

Hi Dmitry,

more information about the old config and Vyos.



Version:          VyOS 999.201710100256
Built by:         autobuild@vyos.net
Built on:         Tue 10 Oct 2017 02:56 UTC

nat {
    destination {
        rule 10 {
            description "example"
            destination {
                address 10.10.10.60
                port 443
            }
            inbound-interface eth0
            log enable
            protocol tcp
            translation {
                address 192.168.1.1
                port 443
            }
        }
    } 
    source {
        rule 10 {
            description "example"
            outbound-interface eth0
            log enable
            protocol tcp
            source {
                address 192.168.1.1
                port 443
            }
            translation {
                address 10.10.10.60
                port 443
            }
        }
    }
    source {
        rule 100 {
            outbound-interface eth0
            source {
                address 192.168.0.0/16
            }
            translation {
                address masquerade
            }
        }
    }
}

First of all, just in case, make a backup/copy of config.boot file.
Then, edit it and delete second “source entry”


nat {
    destination {
        rule 10 {
            description "example"
            destination {
                address 10.10.10.60
                port 443
            }
            inbound-interface eth0
            log enable
            protocol tcp
            translation {
                address 192.168.1.1
                port 443
            }
        }
    } 
    source {
        rule 10 {
            description "example"
            outbound-interface eth0
            log enable
            protocol tcp
            source {
                address 192.168.1.1
                port 443
            }
            translation {
                address 10.10.10.60
                port 443
            }
        }
        rule 100 {
            outbound-interface eth0
            source {
                address 192.168.0.0/16
            }
            translation {
                address masquerade
            }
        }
    }
}

Hi,

thanks for your replay.

I remove the double entry so i can load the config file.
but the commit say no changes are made.
delete and copy the old config and reboot will do that. Any idea how to debug the old config?

Can you describe with more details what you are exactly doing and trying to achieve?
At first I understood that you tried importing and old configugiration (file config.boot from a 2017 version) into a newer, fresh install. Is this correct? What is the “new” VyOS version?
If so, depending on the full configuration, and the new vyos version you choose, you may need to do lots of corrections to the configuration.
Another approach is to do it though various system upgrades: VyOS 999.201710100256 → VyOs 1.1.8 → VyOs 1.2.X → VyOS 1.3.X → VyOS 1.4.X

1 Like

Hi my goal is running the old configuration with a new Vyos 1.4.x. Rolling release from two weeks ago.
I am aware that this is only possible with adjustments to the configuration from 2017. But the configuration changes are not really easy for me to debug.

upgrade with various Vyos version is ok for me. Anyway to get the old versions? I can´t find a download archive for old versions.