networkd: remove double-restart workaround
The kernel fixed the underlying issue in 763e0ec and e721f87.
This commit is contained in:
parent
e9bda98b54
commit
1a6cee5305
@ -22,11 +22,11 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink"
|
|
||||||
"github.com/coreos/coreos-cloudinit/config"
|
"github.com/coreos/coreos-cloudinit/config"
|
||||||
"github.com/coreos/coreos-cloudinit/network"
|
"github.com/coreos/coreos-cloudinit/network"
|
||||||
|
|
||||||
|
"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -35,13 +35,6 @@ const (
|
|||||||
|
|
||||||
func RestartNetwork(interfaces []network.InterfaceGenerator) (err error) {
|
func RestartNetwork(interfaces []network.InterfaceGenerator) (err error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if e := restartNetworkd(); e != nil {
|
|
||||||
err = e
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// TODO(crawford): Get rid of this once networkd fixes the race
|
|
||||||
// https://bugs.freedesktop.org/show_bug.cgi?id=76077
|
|
||||||
time.Sleep(5 * time.Second)
|
|
||||||
if e := restartNetworkd(); e != nil {
|
if e := restartNetworkd(); e != nil {
|
||||||
err = e
|
err = e
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user