File tree Expand file tree Collapse file tree 4 files changed +2
-15
lines changed
nodeadm/cmd/nodeadm-internal/udev Expand file tree Collapse file tree 4 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ DNSDefaultRoute=yes
1616
1717[DHCPv4]
1818UseHostname= no
19- UseDNS= {{ .UseDNS }}
19+ UseDNS= yes
2020UseNTP= yes
2121UseDomains= yes
2222
2323[DHCPv6]
2424UseHostname= no
25- UseDNS= {{ .UseDNS }}
25+ UseDNS= yes
2626UseNTP= yes
2727WithoutRA= solicit
2828
Original file line number Diff line number Diff line change @@ -146,21 +146,12 @@ func (c *netManager) manageLink(ctx context.Context) error {
146146 ruleBase = 10000
147147 )
148148
149- // TODO: this is a temporary fix needed because of a bug in upstream systemd
150- // only enable DNS for the primary interface to avoid duplicate entries
151- // see: https://github.com/systemd/systemd/pull/40069
152- useDNSValue := "no"
153- if c .selfMac == c .primaryMac {
154- useDNSValue = "yes"
155- }
156-
157149 templateVars := networkTemplateVars {
158150 MAC : c .selfMac ,
159151 // setup route metics. this provides priority on good interfaces over
160152 // ones that could potentially delay startup.
161153 // see: https://github.com/amazonlinux/amazon-ec2-net-utils/blob/3261b3b4c8824343706ee54d4a6f5d05cd8a5979/lib/lib.sh#L348-L366
162154 Metric : metricBase + 100 * networkCard + deviceIndex ,
163- UseDNS : useDNSValue ,
164155 }
165156
166157 // we only need to add routes/rules to interfaces beyond the primary.
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ type networkTemplateVars struct {
2121 Metric int
2222 TableID int
2323 InterfaceIP string
24- UseDNS string
2524}
2625
2726func renderNetworkTemplate (templateVars networkTemplateVars ) ([]byte , error ) {
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ func Test_renderNetworkTemplate(t *testing.T) {
1515 Metric : 42 ,
1616 TableID : 99 ,
1717 InterfaceIP : "127.0.0.1" ,
18- UseDNS : "yes" ,
1918 })
2019 assert .NoError (t , err )
2120 assert .Equal (t , strings .TrimSpace (`
@@ -85,7 +84,6 @@ Priority=32765
8584 MAC : "foo" ,
8685 Metric : 42 ,
8786 TableID : 99 ,
88- UseDNS : "yes" ,
8987 })
9088 assert .NoError (t , err )
9189 assert .Equal (t , strings .TrimSpace (`
@@ -148,7 +146,6 @@ Gateway=_dhcp4
148146 networkConfig , err := renderNetworkTemplate (networkTemplateVars {
149147 MAC : "foo" ,
150148 Metric : 42 ,
151- UseDNS : "yes" ,
152149 })
153150 assert .NoError (t , err )
154151 assert .Equal (t , strings .TrimSpace (`
You can’t perform that action at this time.
0 commit comments