-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[dns] Add support for static DNS configuration. #14549
Conversation
This is the re-creation of #14239, which was closed by mistake |
@@ -0,0 +1,7 @@ | |||
#!/bin/bash | |||
|
|||
for container in $(docker ps -a --format=" {{ .ID }}"); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some containers like telemetry will start after 3 minutes.
If we upgrade SONiC image, and start the system for the first time, can we update /etc/resolv.conf in telemetry container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker ps -a
command returns all existing containers on the system. And we will update /etc/resolv.conf
file for all containers including those that are not running.
For the case when the container is created in the runtime (for example app extension), when the dockerd starts the container it copies /etc/resolv.conf
file from the host OS into the container filesystem. So, we will always have a valid DNS configuration inside the containers.
98861a8
to
42216df
Compare
…working reconfiguration in Linux. (sonic-net#13516)" (sonic-net#14902)" This reverts commit 72c52bc.
42216df
to
98a1fff
Compare
@ganglyu would you please refer to comments and help to approve? |
)" This reverts commit 475fe27.
)" This reverts commit 475fe27.
)" This reverts commit 475fe27.
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.
…c-net#14549)"" This reverts commit 43ca7d3.
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.
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.
@oleksandrivantsiv @ganglyu For me, this looks like a feature other than bug fix, if so, not to 202305. |
The feature was discussed for 202305 and hld was available for long time including PRs
The history is that it was reported as bug
The solution was to add config and handle it as a feature
It is nice to have in 202305, not must.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: StormLiangMS ***@***.***>
Sent: Sunday, August 6, 2023 5:22:44 PM
To: sonic-net/sonic-buildimage ***@***.***>
Cc: Liat Grozovik ***@***.***>; State change ***@***.***>
Subject: Re: [sonic-net/sonic-buildimage] [dns] Add support for static DNS configuration. (PR #14549)
@oleksandrivantsiv<https://github.com/oleksandrivantsiv> @ganglyu<https://github.com/ganglyu> For me, this looks like a feature other than bug fix, if so, not to 202305.
—
Reply to this email directly, view it on GitHub<#14549 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKTABA2B7D4OQINWPFM5NQTXT6SDJANCNFSM6AAAAAAWVWR4IY>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
@StormLiangMS can we finalize this? Should we backport the changes to 202305? Thanks, |
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.
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.
- Why I did it Add support for static DNS configuration. According to sonic-net/SONiC#1262 HLD. - How I did it Add a new resolv-config.service that is responsible for transferring configuration from Config DB into /etc/resolv.conf file that is consumed by various subsystems in Linux to resolve domain names into IP addresses. - How to verify it Run the image compilation. Each component related to the static DNS feature is covered with the unit tests. Run sonic-mgmt tests. Static DNS feature will be covered with the system tests. Install the image and run manual tests.
Highlight change, the DHCP config removed from master branch. files/image_config/resolv-config/resolv.conf Related work items: sonic-net#49, sonic-net#2598, sonic-net#11862, sonic-net#12530, sonic-net#14000, sonic-net#14549, sonic-net#14814, sonic-net#15077, sonic-net#15252, sonic-net#15253, sonic-net#15357, sonic-net#15384, sonic-net#15394, sonic-net#15399, sonic-net#15405, sonic-net#15566, sonic-net#15591, sonic-net#15592, sonic-net#15593, sonic-net#15602, sonic-net#15604, sonic-net#15611, sonic-net#15621, sonic-net#15625, sonic-net#15634, sonic-net#15635
Merge code from master to internal Related work items: sonic-net#32, sonic-net#49, sonic-net#376, sonic-net#2598, sonic-net#11862, sonic-net#12530, sonic-net#14000, sonic-net#14547, sonic-net#14549, sonic-net#14814, sonic-net#15077, sonic-net#15239, sonic-net#15252, sonic-net#15253, sonic-net#15298, sonic-net#15357, sonic-net#15384, sonic-net#15394, sonic-net#15399, sonic-net#15405, sonic-net#15511, sonic-net#15566, sonic-net#15583, sonic-net#15591, sonic-net#15592, sonic-net#15593, sonic-net#15602, sonic-net#15604, sonic-net#15611, sonic-net#15621, sonic-net#15625, sonic-net#15634, sonic-net#15635, sonic-net#15645, sonic-net#15646, sonic-net#15647, sonic-net#15657, sonic-net#15658, sonic-net#15697, sonic-net#15699
Why I did it
Add support for static DNS configuration. According to sonic-net/SONiC#1262 HLD.
How I did it
Add a new
resolv-config.service
that is responsible for transferring configuration from Config DB into/etc/resolv.conf
file that is consumed by various subsystems in Linux to resolve domain names into IP addresses.How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)