UbuntuIRC / 2020 /12 /16 /#cloud-init.txt
niansa
Initial commit
4aa5fce
=== benj_- is now known as benj_
[15:50] <StyXman> I'm provisioning a LXD container with cloud-init. the container has 3 interfaces, none of them called eth0. I'm only configuring one to do DHCP. The other 2 are declared but not configured. cloud-init seems to be generating config for a nonexistant eth0 interface, oding DHCP. this makes the network service to fail.
[15:55] <Odd_Bloke> StyXman: Can you pastebin `lxc config show <container>`, please?
[15:56] <rharper> lxd has cloud-init config templating which may help ; https://lxd.readthedocs.io/en/stable-3.0/cloud-init/
[16:00] <StyXman> Odd_Bloke: https://dpaste.org/b8ze
[16:01] <StyXman> you see, no eth0 there
[16:01] <StyXman> nor in the system itself
[16:15] <Odd_Bloke> StyXman: What does /var/lib/cloud/seed/nocloud-net/network-config look like?
[16:25] <StyXman> that would be in the container?
[16:25] <Odd_Bloke> Yep!
[16:25] <StyXman> same
[16:26] <StyXman> no eth0 there either
[16:26] <StyXman> could it be the image?
[16:28] <Odd_Bloke> Same as what?
[16:28] <rharper> lxc profile show default ; or whatever profile you're using should have a devices: section with the nics and what they are connected to ect
[16:29] <Odd_Bloke> (Pastebin it, please. :)
[16:40] <StyXman> Odd_Bloke: same as the dpaste up there
[16:44] <StyXman> nothing: https://dpaste.org/YeFF
[16:46] <Odd_Bloke> https://dpaste.org/b8ze is what's in /var/lib/cloud/seed/nocloud-net/network-config? That's not valid network configuration for cloud-init, so it's not surprising that cloud-init isn't doing anything with it. :) https://paste.ubuntu.com/p/vNZnpnm5M4/ is an example of what network configuration should look like.
[16:46] <Odd_Bloke> (Are you specifying user.network-config in container configuration?)
[16:48] <StyXman> ok, ok, it looked the same
[16:48] <StyXman> gimme a sec, I'm rebuilding the container now
[16:48] <Odd_Bloke> Sure thing. :)
[16:49] <StyXman> what I meant to say: it doesn't list any the0 either
[16:49] <StyXman> eth0*
[16:56] <Odd_Bloke> StyXman: OK, but it's different content? If so, please pastebin it. :)
[16:57] <Odd_Bloke> (And pastebin /var/log/cloud-init.log from the container while you're at it, ideally.)
[17:07] <StyXman> as you can see, I'm quite new to this (only today I started reading the docs, even when I've been using it ofr more than a year), so thanks for the patience :)
[17:17] <Odd_Bloke> No worries!
[17:53] <StyXman> Odd_Bloke: https://dpaste.org/KXLj
[17:53] <StyXman> log file will come later
[17:55] <StyXman> nothing on the logs
[17:56] <StyXman> so it's probably the image?
[17:56] <Odd_Bloke> Please pastebin the log if you can, it may have information in there that isn't obviously related.
[18:01] <StyXman> https://dpaste.org/Mik9
[18:12] <Odd_Bloke> StyXman: Thanks! It looks to me like cloud-init has configured the system with the network configuration I would expect ("Applying network configuration from ds" and its following lines, where you can see it writing out sysconfig files). So I don't _think_ cloud-init is what's configuring eth0 for you.
[18:45] <StyXman> Odd_Bloke: thanks for confirming. I'll have to find another solution