/srv/irclogs.ubuntu.com/2021/01/15/#cloud-init.txt

=== falcojr1 is now known as falcojr
scahartnerI was hoping to do two separate cloud-init runs. one for the auto-install and another for the configuration.01:45
scahartnerwould this not be the simpler approach rather then try to have one run do too many bits01:45
scahartnerjust having a play with the user-data section in auto install and will report back.01:57
faawe testing SmartOS datasource, linux guest sucess reread datasource tty interface after reboot, freebsd read only cache data after reboot, why?13:00
faathis require for add or reconfigure net/interfaces13:09
faahttps://paste.ubuntu.com/p/DHjPPCqXB5/ linux cache invalid, freebsd not, why?14:58
faalinux have /run in tmp fs and delite cache content after reboot :)15:30
vijayendrarharper, smoser this is regarding #647. Sorry for approaching late. Just trying to understand what's next action on this.17:15
vijayendrais there any other approach we can take for LP: #189377017:17
ubot5Launchpad bug 1893770 in cloud-init "Cloudinit resets network scripts to default configuration DHCP once Config Drive is removed after sometime" [Medium,In progress] https://launchpad.net/bugs/189377017:17
smoservijayendra: as it is right now, the code has problems if ds-identify isn't used.17:24
smoserin that case it may resume from a cached pickle that is *not* the right platform.17:26
smoserwhat i would like to see changd is to have the 'check_instance_id()' respected if it is present17:27
smoserand ideally for the datasource to validate if it is on the right platform.17:27
smoserin order to do that, we'd want to add a "check_platform" like function to each of the datasources, that did basically what ds-identify does.17:28
smoserthat part is fairly significant.17:30
smoserbut the point being that in cloud-init we "know" that we are on google compute based on 'GoogleCloud-' in dmi information.17:31
smoserwe should not resume from a GCE datasource if we are not on GoogleCloud17:31
smoserand we should not resume from a Azure datasource if we *are* on GCE17:32
smoserwith ds-identify, and your check of "configured datasources", you kind of get that. but only becauase ds-identify set that datasource list.17:33
smoserand ds-identify isn't required17:33
__bwhello - trying to debug cloud-init on a lxd image, cloud-init is installed in the image but i am not seeing the user data come through when launching. what datasource would lxd containers be using?20:56
rharper__bw: NoCloud, you should see /var/lib/cloud/seed/nocloud-net/user-data;  I typically add user-data to lxc instances like this: lxc init ubuntu-daily:focal f6; sleep 1; lxc config set f6 user.user-data "$(cat test-user-data)"21:08
__bwty @rharper21:12
Odd_BlokeThis is my common pattern, to do it all in one command: lxc launch ubuntu-daily:focal f6 -c user.user-data="$(cat test-user-data)"21:12
rharperOdd_Bloke: I wasn't sure lxc launch would accept the config; interesting21:13
Odd_BlokeYeah, it's handy21:14
Odd_Bloke(Works for user.network-config too.)21:15
rharperneat21:18
__bwnot getting any data inside the seed dir unfortunately -- this is a home-grown rhel image, with cloud-init installed. is there anything else needed to ensure the user-data makes it through?21:42
Odd_BlokeI believe that there is configuration on images which causes things to be populated.21:48
__bwi see in the logs, that cloud-init is checking the nocloud datasource but not finding anything21:50
__bwah it may be the lxd metadata.yaml21:51
Odd_BlokeLook for the Context heading in https://linuxcontainers.org/lxd/docs/master/image-handling.html, it's the templates I'm referring to.21:51
Odd_BlokeI don't know if lxd has default templates it uses, but I do know that Ubuntu ships templates for our images, you can see them here, for example: http://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64-lxd.tar.xz21:52
__bwyeah probably need to slip something similar in the image minting process for rhel, thanks21:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!