Closed sigmonsays closed 9 years ago
+1
After a bit of debugging I found that using lxc.network.0.link
works. Was the an old method to address network args? If not, this change should go in the lxc library?
Have a PR for this at https://github.com/lxc/lxc/pull/491
Perfect, thank you so much tracking this down @syed. I'll close this and comment your PR on LXC side.
Given the container configuration snippet lxc.network.type = veth lxc.network.link = lxcbr0 lxc.network.flags = up lxc.network.hwaddr = 00:16:3e:xx:xx:xx
The following go code does not function as expected
container := lxc.NewContainer("example", lxc.DefaultConfigPath()) container.ConfigItem("lxc.network") returns "veth" container.ConfigItem("lxc.network.type") returns []string{""}
expected results are for lxc.network to return nothing or all lxc.network configuration. expected results are for lxc.network.type to return "veth"
latest go-lxc (commit 4c6cb39f385e62ce1f4d1042e159e332856204b7) using daily ppa package, version liblxc1 1.1.0+master~20150224-0137-0ubuntu1~precise