* boot system
* lxc exec x1
% echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
% rm /etc/network/interfaces.d/50-cloud-init.cfg
% reboot
* lxc exec x1
% cat /etc/network/interfaces.d/50-cloud-init.cfg
cat: /etc/network/interfaces.d/50-cloud-init.cfg: No such file or directory
% dpkg-query --show cloud-init
cloud-init 0.7.8-1-g3705bb5-0ubuntu1~16.04.3
% grep "INFO.*disabled" /var/log/cloud-init.log
Nov 10 02:07:59 xt1 [CLOUDINIT] stages.py[INFO]: network config is disabled by system_cfg
Nov 10 02:08:00 xt1 [CLOUDINIT] stages.py[INFO]: network config is disabled by system_cfg
cloudinit/stages.py uses 'net.is_ disabled_ cfg()'.
I just verified on a fresh lxc container.
* boot system cloud.cfg. d/99-disable- network- config. cfg interfaces. d/50-cloud- init.cfg interfaces. d/50-cloud- init.cfg interfaces. d/50-cloud- init.cfg: No such file or directory g3705bb5- 0ubuntu1~ 16.04.3
* lxc exec x1
% echo "network: {config: disabled}" > /etc/cloud/
% rm /etc/network/
% reboot
* lxc exec x1
% cat /etc/network/
cat: /etc/network/
% dpkg-query --show cloud-init
cloud-init 0.7.8-1-
% grep "INFO.*disabled" /var/log/ cloud-init. log
Nov 10 02:07:59 xt1 [CLOUDINIT] stages.py[INFO]: network config is disabled by system_cfg
Nov 10 02:08:00 xt1 [CLOUDINIT] stages.py[INFO]: network config is disabled by system_cfg
So it seems not completely broken there.