Page MenuHomePhabricator

BGP redistribute static not migrated on upgrade
Closed, ResolvedPublicBUG


Just did an upgrade from 1.1.8 to 1.2.0-rc10 with BGP and redistribute static configured.
The network settings are nicely migrated from protocols bgp 65001 network to protools bgp 65001 address-family ipv4-unicast network.
The redistribute static is not migrated. Adding it again in the new location makes it work.


Difficulty level
Normal (likely a few hours)
Why the issue appeared?
Implementation mistake
Merijn created this task.Dec 17 2018, 9:24 PM

With the following patch the statements are migrated. Needs some work to also migrate the metric and route-map settings. Will try to do that later.

--- 2-to-3.orig 2018-12-17 22:28:02.630000000 +0000
+++ 2-to-3      2018-12-17 22:24:34.490000000 +0000
@@ -178,6 +178,17 @@
         for peer_group in peer_groups:
             migrate_neighbor(config, peer_group_path, peer_group)

+    ## Migrate redistribute statements
+    redistribute_path = ['protocols', 'bgp', asn, 'redistribute']
+    if config.exists(redistribute_path):
+        config.set(bgp_path + af_path + ['redistribute'])
+        redistributes = config.list_nodes(redistribute_path)
+        for redistribute in redistributes:
+            config.set(bgp_path + af_path + ['redistribute', redistribute])
+        config.delete(redistribute_path)
         with open(file_name, 'w') as f:
syncer assigned this task to dmbaturin.Dec 21 2018, 10:29 AM
syncer triaged this task as Unbreak Now! priority.
syncer edited projects, added VyOS 1.2 Crux ( VyOS 1.2.0-EPA); removed VyOS 1.2 Crux.
pasik added a subscriber: pasik.Dec 22 2018, 10:04 AM

Hey @Merijn, sorry for late reply and thanks for the patch! I've merged it in and it will be in the next nightly build.

dmbaturin renamed this task from redistribute static not migrated on upgrade to BGP redistribute static not migrated on upgrade.Dec 31 2018, 11:58 AM
dmbaturin changed the task status from Open to Needs testing.
dmbaturin changed Why the issue appeared? from Will be filled on close to Implementation mistake.

Oh, you forgot metric and route-map options. Extending your patch to support them wasn's hard though, most of the work was already done.

Hi, yeah i was planning on adding it later. Thanks.

syncer closed this task as Resolved.Jan 12 2019, 7:17 PM
syncer moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.0-EPA3) board.
syncer added a project: VyOS-1.2.0-GA.