From 48f17b391a559a11cae30ad28527434c31c1c7d0 Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Wed, 2 Sep 2020 14:29:50 +0800 Subject: [PATCH] Fix a typo in mellanox_buffer_migrator This type causes the db_migrator to update the buffer profiles even if they don't match the default Signed-off-by: Stephen Sun --- scripts/mellanox_buffer_migrator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/mellanox_buffer_migrator.py b/scripts/mellanox_buffer_migrator.py index bc8cc6382b..40b96d4704 100644 --- a/scripts/mellanox_buffer_migrator.py +++ b/scripts/mellanox_buffer_migrator.py @@ -354,7 +354,7 @@ def mlnx_migrate_buffer_profile(self, old_version, new_version): return True for name, profile in buffer_profile_old_configure.iteritems(): - if name in buffer_profile_conf.keys() and profile == buffer_profile_old_configure[name]: + if name in buffer_profile_conf.keys() and profile == buffer_profile_conf[name]: continue # return if any default profile isn't in cofiguration log.log_notice("Default profile {} isn't in database or doesn't match default value".format(name)) @@ -363,3 +363,5 @@ def mlnx_migrate_buffer_profile(self, old_version, new_version): for name, profile in buffer_profile_new_configure.iteritems(): log.log_info("Successfully migrate profile {}".format(name)) self.configDB.set_entry('BUFFER_PROFILE', name, profile) + + return True