Skip to content

Commit

Permalink
Revert "Configure dns servers for SL"
Browse files Browse the repository at this point in the history
This reverts commit a23189e.

Co-authored-by: Belinda Liu <[email protected]>
  • Loading branch information
jfmyers9 and belinda-liu committed Oct 31, 2018
1 parent e4b98e8 commit 5316fc3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
6 changes: 2 additions & 4 deletions platform/net/ubuntu_net_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ func (net UbuntuNetManager) SetupIPv6(config boshsettings.IPv6, stopCh <-chan st

func (net UbuntuNetManager) SetupNetworking(networks boshsettings.Networks, errCh chan error) error {
if networks.IsPreconfigured() {
err := net.writeResolvConf(networks)
if err != nil {
return bosherr.WrapError(err, "Writing resolvconf")
}
// Note in this case IPs are not broadcast
return net.writeResolvConf(networks)
}

staticConfigs, dhcpConfigs, dnsServers, err := net.ComputeNetworkConfig(networks)
Expand Down
12 changes: 1 addition & 11 deletions platform/net/ubuntu_net_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,6 @@ dns-nameservers 8.8.8.8 9.9.9.9`
Context("networks is preconfigured", func() {
var networks boshsettings.Networks
BeforeEach(func() {
interfacePaths := []string{}
interfacePaths = append(interfacePaths, writeNetworkDevice("fake-eth0", "fake-static-mac-address", true))
interfacePaths = append(interfacePaths, writeNetworkDevice("fake-eth1", "fake-dhcp-mac-address", true))
fs.SetGlob("/sys/class/net/*", interfacePaths)

interfaceAddrsProvider.GetInterfaceAddresses = []boship.InterfaceAddress{
boship.NewSimpleInterfaceAddress("fake-eth0", "1.2.3.4"),
boship.NewSimpleInterfaceAddress("fake-eth1", "5.6.7.8"),
}

dhcpNetwork.Preconfigured = true
staticNetwork.Preconfigured = true
networks = boshsettings.Networks{
Expand Down Expand Up @@ -397,7 +387,7 @@ nameserver 9.9.9.9
err := netManager.SetupNetworking(networks, nil)
Expect(err).ToNot(HaveOccurred())

Expect(len(cmdRunner.RunCommands)).To(Equal(6))
Expect(len(cmdRunner.RunCommands)).To(Equal(1))
Expect(cmdRunner.RunCommands[0]).To(Equal([]string{"resolvconf", "-u"}))
})
})
Expand Down
4 changes: 0 additions & 4 deletions settings/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,6 @@ func (s *settingsService) GetSettings() Settings {
}
s.settingsMutex.Unlock()

if settingsCopy.Networks.HasInterfaceAlias() {
return settingsCopy
}

for networkName, network := range settingsCopy.Networks {
if !network.IsDHCP() {
continue
Expand Down

0 comments on commit 5316fc3

Please sign in to comment.