Hello,
For no obvious reason, I cannot delete and/or deploy new LXCs on a Juju model. I have used remove-machine with the --force option and the machine is for more than 24 hours in stopped state (no units attached to it) and the same also applies for a couple of new containers that stay in pending state. The only relevant log is the following:
dbf0a1ec-dbab-4e20-8e95-d480b4f9e12e: machine-10 2019-02-13 14:54:20 WARNING juju.provisioner container_initialisation.go:145 not stopping machine agent container watcher due to error: setting up container dependencies on host machine: failed to generate a unique device name for profile "default"
dbf0a1ec-dbab-4e20-8e95-d480b4f9e12e: machine-10 2019-02-13 14:54:20 ERROR juju.provisioner container_initialisation.go:124 starting container provisioner for lxd: setting up container dependencies on host machine: failed to generate a unique device name for profile "default"
Hey @soumplis, in looking at the code there that shouldnât happen unless thereâs > 100 network devices on the container so it cannot setup a device eth0-eth100. Itâs definitely a case where the code says âthis should never happenâ but it didâŚ
It might be best to pull together a bug with the logs involved and some more details of the install.
Specifically, it seems that when Juju tries to set up containers, if the LXD cloud doesnât appear to be fully fleshed out, it tries to run âlxd init --autoâ, however, if âlxdâ isnât in $PATH, then that fails, and the loop starts over. But it has already modified the default profile by that time. So it bounces and repeatedly adds another eth device to the default profile.
I havenât dug into the details, but yes, we shouldnât ever hit >100 networking devices in a single container and we only have done so because of a different bug.
Yeap, that seems to be the problem for me also. Although lxd is in the PATH (/usr/bin) it has 100 eth devices in the default profile and also 600 veth devices on the host machines. For the record this machine has only 6 containers.