Bug 2024826: Allow resolv prepender without default search domain#2835
Conversation
Commit e1fbf07 introduced a regression where the local nameserver was only prepended to the list of nameservers when the NM generated `resolv.conf` had a default search domain. This commit fix the regex to look for nameservers rather than search domain, and makes the script a little more robust by using start of line anchor in regexes.
|
@mandre: This pull request references Bugzilla bug 2024826, which is invalid:
Comment DetailsIn response to this:
Instructions 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/test-infra repository. |
|
/bugzilla refresh |
|
@mandre: This pull request references Bugzilla bug 2024826, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions 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/test-infra repository. |
|
Hi @cybertron, can you PTAL at this bug fix for your recent change #2835. We're unable to deploy OCP on clouds that don't provide a default search domain via DHCP. |
|
/retest-required |
|
/lgtm |
|
/lgtm I tested this locally and it still does what we need for baremetal, so should be good to go. Thanks for the fix! |
|
This needs an approval. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cybertron, EmilienM, mandre, sinnykumari The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
@mandre: The following tests 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/test-infra repository. I understand the commands that are listed here. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
This is blocking me. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
@mandre: All pull requests linked via external trackers have merged: Bugzilla bug 2024826 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions 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/test-infra repository. |
In openshift#2835, we changed how the prepender finds the location to insert the prepended nameserver. Unfortunately, this caused it to prepend the nameserver before each existing nameserver line, which results in duplicate entries for the local nameserver. For example: search ostest.test.metalkube.org nameserver 192.168.111.23 nameserver 8.8.8.8 nameserver 192.168.111.23 This is mildly problematic since it pushes the second nameserver out of the list of 3 that are allowed. In general this probably won't cause problems because only the local nameserver is actually used, but it looks weird and will almost certainly result in a bug report from customers at some point. The replacement sed line is stolen from [0] and is specific to GNU sed, but that shouldn't be a problem for us since we only use that version of sed. 0: https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only
|
/cherry-pick release-4.9 |
|
@creydr: #2835 failed to apply on top of branch "release-4.9": DetailsIn response to this:
Instructions 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/test-infra repository. |
In openshift#2835, we changed how the prepender finds the location to insert the prepended nameserver. Unfortunately, this caused it to prepend the nameserver before each existing nameserver line, which results in duplicate entries for the local nameserver. For example: search ostest.test.metalkube.org nameserver 192.168.111.23 nameserver 8.8.8.8 nameserver 192.168.111.23 This is mildly problematic since it pushes the second nameserver out of the list of 3 that are allowed. In general this probably won't cause problems because only the local nameserver is actually used, but it looks weird and will almost certainly result in a bug report from customers at some point. The replacement sed line is stolen from [0] and is specific to GNU sed, but that shouldn't be a problem for us since we only use that version of sed. 0: https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only (cherry picked from commit 88713b7)
In openshift#2835, we changed how the prepender finds the location to insert the prepended nameserver. Unfortunately, this caused it to prepend the nameserver before each existing nameserver line, which results in duplicate entries for the local nameserver. For example: search ostest.test.metalkube.org nameserver 192.168.111.23 nameserver 8.8.8.8 nameserver 192.168.111.23 This is mildly problematic since it pushes the second nameserver out of the list of 3 that are allowed. In general this probably won't cause problems because only the local nameserver is actually used, but it looks weird and will almost certainly result in a bug report from customers at some point. The replacement sed line is stolen from [0] and is specific to GNU sed, but that shouldn't be a problem for us since we only use that version of sed. 0: https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only (cherry picked from commit 88713b7)
In openshift#2835, we changed how the prepender finds the location to insert the prepended nameserver. Unfortunately, this caused it to prepend the nameserver before each existing nameserver line, which results in duplicate entries for the local nameserver. For example: search ostest.test.metalkube.org nameserver 192.168.111.23 nameserver 8.8.8.8 nameserver 192.168.111.23 This is mildly problematic since it pushes the second nameserver out of the list of 3 that are allowed. In general this probably won't cause problems because only the local nameserver is actually used, but it looks weird and will almost certainly result in a bug report from customers at some point. The replacement sed line is stolen from [0] and is specific to GNU sed, but that shouldn't be a problem for us since we only use that version of sed. 0: https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only (cherry picked from commit 88713b7)
Commit e1fbf07 introduced a regression where the local nameserver was
only prepended to the list of nameservers when the NM generated
resolv.confhad a default search domain.This commit fix the regex to look for nameservers rather than search
domain, and makes the script a little more robust by using start of
line anchor in regexes.