LXC network edit does not save the changes

I created a new veth bridge (testbr0) and attached the new bridge to an existing test container. Next I wanted to detach lxdbr0 from the test container, but that did not work. Finally I tried to remove the test container from lxdbr0 by editing it’s config with lxc network edit lxdbr0. However, the actual config of lxdbr0 never got updated (the output of lxc network show lxdbr0 after I saved the changes is the same).

Is this an error that should be reported, or what could I have misunderstood or done wrong.

N.B. I’m using LXD 2.13 from the xenial-backports on Ubuntu 16.04.

The list of “used_by” is purely informative and is completely ignored by the server.

The normal way to detach the device would be “lxc network detach lxdbr0 test”, if that doesn’t work, the error would be interesting. Alternatively, you can do “lxc config edit test” and remove the device entry from the container (that’s what “detach” does for you internally).

The good news, after a reinstall of LXD (purge) and following your instructions, it works. The bad news, I can’t reproduce the situation where “lxc network detach lxdbr0 test” didn’t work.

wouldn’t it generally be simpler to create a new profile using the new bridge and assign that profile to any container you want to use it with (or alternatively change the default profile so it utilizes your new bridge)?

If your bridge will be used by mutliple containers, yes, using a profile is usually simpler. But if all your containers are going to have slightly different network configurations as can be the case in more complex enterprise setups, then doing individual configuration may be the way to go.

Yes,it seems to be good practice and it’s what I finally did. I have now four profiles I can combine to cover any of my current configuration needs.