Skip to content
Snippets Groups Projects
Commit d8d83e5c authored by onlyjob's avatar onlyjob :sleeping:
Browse files

Switch to vishvananda-netlink, fixes FTBFS (Closes: #817025)

parent ec226552
Branches
Tags
No related merge requests found
......@@ -11,9 +11,9 @@ Build-Depends: debhelper (>= 9), bash-completion,
golang-dbus-dev,
golang-etcd-server-dev | golang-github-coreos-etcd-dev,
golang-github-coreos-go-systemd-dev,
golang-github-opencontainers-runc-dev,
golang-github-rakyll-globalconf-dev,
golang-github-ugorji-go-codec-dev,
golang-github-vishvananda-netlink-dev,
golang-go,
golang-go-semver-dev,
golang-go.crypto-dev,
......
Last-Update: 2016-03-06
Forwarded: yes
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803496
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817025
Bug-Upstream: https://github.com/coreos/fleet/issues/1468
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: update netlink dependency.
--- a/machine/coreos.go
+++ b/machine/coreos.go
@@ -22,9 +22,9 @@
"strings"
"sync"
"time"
- "github.com/coreos/fleet/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
+ "github.com/vishvananda/netlink"
"github.com/coreos/fleet/log"
"github.com/coreos/fleet/unit"
)
@@ -169,9 +169,9 @@
func getDefaultGatewayIface() *net.Interface {
log.Debug("Attempting to retrieve IP route info from netlink")
- routes, err := netlink.NetworkGetRoutes()
+ routes, err := netlink.RouteList(nil, 0)
if err != nil {
log.Debugf("Unable to detect default interface: %v", err)
return nil
}
@@ -181,14 +181,17 @@
return nil
}
for _, route := range routes {
- if route.Default {
- if route.Iface == nil {
+ // a nil Dst means that this is the default route.
+ if route.Dst == nil {
+ i, err := net.InterfaceByIndex(route.LinkIndex)
+ if err != nil {
log.Debugf("Found default route but could not determine interface")
+ continue
}
- log.Debugf("Found default route with interface %v", route.Iface.Name)
- return route.Iface
+ log.Debugf("Found default route with interface %v", i)
+ return i
}
}
log.Debugf("Unable to find default route")
Last-Update: 2015-10-31
Forwarded: no
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803496
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: switch to runc
--- a/machine/coreos.go
+++ b/machine/coreos.go
@@ -22,9 +22,9 @@
"strings"
"sync"
"time"
- "github.com/coreos/fleet/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
+ "github.com/opencontainers/runc/libcontainer/netlink"
"github.com/coreos/fleet/log"
"github.com/coreos/fleet/unit"
)
runc.patch
netlink.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment