[07:09] <catphish> is 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 incomplete
[07:12] <catphish> it 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 useful
[07:25] <catphish> i 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 needed
[07:56] <meena> catphish: what's your DataSource? a network service?
[08:10] <catphish> meena: 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 module
[08:11] <catphish> i 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 either
[08:16] <meena> catphish: my experience of the code is mostly networking…
[08:17] <catphish> meena: this is my datasource so far: https://paste.ubuntu.com/p/YjRrq6VNT2/
[08:17] <catphish> there's a ton missing i have no doubt, i'm just woefully lacking understanding of what data is actually needed, and where to put it
[08:21] <catphish> looking at digitalocean as an example, they generate a vendor_data string elsewhere, and pass it though to self.vendordata_raw=
[08:21] <catphish> that's probably the most important step here
[08:23] <catphish> in digitalocean's code, they set a number of things independently of user data and vendor data: https://paste.ubuntu.com/p/hD6yZ2ydnT/
[08:24] <catphish> i 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 method
[08:28] <meena> catphish: does availability zone even apply to your cloud?
[08:30] <catphish> well, 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, yes
[08:33] <catphish> i 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 here
[08:34] <catphish> i 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 set
[08:35] <catphish> actually, i think the selection of fields that are not part of userdata/vendordata are defined here: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html
[08:35] <catphish> so perhaps i'm getting there :)
[08:36] <meena> do other clouds' documentation help understand what availability zones are? https://docs.microsoft.com/en-us/azure/availability-zones/az-overview
[08:38] <catphish> ah 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:45] <catphish> meena: thanks, i've got something that makes a lot more sense to me now! https://paste.ubuntu.com/p/8RQD5Z3Cth/
[13:55] <otubo> Hey guys, any chance to take a look at my pull request super quick? https://github.com/canonical/cloud-init/pull/586
[15:12] <Odd_Bloke> catphish: 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:14] <catphish> Odd_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) mostly
[15:42] <Odd_Bloke> catphish: It doesn't look obviously wrong, but I can't be sure it's _right_. :)
[15:46] <catphish> thanks :)
[15:47] <catphish> i obviously have lots more to do anyway
[16:38] <Odd_Bloke> Hey 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:39] <Odd_Bloke> Please feel free to ask us about code reviews, or anything else cloud-init related!
[16:40] <blackboxsw> sorry folks sorted my client
[18:30] <meena> otubo: your pr needs a rebase. i think it looks good
[18:31] <meena> it feels really fun to be mentioned in hat status report https://discourse.ubuntu.com/t/cloud-init-status-10-06-2020/18651 as FreeBSD representative
[18:32] <meena> (I'm not a FreeBSD committer, not even a ports committer)
[18:32] <blackboxsw> fun or funny/strange?  You are totally involved/owning in FreeBSD support from cloud-init's perspective :)
[18:32] <blackboxsw> street credit :)
[18:33] <meena> i stopped getting involved in street fights in my mid twenties
[18:33] <meena> I'm a respectable person and mother now