-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Static DNS HLD #1262
Static DNS HLD #1262
Conversation
eb40b21
to
49aba25
Compare
Hi @oleksandrivantsiv |
@oleksandrivantsiv |
@ganglyu I didn't add support for static DNS configuration into minigraph.py, but it is something we can do. |
@ganglyu can we update the minigraph.py in the second stage? The available changes are completely independent of the minigrapth and can be pushed independently. We will prioritize this for Apr. |
sure |
@ganglyu can you please approve this PR if you are ok with the proposed design? I'll open another PR with the minigrapth related changes. |
- 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.
…DNS configuration changes. (#49) Changes are implemented according to sonic-net/SONiC#1262 HLD. Implement unit tests for each method of DnsCfg class.
- What I did Implement config and show commands for static DNS feature. According to sonic-net/SONiC#1262 HLD. - How I did it Static DNS config commands are implemented in the new config/dns.py file. DNS config commands are available under config dns ... sub-command. Show commands are implemented in the new show/dns.py file. DNS show commands are available under show dns ... sub-command. - How to verify it Compile sonic-utilities package. The unit tests will run automatically during the compilation. Coverage for config/dns.py : 94% Coverage for show/dns.py : 86% - 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) # config dns nameserver add 1.1.1.1 # config dns nameserver add 8.8.8.8 # show dns nameserver Nameserver ------------ 1.1.1.1 8.8.8.8
) - What I did Implement config and show commands for static DNS feature. According to sonic-net/SONiC#1262 HLD. - How I did it Static DNS config commands are implemented in the new config/dns.py file. DNS config commands are available under config dns ... sub-command. Show commands are implemented in the new show/dns.py file. DNS show commands are available under show dns ... sub-command. - How to verify it Compile sonic-utilities package. The unit tests will run automatically during the compilation. Coverage for config/dns.py : 94% Coverage for show/dns.py : 86% - 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) # config dns nameserver add 1.1.1.1 # config dns nameserver add 8.8.8.8 # show dns nameserver Nameserver ------------ 1.1.1.1 8.8.8.8
@oleksandrivantsiv new feature, pls wait for next branch cut. |
- 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.
@oleksandrivantsiv Can you please update the Quality Metric (Alpha/Beta/GA) for the feature either in this PR comments or in HLD itself based on https://github.com/sonic-net/SONiC/blob/master/doc/SONiC%20feature%20quality%20definition.md |
The access to the DNS in SONiC is organized via the resolver configuration file (/etc/resolv.conf). resolv.conf is the plain text file that contains the human-readable configuration. It is used across various subsystems in the SONiC to translate domain names into IP addresses.
With the current implementation dynamic DNS configuration can be received from the DHCP server or static configuration can be set manually by the user. However, SONiC doesn't provide any protection for the static configuration. The configuration that is set by the user can be overwritten with the dynamic configuration at any time.
The proposed solution is to add support for static DNS configuration into Config DB. To be able to choose between dynamic and static DNS configurations
resolvconf
package.