mirror of
https://github.com/rancher/os.git
synced 2025-08-31 22:32:14 +00:00
Merge pull request #1921 from SvenDowideit/add-dhcp-wait
Add dhcp wait to see if it effects the DNS race we're seeing.
(cherry picked from commit f673138932
)
This commit is contained in:
@@ -187,7 +187,7 @@ func ApplyNetworkConfigs(netCfg *NetworkConfig) error {
|
||||
}
|
||||
|
||||
func RunDhcp(netCfg *NetworkConfig, setHostname, setDNS bool) error {
|
||||
log.Debugf("RunDhcp")
|
||||
log.Debugf("RunDhcp(%V, %v)", setHostname, setDNS)
|
||||
populateDefault(netCfg)
|
||||
|
||||
links, err := netlink.LinkList()
|
||||
@@ -258,6 +258,10 @@ func runDhcp(netCfg *NetworkConfig, iface string, argstr string, setHostname, se
|
||||
args = append(args, "--nohook", "resolv.conf")
|
||||
}
|
||||
|
||||
// Wait for lease
|
||||
// TODO: this should be optional - based on kernel arg?
|
||||
args = append(args, "-w", "--debug")
|
||||
|
||||
args = append(args, iface)
|
||||
cmd := exec.Command(args[0], args[1:]...)
|
||||
log.Infof("Running DHCP on %s: %s", iface, strings.Join(args, " "))
|
||||
|
Reference in New Issue
Block a user