-
Notifications
You must be signed in to change notification settings - Fork 52
Update aro-dnsmasq-pre.sh.gotmpl #367
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
base: main
Are you sure you want to change the base?
Conversation
Update aro-dnsmasq-pre.sh to support more than one search domains - update AWK to exclude first line and include the rest, rather than than only print column 2, as well as update search domain list entry at aro-dns.conf to enable multiple search terms.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Scotchman0 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test unit |
|
@Scotchman0: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
The Unit test I believe is invalid for this change. The change appears to be getting rejected because it doesn't match expected state:
This change modifies the ignition files that we are using to check integrity of the platform during the test and so I submit this unit test is invalid and should be ignored. Thank you! |
|
Hi Thanks for this PR! We're working on fully deprecating and removing DNSMasq entirely in favor of Openshift functionality. That will land in ARO for installs at 4.21. If you feel strongly that we need this meanwhile let's have a meeting to discuss as the implications are non-trivial for the ARO team. |
Update aro-dnsmasq-pre.sh to support more than one search domains - update AWK to exclude first line and include the rest, rather than than only print column 2, as well as update search domain list entry at aro-dns.conf to enable multiple search terms.
Which issue this PR addresses:
Issue/Fixes: Azure/ARO-RP#4485
Issue/Fixes: https://issues.redhat.com/browse/ARO-22870 (this includes detailed testing/implementation and validation steps for this change as well and is accessible externally)
What this PR does / why we need it:
Problem: ARO clusters cannot utilize more than one search cluster-wide which is the default
cluster.domaingenerated entry. If any search in the list for a manual network configuration is injected that is NOT this cluster.domain address this value will override the search parameter for the cluster, breaking traffic flow.cluster.domainis required for healthy lookups, but secondary domains may be needed for streamlined traffic handling.This change adjusts the awk logic in selecting the search terms from "Select the first search entry in the list from the cloned /etc/resolv.conf.dnsmasq file before building the permanent /etc/resolv.conf file" to enable this value to get set with any/all search domains specified at install time (or day-2).. Additionally the aro-dns.conf file requires a list type to function with multiple values, and so the iteration must be used to facilitiate multiple value injects.
Test plan for issue:
How did you test that this PR works?
Cloned the script out, modified the target files from /etc/resolv.conf.dnsmasq to /tmp/resolv.conf.dnsmasq and /tmp/resolv.conf to avoid modifying live cluster config + executed. Validated the results include the test search parameters injected into /etc/NetworkManager/system-connections/eth0.nmconnection which specify additional test domains.
After validating, modified the live
/usr/local/bin/aro-dnsmasq-pre.shscript build after resetting/etc/resolv.conffrom/etc/resolv.conf.dnsmasqand re-executing the script.Subsequent tests involved updates to /etc/NetworkManager/system-connections/eth0.nmconnection to set values explicitly + restarting hosts to enable flow. (This makes machine-config unhappy because on-disk state has changed but this is inconsequential for testing).
Are there unit tests?
No
Are there integration/e2e tests?
No
If it is not possible to write automated tests, explain why and document how
to manually test and verify the feature.
The change can be tested easily by making the adjustments on the existing target script:
/usr/local/bin/aro-dnsmasq-pre.shand either comment out thecp -Z /etc/resolv.conf /etc/resolv.conf.dnsmasqline or copy the /etc/resolv.conf.dnsmasq file back over /etc/resolv.conf to start so that we reset our template back to defaults, then simply run the script:/usr/local/bin/aro-dnsmasq-pre.shwhich will update/etc/NetworkManager/conf.d/aro-dns.confand subsequently reload /etc/resolv.conf which will now reflect the desired multi-search parameter config.Is there any documentation that needs to be updated for this PR?
This is part of an effort to review/consider updating search domains within ARO - it is likely a docs update will be needed after review.
How do you know this will function as expected in production?