diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-12-14 06:13:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-14 06:13:56 +0200 |
| commit | 788d43574f600fda827a0d18e7fd89e783c7b5a7 (patch) | |
| tree | 4842e400fecaa3a33eeb0bfcdbd89dc61100821a | |
| parent | 3dc0d09da1ad082bfcebdc753d10847c3142c972 (diff) | |
| parent | 72ca8476e2ef69d048e86a37027fd27910972a32 (diff) | |
| download | vyos-1x-788d43574f600fda827a0d18e7fd89e783c7b5a7.tar.gz vyos-1x-788d43574f600fda827a0d18e7fd89e783c7b5a7.zip | |
Merge pull request #4898 from c-po/isis-fix
isis: T8094: bugfix config migration from 1.3.0-rc1 -> 1.4
| -rw-r--r-- | smoketest/configs/isis-small | 6 | ||||
| -rw-r--r-- | src/migration-scripts/isis/0-to-1 | 20 |
2 files changed, 17 insertions, 9 deletions
diff --git a/smoketest/configs/isis-small b/smoketest/configs/isis-small index 79a2f042f..b93a18549 100644 --- a/smoketest/configs/isis-small +++ b/smoketest/configs/isis-small @@ -57,7 +57,7 @@ policy { } } protocols { - isis { + isis FOO { interface eth1 { bfd } @@ -126,5 +126,5 @@ system { // Warning: Do not remove the following line. -// vyos-config-version: "broadcast-relay@1:cluster@1:config-management@1:conntrack@3:conntrack-sync@2:dhcp-relay@2:dhcp-server@6:dhcpv6-server@1:dns-forwarding@3:firewall@5:https@2:interfaces@22:ipoe-server@1:ipsec@5:isis@1:l2tp@3:lldp@1:mdns@1:nat@5:ntp@1:pppoe-server@5:pptp@2:qos@1:quagga@8:rpki@1:salt@1:snmp@2:ssh@2:sstp@3:system@21:vrrp@2:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2:zone-policy@1" -// Release version: 1.3.0 +// vyos-config-version: "broadcast-relay@1:cluster@1:config-management@1:conntrack@1:conntrack-sync@1:dhcp-relay@2:dhcp-server@5:dhcpv6-server@1:dns-forwarding@3:firewall@5:https@2:interfaces@18:ipoe-server@1:ipsec@5:l2tp@3:lldp@1:mdns@1:nat@5:ntp@1:pppoe-server@5:pptp@2:qos@1:quagga@7:rpki@1:salt@1:snmp@2:ssh@2:sstp@3:system@20:vrrp@2:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2:zone-policy@1" +// Release version: 1.3.0-rc1 diff --git a/src/migration-scripts/isis/0-to-1 b/src/migration-scripts/isis/0-to-1 index 052dbc8a8..3a9735d29 100644 --- a/src/migration-scripts/isis/0-to-1 +++ b/src/migration-scripts/isis/0-to-1 @@ -24,13 +24,21 @@ def migrate(config: ConfigTree) -> None: # Nothing to do return - # We need a temporary copy of the config - tmp_base = ['protocols', 'isis2'] - config.copy(base, tmp_base) + if not config.is_tag(base): + # Nothing to do + exit(0) + + # Get IS-IS domain ID + domain_id = config.list_nodes(base) + if domain_id: + # We need a temporary copy of the config + tmp_base = ['protocols', 'isis2'] + config.copy(base + domain_id, tmp_base) # Now it's save to delete the old configuration config.delete(base) - # Rename temporary copy to new final config (IS-IS domain key is static and no - # longer required to be set via CLI) - config.rename(tmp_base, 'isis') + # Rename temporary node to new final config (IS-IS domain key is static and + # no longer required to be set via CLI) + if config.exists(tmp_base): + config.rename(tmp_base, 'isis') |
