/srv/irclogs.ubuntu.com/2020/10/06/#cloud-init.txt

catphishis there a definitive interface for a Datasource somewhere? i see there is an interface described at https://cloudinit.readthedocs.io/en/latest/topics/datasources.html but it appears to be incomplete07:09
catphishit seems that largely one inherits DataSource, is this the correct approach? i'm just not sure I understand what methods i then need to implement to return everything useful07:12
=== vrubiolo1 is now known as vrubiolo
catphishi can of course just copy an existing datasource for now, the main aspect seems to be setting self.metadata properties, and letting the superclass do the rest, hopefully i'll get my head around what data is needed07:25
meenacatphish: what's your DataSource? a network service?07:56
catphishmeena: yes, i've written a _get_data method that pulls data from a network source, this works, but i'm now quite confused by what to actually set / return from my module08:10
catphishi think it doesn't help that i'm not hugely familiar with cloud-init more generally, just trying to understand the formats of user-data, vendor-data, and things that don't fit into either08:11
meenacatphish: my experience of the code is mostly networking…08:16
catphishmeena: this is my datasource so far: https://paste.ubuntu.com/p/YjRrq6VNT2/08:17
catphishthere's a ton missing i have no doubt, i'm just woefully lacking understanding of what data is actually needed, and where to put it08:17
catphishlooking at digitalocean as an example, they generate a vendor_data string elsewhere, and pass it though to self.vendordata_raw=08:21
catphishthat's probably the most important step here08:21
catphishin digitalocean's code, they set a number of things independently of user data and vendor data: https://paste.ubuntu.com/p/hD6yZ2ydnT/08:23
catphishi don't totally understand what's special about local-hostname, public-keys, availability_zone that mean they are set separately, i hope i'm making sense, i'm just a little confused about that *should* be set by this get_data method08:24
meenacatphish: does availability zone even apply to your cloud?08:28
catphishwell, i haven't found a definition of "availability zone", but i'm assuming this would be populated with the name of the data centre, so if that's the case, yes08:30
catphishi think i'm actually getting there, at least in practical terms: if i set metadata['instance-id'], metadata['local-hostname'], vendordata_raw (to something pre-generated elsewhere), then it appears to work, i then also have to separately implement network_config to return the network config, it seems a little messy, but appears to be functional, and how others do it, i hope i'm not missing something fundamental here08:33
catphishi geuss network information, and very basic metadata (local-hostname) is separate from the actual user and vendor data, but it would be nice to know exactly which fields are required and available to set08:34
catphishactually, i think the selection of fields that are not part of userdata/vendordata are defined here: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html08:35
catphishso perhaps i'm getting there :)08:35
meenado other clouds' documentation help understand what availability zones are? https://docs.microsoft.com/en-us/azure/availability-zones/az-overview08:36
catphishah yes, i was just thinking about that actually, in my case, i have data centres, which i will probably put in the "region" field, and then in each data centre, multiple clusters with no common hardware, to the latter is the "availability zone"08:38
catphishmeena: thanks, i've got something that makes a lot more sense to me now! https://paste.ubuntu.com/p/8RQD5Z3Cth/08:45
=== hjensas__ is now known as hjensas
otuboHey guys, any chance to take a look at my pull request super quick? https://github.com/canonical/cloud-init/pull/58613:55
Odd_Blokecatphish: There isn't really good documentation for the datasource interface, unfortunately, no.  So your approach of examining other DSes and seeing what works is, unfortunately, probably the best way forward.15:12
catphishOdd_Bloke: thank you, are you able to confirm that what i'm returning / setting here is sane? https://paste.ubuntu.com/p/8RQD5Z3Cth/15:14
catphish(lines 42 to 48) mostly15:14
Odd_Blokecatphish: It doesn't look obviously wrong, but I can't be sure it's _right_. :)15:42
catphishthanks :)15:46
catphishi obviously have lots more to do anyway15:47
Odd_BlokeHey folks, as discussed at the summit, we've published a Discourse post to replace most of the copy/paste in the IRC status meeting: https://discourse.ubuntu.com/t/cloud-init-status-10-06-2020/18651.  Chad is currently wrestling NickServ, but we are around for office hours as of now.16:38
Odd_BlokePlease feel free to ask us about code reviews, or anything else cloud-init related!16:39
blackboxswsorry folks sorted my client16:40
=== blackboxsw changed the topic of #cloud-init to: pull-requests https://git.io/JeVed | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting Oct 20 16:15 UTC | 20.3 (Aug 25) | https://bugs.launchpad.net/cloud-init/+filebug
=== blackboxsw changed the topic of #cloud-init to: pull-requests https://git.io/JeVed | Meeting minutes: https://goo.gl/mrHdaj | Next Office Hours: Oct 20 16:15 UTC | 20.3 (Aug 25) | https://bugs.launchpad.net/cloud-init/+filebug
meenaotubo: your pr needs a rebase. i think it looks good18:30
meenait feels really fun to be mentioned in hat status report https://discourse.ubuntu.com/t/cloud-init-status-10-06-2020/18651 as FreeBSD representative18:31
meena(I'm not a FreeBSD committer, not even a ports committer)18:32
blackboxswfun or funny/strange?  You are totally involved/owning in FreeBSD support from cloud-init's perspective :)18:32
blackboxswstreet credit :)18:32
meenai stopped getting involved in street fights in my mid twenties18:33
meenaI'm a respectable person and mother now18:33

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