canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.87k stars 856 forks source link

[docs]: Fix network config on debian 12 installed with cloudinit #4565

Open paul-pascual opened 10 months ago

paul-pascual commented 10 months ago

Hi ! I have a little problem with debian 12 and cloudinit network management :

Network operation with cloud-init changed between debian 11 and debian 12 and the "/etc/network/interfaces" file no longer exists and the networking/systemd-networkd service no longer exists either ... Impossible to set an IP address as before using the contents of "/etc/network/interfaces.d/50-cloud-init" in "/etc/network/interfaces" ... How can I fix my network configuration again in "/etc/network/interfaces" after installing the machine using cloudinit in addition to "echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" ?

Thanks in advance !

blackboxsw commented 10 months ago

Hi @paul-pascual thank you for filing this bug and making cloud-init better. I think we may need a few more details here to understand the use-case you are trying to solve here.

Would you be able to attach the logs from cloud-init collect-logs to this issue.

Also might yoube able to create an /etc/network/interfaces files with source /etc/network/interfaces.d in it so the system can see the config parts emitted by cloud-init?

I'm also a bit confused by your mention of placing configuration in the image with network: {config: disabled} as that will keep cloud-init inert writing network configuration in general so it'd be impossible to get cloud-init to render network configuration if that configuration was processed when cloud-init was running on first boot.

paul-pascual commented 10 months ago

HI @blackboxsw, thank you for your reply. After some investigations, i realised that my problem is the presence of netplan instead of ifupdown... So, it's normal not to have the network configurations in "/etc/network/". But, i'd still like to understand why this change has been made and whether it's a change by debian or the cloudinit team.

Thanks again !