chef-lxc
chef-lxc copied to clipboard
It isn't possible to change the network config
Hi,
It isn't possible to change the network config by using the config attribute. The LXC ruby libraries doesn't allow to set the key lxc.network.type because we need to use lxc.network.X.type key (X is a the id of the network key) but if we set lxc.network.0.type, the old key lxc.network.type isn't deleted and the new key is also added:
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:11:11:11
lxc.network.0.type = macvlan
A solution could be try to delete the key if it exists before to change it with the clean_key_config method.
Regards.