[08:45] I'm trying to find a way to write an openbsd module for cloud-init and I started looking at util.py in get_linux_distro since that's where it seems to recognize FreeBSD. However, regardless of what get_linux_distro() returns, it seems to default to use the ubuntu Distro class regardless. I can only get it to change the Distro class if it's directly set in cloud.cfg. What is the purpose of get_linux_dist [08:45] ro then? === tds6 is now known as tds === tds8 is now known as tds === tds1 is now known as tds [13:42] joshualyle: is your cloud.cfg actually saying system_info: distro: Ubuntu? [13:42] if not, it could also be the fallthru, default [13:44] which makes me wonder, did Goneri adapt that for his NetBSD branch? [13:49] ah, yes, he simplified it: https://github.com/canonical/cloud-init/pull/62/files === QuosqueTandem is now known as hggdh [16:24] my experimental NetBSD works fine, I now need to clean up the patch, and refresh the unit-test [16:24] :-) [18:33] meena: It attempts to use ubuntu regardless of if I include system_info: distro: Ubuntu in cloud.cfg or not. I was originally using a cloud.cfg that only had information for users without system_info: defined anywhere but it always identified (or fell back to) ubuntu [18:34] explicitly setting system_info: distro: openbsd was the only way I could get it to try to use an openbsd Distro class [18:51] I guess what I'm not getting is, how does cloud-init determine the class to use if it's not explicitly defined in cloud.cfg [19:23] joshualyle: iirc, Ubuntu is default [19:26] meena: but then do you have any idea why there is so much code to discover the OS if it essentially just relies on the config file? [19:27] the config file can override the detection, in some cases. the point is that your os doesn't have a working get_linux_distro() implemented [19:30] Although, Goneri's implementation should work for all BSDs [19:36] I hope I'm not being annoying at this point but I guess what I still don't understand is when the detection takes effect. If the distro is defined in cloud.cfg, it is used to determine the distro class. If it is not, it seems to use settings.py to fallback to ubuntu [19:54] joshualyle: nah, you're not annoying, it's just late here, and most of the maintainers are off until next year [19:55] aaaaand, while i have dabbled in that code, i haven't added a whole new distro / os [20:01] alrighty I gotcha. Well I appreciate your help. I'll keep digging! [20:04] i would just take Goneri's implementation of get_linux_distro() and start from there [20:05] Also, his NetBSD branch might give you other ideas! [20:05] also, https://hackmd.io/3-YBj1t9TAeKhmfLBQUjXQ [20:06] (i'm @igalic on github, btw) [20:34] joshualyle, I would like to focus on OpenBSD once NetBSD will be merged. But first, I need to figure out how to build a disk image. [20:35] something like https://github.com/virt-lightning/netbsd-cloud-images [20:35] this is the first step [20:36] my last NetBSD qcow2 snapshot: https://virt-lightning.org/images/netbsd-8/disk.qcow2 [20:36] works fine with VirtLightning and OpenStack [20:46] meena: thank you! Once I figure out the structure of cloud-init in master, I'll probably branch off of Goneri's netbsd branch to see if I can figure it out for openbsd [20:51] Goneri: what exactly does that build script do? Install netbsd, add cloudinit, and reboot? [21:01] it prepares an image disk, and indeed, install cloud-init after. [21:03] joshualyle, to be honest, I've never used OpenBSD, so you will probably be faster than me :-) [21:03] so if you've something functional, I will be happy to help. [21:09] in general, the hardest part to do right, is the filesystem/partition resizing. [21:25] I appreciate it! I haven't contributed to OSS before but I've done a lot in cloud work and was sad to see the state of adoption of BSD in cloud environments so I wanted to see if I could help [21:43] 22:09 in general, the hardest part to do right, is the filesystem/partition resizing. ⬅️ cuz you're not using zfs [23:30] I'm starting to think that a decorator is our best chance [23:51] meena, there is no ZFS on OpenBSD and NetBSD, even if things are change with NetBSD-9