net: no such device #217

Closed
tgulacsi opened this Issue Mar 27, 2013 · 7 comments

Comments

Projects
None yet
5 participants
@tgulacsi

Hi,

On Debian I get "net: no such device" error. From freenode.net I've been informed that Debian is not supported, and the problem is a missing lxcbr0 interface (needs brctl add lxcbr0 && ifconfig lxcbr0 10.65.41.1).

Here is a patch to have a more meaningful error message:

diff --git a/network.go b/network.go
index 95b5893..39c42e7 100644
--- a/network.go
+++ b/network.go
@@ -334,7 +334,7 @@ func (manager _NetworkManager) Allocate() (_NetworkInterface, error) {
func newNetworkManager(bridgeIface string) (*NetworkManager, error) {
addr, err := getIfaceAddr(bridgeIface)
if err != nil {

  •           return nil, err
    
  •          return nil, fmt.Errorf("getting interface named %s: %s", bridgeIface, err)
    }
    network := addr.(*net.IPNet)
    
@shykes

This comment has been minimized.

Show comment Hide comment
@shykes

shykes Mar 27, 2013

Collaborator

Thanks! Could you make it a pull request so we can properly credit you? If you don't want to bother, let me know and I'll apply it directly.

Collaborator

shykes commented Mar 27, 2013

Thanks! Could you make it a pull request so we can properly credit you? If you don't want to bother, let me know and I'll apply it directly.

@tgulacsi

This comment has been minimized.

Show comment Hide comment
@tgulacsi

tgulacsi Mar 27, 2013

Thanks! I'll leave the credit to you :)

Thanks! I'll leave the credit to you :)

@tgulacsi tgulacsi closed this Mar 27, 2013

@kencochrane

This comment has been minimized.

Show comment Hide comment
@kencochrane

kencochrane Mar 27, 2013

Contributor

going to reopen to make sure the patch doesn't get lost. @shykes close when you are done with the patch.

Contributor

kencochrane commented Mar 27, 2013

going to reopen to make sure the patch doesn't get lost. @shykes close when you are done with the patch.

@kencochrane kencochrane reopened this Mar 27, 2013

@rshk

This comment has been minimized.

Show comment Hide comment
@rshk

rshk Apr 2, 2013

..is there any way to actually fix this? I mean, does docker create the interface on ubuntu, while it's failing on debian, for some reason? (I mean: can I safely just create the interface "manually", or there could be any drawback if docker isn't able to manage the interfaces?)

rshk commented Apr 2, 2013

..is there any way to actually fix this? I mean, does docker create the interface on ubuntu, while it's failing on debian, for some reason? (I mean: can I safely just create the interface "manually", or there could be any drawback if docker isn't able to manage the interfaces?)

@shykes

This comment has been minimized.

Show comment Hide comment
@shykes

shykes Apr 2, 2013

Collaborator

Yes, you can safely create the bridge manually. There is a pull request (
#221 ) for automatically creating a bridge instead of relying on a
pre-existing one.

On Mon, Apr 1, 2013 at 6:15 PM, Samuele Santi notifications@github.comwrote:

..is there any way to actually fix this? I mean, does docker create the
interface on ubuntu, while it's failing on debian, for some reason? (I
mean: can I safely just create the interface "manually", or there could be
any drawback if docker isn't able to manage the interfaces?)


Reply to this email directly or view it on GitHubhttps://github.com/dotcloud/docker/issues/217#issuecomment-15747989
.

Collaborator

shykes commented Apr 2, 2013

Yes, you can safely create the bridge manually. There is a pull request (
#221 ) for automatically creating a bridge instead of relying on a
pre-existing one.

On Mon, Apr 1, 2013 at 6:15 PM, Samuele Santi notifications@github.comwrote:

..is there any way to actually fix this? I mean, does docker create the
interface on ubuntu, while it's failing on debian, for some reason? (I
mean: can I safely just create the interface "manually", or there could be
any drawback if docker isn't able to manage the interfaces?)


Reply to this email directly or view it on GitHubhttps://github.com/dotcloud/docker/issues/217#issuecomment-15747989
.

@Finkregh

This comment has been minimized.

Show comment Hide comment
@Finkregh

Finkregh Apr 3, 2013

a little note on the command above: the right command is

brctl addbr lxcbr0 && ip a a 10.65.41.1/24 brd + dev lxcbr0

(i suppose that a "random" /24-net is okay?)

Finkregh commented Apr 3, 2013

a little note on the command above: the right command is

brctl addbr lxcbr0 && ip a a 10.65.41.1/24 brd + dev lxcbr0

(i suppose that a "random" /24-net is okay?)

@shykes

This comment has been minimized.

Show comment Hide comment
@shykes

shykes Apr 5, 2013

Collaborator

I changed the error message to be more explicit, and added basic instructions to create the bridge if it doesn't exist.

Closing.

Collaborator

shykes commented Apr 5, 2013

I changed the error message to be more explicit, and added basic instructions to create the bridge if it doesn't exist.

Closing.

@shykes shykes closed this Apr 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment