Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copp Changes #1004

Merged
merged 11 commits into from
Nov 12, 2020
Merged

Copp Changes #1004

merged 11 commits into from
Nov 12, 2020

Conversation

dgsudharsan
Copy link
Collaborator

- What I did
Added DB migrator script for removing old copp APP DB entries.
Added warm-boot/fast-boot logic to remove Copp entries during warm-boot

- How I did it
Modified db_migrator script and incremented version

- How to verify it
Verify by performing warm-reboot from an existing version to new version with latest copp changes

- Previous command output (if the output of a command-line utility has changed)

- New command output (if the output of a command-line utility has changed)

@vadymhlushko-mlnx
Copy link
Contributor

Hi, @dgsudharsan! Could you please tell me when do you plan to resolve conflicts?
scripts/db_migrator.py


self.migrate_copp_table()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets have copp table migration as part of 1_0_4? and set new as 1_0_5

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

202006 version had the release version as 1_0_3. Is it ok to bump up the version twice to 1_0_5 between releases?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can have this part of the current version so as to execute this always

Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting review from Ying, Guohan. @yxieca , could you please check the migration path for Copp tables?

"""
log.log_info('Handling version_1_0_4')

self.migrate_copp_table()
return None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please upgrade to version_1_0_5 and create function version_1_0_5 with previous code in version_1_0_4. You need to mark that upgrade is done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a discussion with @yxieca . @dgsudharsan, can we do it as part of an outer function so that this is called always instead of copying to each later versions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. after offline discussion. I think we need to put 'always apply at latest version' operations after the main upgrade loop.

@@ -247,6 +260,7 @@ def common_migration_ops(self):
# Update all tables that do not exist in configDB but are present in INIT_CFG
for init_table_key, init_table_val in table_val.items():
self.configDB.set_entry(init_cfg_table, init_table_key, init_table_val)
self.migrate_copp_table()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an extra line

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -247,6 +247,14 @@ function backup_database()
end
end
" 0 > /dev/null
# Delete COPP_TABLE keys in APPL_DB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, we can remove this section

@dgsudharsan
Copy link
Collaborator Author

retest this please

2 similar comments
@prsunny
Copy link
Contributor

prsunny commented Nov 12, 2020

retest this please

@dgsudharsan
Copy link
Collaborator Author

retest this please

@prsunny prsunny merged commit dadfc18 into sonic-net:master Nov 12, 2020
@dgsudharsan dgsudharsan deleted the copp_changes branch March 9, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants