-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Bug 1801436: baremetal: Fix bootstrap local DNS for IPv6 #2982
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/bash | ||
| IFACE=$1 | ||
| STATUS=$2 | ||
| case "$STATUS" in | ||
| up) | ||
| logger -s "NM local-dns-prepender triggered by ${1} ${2}." | ||
| DNS_IP="127.0.0.1" | ||
| set +e | ||
| logger -s "NM local-dns-prepender: Checking if local DNS IP is the first entry in resolv.conf" | ||
| if grep nameserver /etc/resolv.conf | head -n 1 | grep -q "$DNS_IP" ; then | ||
| logger -s "NM local-dns-prepender: local DNS IP already is the first entry in resolv.conf" | ||
| exit 0 | ||
| else | ||
| logger -s "NM local-dns-prepender: Looking for '# Generated by NetworkManager' in /etc/resolv.conf to place 'nameserver $DNS_IP'" | ||
| sed -i "/^# Generated by.*$/a nameserver $DNS_IP" /etc/resolv.conf | ||
| fi | ||
| ;; | ||
| *) | ||
| ;; | ||
| esac | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,10 +292,11 @@ func (a *Bootstrap) addStorageFiles(base string, uri string, templateData *boots | |
| } | ||
|
|
||
| filename := path.Base(uri) | ||
| parentDir := path.Base(path.Dir(uri)) | ||
|
|
||
| var mode int | ||
| appendToFile := false | ||
| if path.Base(path.Dir(uri)) == "bin" { | ||
| if parentDir == "bin" || parentDir == "dispatcher.d" { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also it would be nice if you can include why these files need to have same permissions as bin files?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, a comment would probably be nice. It's a directory of scripts executed by NetworkManager. |
||
| mode = 0555 | ||
| } else if filename == "motd" { | ||
| mode = 0644 | ||
|
|
||
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.
how is this file different from the mco PR https://github.com/openshift/machine-config-operator/pull/1396/files# ?? I don't see any such file in that PR.
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.
"30-resolv-prepender" - that one adds the DNS VIP to resolv.conf. On the bootstrap host we just need localhost added, which is what this PR does.