mirror of
https://github.com/rancher/os.git
synced 2025-09-01 14:48:55 +00:00
Replace wait-for-network services with retries
This commit is contained in:
24
assets/go-dnsclient.patch
Normal file
24
assets/go-dnsclient.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
265,270d264
|
||||
< // Ensure only one update at a time checks resolv.conf.
|
||||
< if !conf.tryAcquireSema() {
|
||||
< return
|
||||
< }
|
||||
< defer conf.releaseSema()
|
||||
<
|
||||
276a271,280
|
||||
> conf.update(name)
|
||||
> }
|
||||
>
|
||||
> func (conf *resolverConfig) update(name string) {
|
||||
> // Ensure only one update at a time checks resolv.conf.
|
||||
> if !conf.tryAcquireSema() {
|
||||
> return
|
||||
> }
|
||||
> defer conf.releaseSema()
|
||||
>
|
||||
293a298,302
|
||||
> }
|
||||
>
|
||||
> func UpdateDnsConf() {
|
||||
> resolvConf.initOnce.Do(resolvConf.init)
|
||||
> resolvConf.update("/etc/resolv.conf")
|
Reference in New Issue
Block a user