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

[db_migrator] Migrate DNS configuratuion #2893

Merged
merged 9 commits into from
Jul 12, 2023
Merged

Conversation

ganglyu
Copy link
Contributor

@ganglyu ganglyu commented Jul 5, 2023

What I did

sonic-net/sonic-buildimage#14549
This PR has introduced DNS configuration to CONFIG_DB, we need to migrate original CONFIG_DB to support DNS configuration during upgrading SONiC.

Microsoft ADO: 24408420

How I did it

If there's no DNS_NAMESERVER table in CONFIG_DB, read DNS_NAMESERVER table from minigraph and update CONFIG_DB.

How to verify it

Run unit test for db migrator.

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)

@ganglyu ganglyu requested a review from qiluo-msft July 5, 2023 11:11
@qiluo-msft qiluo-msft requested a review from vaibhavhd July 5, 2023 23:00
tests/db_migrator_test.py Outdated Show resolved Hide resolved
vaibhavhd
vaibhavhd previously approved these changes Jul 5, 2023
Copy link
Contributor

@vaibhavhd vaibhavhd left a comment

Choose a reason for hiding this comment

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

Non blocking comments added.

@qiluo-msft
Copy link
Contributor

Did you manually tested the workflow of https:/sonic-net/SONiC/wiki/L2-Switch-mode?

qiluo-msft
qiluo-msft previously approved these changes Jul 6, 2023
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

LGTM. Please check with other reviewers.

@@ -1007,6 +1019,8 @@ def version_4_0_3(self):
This is the latest version for master branch
"""
log.log_info('Handling version_4_0_3')
# Updating DNS nameserver
self.migrate_dns_nameserver()
Copy link
Contributor

Choose a reason for hiding this comment

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

You updated the existing version, but did not create a new version.

Please add new version handler here as a placeholder.

Also, when you do that please also update the self.CURRENT_VERSION to the new version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

tests/db_migrator_test.py Show resolved Hide resolved
@qiluo-msft qiluo-msft self-requested a review July 6, 2023 19:10
@qiluo-msft qiluo-msft dismissed their stale review July 6, 2023 19:10

Add new comment.

@vaibhavhd
Copy link
Contributor

Please do not merge this change until #2895 is merged.

2895 fixes an issue where CURRENT_VERSION is not updated.

@ganglyu ganglyu requested a review from vaibhavhd July 11, 2023 07:50
@qiluo-msft
Copy link
Contributor

Please resolve the conflict.

qiluo-msft
qiluo-msft previously approved these changes Jul 11, 2023
@ganglyu ganglyu requested a review from qiluo-msft July 12, 2023 00:56
@ganglyu
Copy link
Contributor Author

ganglyu commented Jul 12, 2023

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ganglyu ganglyu merged commit 1ee7366 into sonic-net:master Jul 12, 2023
4 checks passed
@StormLiangMS
Copy link
Contributor

@ganglyu do we have ADO for this?

qiluo-msft pushed a commit that referenced this pull request Jul 20, 2023
…to version 4_0_1 (#2912)

#### What I did

In PR #2893 the db_migrator "migrate_dns_nameserver" was misplaced in the latest version being version 4_0_4 instead of being placed in version 4_0_3. 

Additionally, the log info for version 4_0_1 was missing as well
rajkumar38 pushed a commit to rajkumar38/sonic-utilities that referenced this pull request Jul 25, 2023
What I did
sonic-net/sonic-buildimage#14549
This PR has introduced DNS configuration to CONFIG_DB, we need to migrate original CONFIG_DB to support DNS configuration during upgrading SONiC.

How I did it
If there's no DNS_NAMESERVER table in CONFIG_DB, read DNS_NAMESERVER table from minigraph and update CONFIG_DB.

How to verify it
Run unit test for db migrator.
rajkumar38 pushed a commit to rajkumar38/sonic-utilities that referenced this pull request Jul 25, 2023
…to version 4_0_1 (sonic-net#2912)

#### What I did

In PR sonic-net#2893 the db_migrator "migrate_dns_nameserver" was misplaced in the latest version being version 4_0_4 instead of being placed in version 4_0_3. 

Additionally, the log info for version 4_0_1 was missing as well
rajkumar38 pushed a commit to rajkumar38/sonic-utilities that referenced this pull request Jul 25, 2023
What I did
sonic-net/sonic-buildimage#14549
This PR has introduced DNS configuration to CONFIG_DB, we need to migrate original CONFIG_DB to support DNS configuration during upgrading SONiC.

How I did it
If there's no DNS_NAMESERVER table in CONFIG_DB, read DNS_NAMESERVER table from minigraph and update CONFIG_DB.

How to verify it
Run unit test for db migrator.
pdhruv-marvell pushed a commit to pdhruv-marvell/sonic-utilities that referenced this pull request Aug 23, 2023
What I did
sonic-net/sonic-buildimage#14549
This PR has introduced DNS configuration to CONFIG_DB, we need to migrate original CONFIG_DB to support DNS configuration during upgrading SONiC.

How I did it
If there's no DNS_NAMESERVER table in CONFIG_DB, read DNS_NAMESERVER table from minigraph and update CONFIG_DB.

How to verify it
Run unit test for db migrator.
pdhruv-marvell pushed a commit to pdhruv-marvell/sonic-utilities that referenced this pull request Aug 23, 2023
…to version 4_0_1 (sonic-net#2912)

#### What I did

In PR sonic-net#2893 the db_migrator "migrate_dns_nameserver" was misplaced in the latest version being version 4_0_4 instead of being placed in version 4_0_3. 

Additionally, the log info for version 4_0_1 was missing as well
rajkumar38 pushed a commit to rajkumar38/sonic-utilities that referenced this pull request Aug 28, 2023
What I did
sonic-net/sonic-buildimage#14549
This PR has introduced DNS configuration to CONFIG_DB, we need to migrate original CONFIG_DB to support DNS configuration during upgrading SONiC.

How I did it
If there's no DNS_NAMESERVER table in CONFIG_DB, read DNS_NAMESERVER table from minigraph and update CONFIG_DB.

How to verify it
Run unit test for db migrator.
@StormLiangMS
Copy link
Contributor

@ganglyu is this an enhancement? If yes, no for backport to 202305

@dgsudharsan
Copy link
Collaborator

Removing the cherry-pick tag since the feature of DNS is not part of 202305

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.

6 participants