Skip to content

Commit

Permalink
[bugfix]: allow loopback vrf migration from version 1_0_1 (sonic-net#737
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
lguohan authored Nov 14, 2019
1 parent 201132d commit be337d4
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, socket=None):
none-zero values.
build: sequentially increase within a minor version domain.
"""
self.CURRENT_VERSION = 'version_1_0_1'
self.CURRENT_VERSION = 'version_1_0_2'

self.TABLE_NAME = 'VERSIONS'
self.TABLE_KEY = 'DATABASE'
Expand Down Expand Up @@ -116,18 +116,26 @@ def version_unknown(self):
# upgrade will take care of the subsequent migrations.
self.migrate_pfc_wd_table()
self.migrate_interface_table()
self.set_version('version_1_0_1')
return 'version_1_0_1'

self.set_version('version_1_0_2')
return 'version_1_0_2'

def version_1_0_1(self):
"""
Current latest version. Nothing to do here.
Version 1_0_1.
"""
log_info('Handling version_1_0_1')

self.migrate_interface_table()
self.set_version('version_1_0_2')
return None

def version_1_0_2(self):
"""
Current latest version. Nothing to do here.
"""
log_info('Handling version_1_0_2')

return None

def get_version(self):
version = self.configDB.get_entry(self.TABLE_NAME, self.TABLE_KEY)
Expand Down

0 comments on commit be337d4

Please sign in to comment.