Skip to content

Commit be337d4

Browse files
authored
[bugfix]: allow loopback vrf migration from version 1_0_1 (sonic-net#737)
commit fe4446a fix loopback vrf migration. but the commit does not enable db migration from version 1_0_1. Now, bump version 1_0_2 and allow db fix from 1_0_1
1 parent 201132d commit be337d4

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

scripts/db_migrator.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, socket=None):
3535
none-zero values.
3636
build: sequentially increase within a minor version domain.
3737
"""
38-
self.CURRENT_VERSION = 'version_1_0_1'
38+
self.CURRENT_VERSION = 'version_1_0_2'
3939

4040
self.TABLE_NAME = 'VERSIONS'
4141
self.TABLE_KEY = 'DATABASE'
@@ -116,18 +116,26 @@ def version_unknown(self):
116116
# upgrade will take care of the subsequent migrations.
117117
self.migrate_pfc_wd_table()
118118
self.migrate_interface_table()
119-
self.set_version('version_1_0_1')
120-
return 'version_1_0_1'
121-
119+
self.set_version('version_1_0_2')
120+
return 'version_1_0_2'
122121

123122
def version_1_0_1(self):
124123
"""
125-
Current latest version. Nothing to do here.
124+
Version 1_0_1.
126125
"""
127126
log_info('Handling version_1_0_1')
128127

128+
self.migrate_interface_table()
129+
self.set_version('version_1_0_2')
129130
return None
130131

132+
def version_1_0_2(self):
133+
"""
134+
Current latest version. Nothing to do here.
135+
"""
136+
log_info('Handling version_1_0_2')
137+
138+
return None
131139

132140
def get_version(self):
133141
version = self.configDB.get_entry(self.TABLE_NAME, self.TABLE_KEY)

0 commit comments

Comments
 (0)