Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

device-init fails with panic on Odroid C1 #41

Open
docbobo opened this issue Apr 15, 2017 · 4 comments
Open

device-init fails with panic on Odroid C1 #41

docbobo opened this issue Apr 15, 2017 · 4 comments

Comments

@docbobo
Copy link
Collaborator

docbobo commented Apr 15, 2017

From #38:

$ sudo device-init hostname set traefik
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/hypriot/device-init/cmd.activeInterfaces(0x0, 0x0, 0x0)
        /opt/gopath/src/github.com/hypriot/device-init/cmd/hostname_set.go:123 +0x31c
github.com/hypriot/device-init/cmd.setHostname(0x108a5dfc, 0x1, 0x1)
        /opt/gopath/src/github.com/hypriot/device-init/cmd/hostname_set.go:86 +0x50c
github.com/hypriot/device-init/cmd.glob.func5(0x670c30, 0x108206d0, 0x1, 0x1)
        /opt/gopath/src/github.com/hypriot/device-init/cmd/hostname_set.go:39 +0xa4
github.com/spf13/cobra.(*Command).execute(0x670c30, 0x10820688, 0x1, 0x1, 0x0, 0x0)
        /opt/gopath/src/github.com/hypriot/device-init/Godeps/_workspace/src/github.com/spf13/cobra/command.go:569 +0x664
github.com/spf13/cobra.(*Command).ExecuteC(0x670d28, 0x670c30, 0x0, 0x0)
        /opt/gopath/src/github.com/hypriot/device-init/Godeps/_workspace/src/github.com/spf13/cobra/command.go:656 +0x440
github.com/spf13/cobra.(*Command).Execute(0x670d28, 0x0, 0x0)
        /opt/gopath/src/github.com/hypriot/device-init/Godeps/_workspace/src/github.com/spf13/cobra/command.go:615 +0x28
github.com/hypriot/device-init/cmd.Execute()
        /opt/gopath/src/github.com/hypriot/device-init/cmd/root.go:53 +0x20
main.main()
        /opt/gopath/src/github.com/hypriot/device-init/main.go:28 +0x14
@docbobo
Copy link
Collaborator Author

docbobo commented Apr 15, 2017

@gdeverlant, can you please post the output of ip link? Thanks.

@al-sabr
Copy link

al-sabr commented Apr 15, 2017

$ sudo ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:1e:06:10:0b:d5 brd ff:ff:ff:ff:ff:ff
3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default
    link/sit 0.0.0.0 brd 0.0.0.0
4: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default
    link/tunnel6 :: brd ::
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 02:42:9a:7b:01:e8 brd ff:ff:ff:ff:ff:ff
15: veth03dda15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default
    link/ether 9a:4f:7d:85:e9:d6 brd ff:ff:ff:ff:ff:ff
17: veth41a9632: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default
    link/ether 2a:92:65:43:b6:04 brd ff:ff:ff:ff:ff:ff
80: ov-001000-xyez7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default
    link/ether 22:2f:3a:cd:a9:a1 brd ff:ff:ff:ff:ff:ff
81: vx-001000-xyez7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master ov-001000-xyez7 state UNKNOWN mode DEFAULT group default
    link/ether 22:2f:3a:cd:a9:a1 brd ff:ff:ff:ff:ff:ff
83: veth78e177e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master ov-001000-xyez7 state UP mode DEFAULT group default
    link/ether 72:42:ac:24:b3:b7 brd ff:ff:ff:ff:ff:ff
84: docker_gwbridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 02:42:2a:47:a8:b2 brd ff:ff:ff:ff:ff:ff
86: veth66029a9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker_gwbridge state UP mode DEFAULT group default
    link/ether 7a:e2:58:6d:50:33 brd ff:ff:ff:ff:ff:ff
164: veth6589e47: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master ov-001000-xyez7 state UP mode DEFAULT group default
    link/ether 42:2f:bb:0f:56:5f brd ff:ff:ff:ff:ff:ff
166: vethcba7937: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker_gwbridge state UP mode DEFAULT group default
    link/ether ca:56:5f:46:fc:30 brd ff:ff:ff:ff:ff:ff
167: ov-001001-wmrr9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default
    link/ether 4a:cf:51:50:17:d3 brd ff:ff:ff:ff:ff:ff
168: vx-001001-wmrr9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master ov-001001-wmrr9 state UNKNOWN mode DEFAULT group default
    link/ether 4a:cf:51:50:17:d3 brd ff:ff:ff:ff:ff:ff
170: veth24d8b8b: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master ov-001001-wmrr9 state UP mode DEFAULT group default
    link/ether f6:0b:57:f0:ab:6d brd ff:ff:ff:ff:ff:ff

@docbobo
Copy link
Collaborator Author

docbobo commented Apr 15, 2017

I believe this is a bug in device-inititself. Lines 80, 84, and 167 definitely don't match the regular expression at https://github.com/hypriot/device-init/blob/master/cmd/hostname_set.go#L122.

@StefanScherer ?

@arturslogins
Copy link

Is any solution here ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants