Bug 2013726: [on-prem] Update NetworkManager-resolv-prepender.yaml#2790
Bug 2013726: [on-prem] Update NetworkManager-resolv-prepender.yaml#2790Rupesh-git-eng wants to merge 2 commits intoopenshift:masterfrom
Conversation
Empty variables cause of generating whitespace in /etc/resolv.conf between search and search domains.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Rupesh-git-eng 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 |
|
@Rupesh-git-eng just double checking: is this related to a bug? |
|
It's not clear to me what we're trying to achieve here. Is it a cosmetic change? |
Yes. |
I would say both... Unfortunately, I don't have a test environment to test this and I was looking for a way to test it. |
@Rupesh-git-eng can you link to the bug ? |
Attached above. |
|
/bugzilla refresh |
|
@sinnykumari: Bugzilla bug 2013726 is in a bug group that is not in the allowed groups for this repo.
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 |
|
@sinnykumari: Bugzilla bug 2013726 is in a bug group that is not in the allowed groups for this repo.
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. |
Not sure, why this is complaining. |
|
/uncc |
It complains because the bug is private. This looks like a dup of #2823, @cybertron do you confirm? |
|
It's not exactly a dupe, but #2823 will also fix this. I would prefer to just merge that because it also fixes another bug. I'm also not entirely sure about all of the changes in this patch. My understanding when we added IP4 and IP6_DOMAINS was that they were supposed to include DHCP-provided nameservers (see bbbb722#diff-255f8a4599166f31961853ea8626f969ca4231c55aacbc20a5bb3ceb640f911d). One side benefit of #2823 is that we just use what NetworkManager provides instead of having to come up with a complete list ourselves. That should result in less surprising behavior and eliminate questions like this. |
|
adding a hold until the above is resolved. /hold |
|
@Rupesh-git-eng: 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. |
|
Note that #2823 has merged so the bug being addressed by this should be fixed. Even if we do need an additional patch, this one won't work because the other PR changed how the domain list is built. |
Thanks for the update and details, @cybertron ! Given the above, I'll close this PR. |
Fixies # Don't add white namespace while generating /etc/resolv.conf on nodes if variables are empty.
Empty NetworkManager variables cause generating whitespace in /etc/resolv.conf between search and search domains.
This patch checks if the variables are empty. If empty, don't add it to Variable $DOMAINS
i.e
$ cat /etc/resolv.conf
Generated by KNI resolv prepender NM dispatcher script
search abc.com ## three whitespace added here between search and abc.com
nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx
- What I did
Validate if variables are set to empty.
- How to verify it
Don't pass search domain via dhcp service.
- Description for the changelog
Validate the NetworkManager variables before using them in the dispatcher script.
Validate the NetworkManager variables before using them in the dispatcher script.