/srv/irclogs.ubuntu.com/2020/07/29/#cloud-init.txt

catphishis there a short answer to how to start building a datasource and make it execute?00:25
catphishah, it's documented at https://cloudinit.readthedocs.io/en/latest/topics/datasources.html - duh00:33
catphishthough i'm still not very clear about how to get started00:47
catphishanyway, i'd really appreciate it if anyone could point me in the direction of some very simple instructions on getting started, essentially i just want to place a datasource module somewhere and have it be executed to i can start developing, either by cloning the repo and running it, or by droping my module into a default ubuntu install, whichever is simlpler00:53
catphishmy initial attempt to place a file into cloudinit/sources and running "cloud-init init" do not result in my code running, so i'm clearly missing several steps to load the module and have it be identified as the active datasource00:55
=== MAbeeTT_ is now known as MAbeeTT
otuborharper, yes, RHEL8 is NetworkManager only (sorry for delay, was on PTO)08:28
catphishgood morning sirs, same question as last night, would anyone be able to point me in the direction of getting started developing for cloud-init, specifically i'm looking to create a datasource, but i need some basic pointers about how to run cloud-init from the repo, and how to add a datasource class so that it executes09:32
catphishhopefully i can use this as a template and try again https://github.com/canonical/cloud-init/commit/e80517ae6aea49c9ab3bd622a33fee44014f485f09:58
Odd_Blokecatphish: What platform are you creating a datasource for, out of interest?  To test cloud-init as if it's a first boot, you'll want to look at `cloud-init clean`; that will remove all of cloud-init's state.  Also note that the set of datasources cloud-init will consider is generally configured in /etc/cloud/cloud.cfg (or /e/c/cloud.cfg.d/*) so your source will need to be in that list to even be13:28
Odd_Blokeconsidered.13:28
Odd_Bloke(I would suggest adding it as the _only_ DS while you're iterating on it.)13:28
catphishOdd_Bloke: i'm writing a datasource for a new cloud provider - https://katapult.io/ - but my intention is for it to be somewhat different from the existing datasources, specifically because it will use http over ipv6 link local (possibly with multicast discovery), rather than DHCP or APIPA, if at all possible i will make it generic rather than proprietary13:33
catphishOdd_Bloke: thanks for the pointer, i will try adding my datasource module and adding it to /etc/cloud/cloud.cfg - i have one other question though, should i be hacking on an ubuntu install, or directly on the source repo, i couldn't work out how to execute the latter, i'm actually not that familiar with python packages13:35
Odd_Blokecatphish: It's probably easiest to iterate in an install; cloud-init is system software, so running it "from source" is tricky.  We generally use `./packages/bddeb` to build debs from the tree, which you can then install in an Ubuntu system to test.13:42
catphishthanks! i'll give that all a try13:44
Odd_Blokerharper: You mentioned "there's an existing test in-tree that tests the case where content is not shellscript" but I just added `assert False` to the top of UserDataProcessor._process_msg and it didn't cause any tests to fail.  Am I missing something?13:44
Odd_Bloke(Perhaps it's a cloud test, I realise immediately after sending that message.)13:44
Odd_BlokeOoor perhaps I hadn't saved the file?  I'm seeing failures now.13:46
Odd_Blokerharper: Disregard the above. :)13:46
otuboOdd_Bloke, smoser quick question about cloud-utils[-growpart]: What's the difference between these two? IIUC -growpart is the package shipped by distros that includes just the growpart script from cloud-utils. Is that correct?14:00
otuboOdd_Bloke, also, I was on PTO. Gonna fix that PR this week :-)14:01
=== cpaelzer_ is now known as cpaelzer
smoserotubo: i can't really speak to that.14:26
smoserubuntu ships 'cloud-image-utils' and 'cloud-guest-utils'.  growpart is included in cloud-guest-utils.14:27
smoseri really don't know about other distros.14:27
smoseri can agree that with 10  years of hindsight, the connection of 'growpart' to 'ec2metadata' seems silly.  it is "obvious" that I just should have made a separate upstream package for growpart.14:28
smoserwhat is more obvious is that I should have just written such a thing in C ;)14:29
meena*cough* rust *cough*14:37
smosermeena: yes. but please give the smoser from 10 years ago a break on that.14:39
smoserhe justu didn't think that rust was going to pan out.14:39
meenafair14:40
meenai think ten years ago i still held onto the believe that C is a real programming language.14:41
meenainstead of 38962 different dialects14:41
smoserbut for what its worth, if you're interrested in a rust rewrite of growpart14:41
smoser https://github.com/bottlerocket-os/bottlerocket/tree/develop/sources/growpart14:41
smosermight be a place to start.14:41
meenacool14:44
otubooh nice14:45
otubosmoser, thanks. Yeah, and the mystery of why distros ship growpart as a different package continues.14:46
otuboif I get any interesting info on that I'll leave some bits here :-)14:46
Odd_Blokehttps://github.com/canonical/cloud-init/pull/512 <-- short-term fix for the pylint CI failures we've started seeing since pytest 6.x released15:51
Odd_Blokerharper: ^ should fix your PR's CI failure.15:51
soasadaHi guys, I need some help. I have an Ubuntu 18.04 LTS VPS on OVH and has installed cloud-init. The thing is that I have just removed the "set_hostname" from "cloud_init_modules" in the "/etc/cloud/cloud.cfg" file and I reboot the server, the problem is that now I cannot connect to the server, is completely down. It is possible to recover it?15:56
Odd_Blokesoasada: I don't have experience with OVH; do you have access to a serial console for the machine?16:08
soasadaNo, I haven't16:09
Odd_BlokeHmm, then I don't know how much help we'll be able to offer here, you may need to follow up in OVH support channels.16:10
Odd_Bloke(FWIW, I wouldn't expect that change to take a server down completely, which is why I suspect this may be an OVH-specific issue.)16:11
soasadaok, so I have to contact then16:12
soasadathank you so much Odd_Bloke16:12
Odd_Blokesoasada: Good luck! :)16:12
Odd_Blokeblackboxsw_: That pytest change hasn't been released yet; any objection to landing that fix so CI will run, and backing it out once we do have a release?16:15
* blackboxsw_ was wondering about us actually pinning https://github.com/pytest-dev/pytest/commit/d46fe88ec33f3ee2aa8addc56ee090b0119474d3 for the moment.16:16
blackboxsw_in our deps. but, let's just go with the simpler <616:16
blackboxsw_can we add a comment about the pytest issue Odd_Bloke for reference16:17
blackboxsw_or make that the commit msg16:17
blackboxsw_either way, a bread crumb would be nice to the issue so future us can track closure and back this out16:17
Odd_Blokeblackboxsw_: Done.16:22
blackboxsw_and Approved thx16:22
rharperOdd_Bloke: thanks, i'll update18:15

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