blackboxsw | and drop the super deprecated modules part 2 https://github.com/canonical/cloud-init/pull/134 | 00:03 |
---|---|---|
blackboxsw | ok EOD for me | 00:03 |
mkrai | blackboxsw, Hi I get error running clour-init query all command http://paste.openstack.org/show/787808/ | 08:32 |
otubo | I have to work in such a different timezone, any of the maintainers here can help with the migrate-lp-user-to-github script? | 14:03 |
otubo | smoser: blackboxsw perhaps are already up : | 14:03 |
otubo | *I hate to work, I can't even blame the autocorrect, it's my mind that want's to leave on vacation already :-D | 14:04 |
otubo | Ha! No worries smoser blackboxsw, I just figured out the problem I was having. That's my launchpad-github mapping https://github.com/canonical/cloud-init/pull/135 | 14:26 |
otubo | Also, I run the script with --dryrun enabled but it ended up doing the whole proccess. Perhaps there's a bug there. :-) | 14:27 |
Odd_Bloke | blackboxsw: I'm seeing a bunch of automated "This bug is believed to be fixed in cloud-init in version 19.2-67" bug mail from you, with the last number changing in (what looks like) each one. Is that intentional? | 14:41 |
Odd_Bloke | Oh, I see the PR now. | 14:43 |
=== hggdh is now known as QuosqueTandem | ||
smoser | Odd_Bloke: i just did https://github.com/canonical/cloud-init/pull/135 | 15:10 |
smoser | approved it, but if you can land it.. i'm not sure (i need to figure out) what the landing process is. | 15:10 |
otubo | smoser: Odd_Bloke rharper blackboxsw guys, I'm leaving for the shutdown now. Thanks for the good work this year. See ya in the next decade. :-) | 15:13 |
Odd_Bloke | otubo: Thanks, have a good break! :) | 15:23 |
Odd_Bloke | smoser: I can't see o'tubo in our CLA spreadsheet, so I'm checking internally if we have a non-individual signature that covers them. | 15:25 |
danmux | Hi, is it ok to ask for help on using cloud-init in here, it's not just reserved for development? | 15:29 |
Odd_Bloke | danmux: Yep, please do! | 15:32 |
danmux | ace! specifically multipart user-data and jinja2 | 15:34 |
danmux | Should I be using `Content-Type: text/jinja2` in place of `text/cloud-config` ? | 15:35 |
danmux | (also can i confirm `cloud-init devel render` does not handle muilti-part files, just the raw template bit) | 15:36 |
danmux | in which case how best can I test my multipart `user-data.txt` | 15:38 |
Odd_Bloke | Hmm, good questions. | 15:40 |
Odd_Bloke | I haven't really dealt with multipart user-data much myself. | 15:41 |
Odd_Bloke | smoser: blackboxsw: Perhaps one of you have context to answer (some of) the above without digging into the code too much? | 15:41 |
danmux | I've been digging around the code a bit, and it looks to me like it is either or thing but I'm not 100% | 15:54 |
danmux | I can't tell if it would go on and honour the `template` directive - for example... | 15:54 |
danmux | ```Content-Type: multipart/mixed; boundary="MIMEBOUNDARY"MIME-Version: 1.0--MIMEBOUNDARYContent-Transfer-Encoding: 7bitContent-Type: text/cloud-configMime-Version: 1.0## template: jinja#cloud-configwrite_files: - path: /usr/local/etc/nomad/client.hcl``` | 15:54 |
danmux | (oops) | 15:55 |
danmux | for info `/usr/bin/cloud-init 19.2-36-g059d049c-0ubuntu2~18.04.1` | 15:58 |
blackboxsw | danmux: it's been a while since I've touched that part of the code. will run a test. I think you might have had to pass text/jinja2 as content type. But, will validate and get you a working example | 16:25 |
danmux | blackboxsw hang fire a sec - im able to test now | 16:26 |
blackboxsw | sweet | 16:26 |
danmux | hmm ok it failed | 16:27 |
danmux | oh should i be editing the `.i` file ? | 16:28 |
danmux | blackboxsw - ok I was running a single module again, but i think the templating is done in `init`? | 16:30 |
danmux | ah - im doing something dumb | 16:33 |
blackboxsw | danmux, here's what works for me | 16:45 |
blackboxsw | ... sorry getting a paste together | 16:45 |
danmux | (y) | 16:46 |
blackboxsw | danmux: at long last https://pastebin.ubuntu.com/p/GzbR23WjQg/ | 16:48 |
danmux | tyvm - you couldn't paste the `mime-msg` as well blackboxsw :pray: | 16:50 |
blackboxsw | to retest on your system that had already booted cloud-init. you can run the following to clean you system, force a reboot and re-run cloud-init with : sudo cloud-init clean --logs --reboot | 16:50 |
blackboxsw | ahh will do now danmux | 16:51 |
blackboxsw | danmux: https://pastebin.ubuntu.com/p/XKwSf7x4bX/ | 16:52 |
danmux | great ty for the test advice - otherwise I should just setup a container as per your example. | 16:52 |
blackboxsw | the tool in cloud-init ./tools/make-mime.py -a <your_yaml>:<mime-type> | 16:52 |
blackboxsw | will generate that content for you | 16:53 |
blackboxsw | if you have cloud-init source tree | 16:53 |
blackboxsw | https://github.com/canonical/cloud-init/blob/master/tools/make-mime.py | 16:53 |
danmux | yup - got it - ours is being generated by terraform. But with your info I'm sure i can make some progress! | 16:54 |
blackboxsw | good luck :) | 16:54 |
blackboxsw | hope it helps | 16:54 |
danmux | Woohooo! blackboxsw that nailed it! tyvm - no I can sign off for Christmas (UK timezone) - Merry Christmas to you and to Odd_Bloke for the referral (y) | 17:23 |
blackboxsw | Schweet! danmux | 17:23 |
danmux | s/no/now | 17:23 |
blackboxsw | good to hear | 17:23 |
=== hjensas is now known as hjensas|afk | ||
meena | ah, the joy of freelancing. no holidays, no vacations, no time off, no nothing | 18:05 |
meena | (i think i'm mostly joking, but i can't really tell) | 18:06 |
meena | https://github.com/canonical/cloud-init/pull/61#pullrequestreview-335429532 merge? | 18:12 |
blackboxsw | hah! | 18:18 |
blackboxsw | powersj: minor suggestion on your doc branch and I think we can land it https://github.com/canonical/cloud-init/pull/109#pullrequestreview-335437127 | 18:27 |
powersj | blackboxsw, fixed | 18:27 |
blackboxsw | meena: I'll let Odd_Bloke close out on that review | 18:27 |
blackboxsw | approved waiting on CI | 18:32 |
Odd_Bloke | meena: Goneri: It's landed! | 18:45 |
Odd_Bloke | blackboxsw: https://github.com/canonical/cloud-init/pull/136 | 18:54 |
meena | cool, cool, cool | 19:17 |
meena | now, it's time for some refactoring | 19:17 |
blackboxsw | Odd_Bloke: on it for 136. and powers I replied to your doc https://github.com/canonical/cloud-init/pull/104/files | 19:20 |
blackboxsw | ooh meena, putting the fun back into refactoring :) | 19:20 |
meena | "can't spell refactoring without fun" — blackboxsw | 19:23 |
blackboxsw | :) -> lunch -> coffee | 19:24 |
blackboxsw | or -> coffee -> lunch .... can't decide | 19:25 |
meena | i find lunch - > coffee to be slightly more conducive to having a proper post lunch sleep and then wake up refreshed | 19:28 |
Odd_Bloke | "refunctoring" means "rewriting in Haskell", right? | 19:29 |
meena | I'm partial to any functional language i can write, haskell i can only read | 19:35 |
Odd_Bloke | powersj: blackboxsw: Let's kick off the holidays (and the decade) the right way: https://github.com/canonical/cloud-init/pull/137 | 20:28 |
blackboxsw | woot! | 20:28 |
blackboxsw | Odd_Bloke: in the theme of dropping all the dead code: https://github.com/canonical/cloud-init/pull/134 | 20:30 |
blackboxsw | your above is +2'd just waiting on CI | 20:30 |
Odd_Bloke | blackboxsw: The PR I've already Approved, you mean? ;) | 20:30 |
blackboxsw | hah | 20:30 |
blackboxsw | ahh I'll wait for your py.27 to land and I'll close out 134 | 20:31 |
Odd_Bloke | Thanks for the speedy reviews! | 20:31 |
blackboxsw | unfractured attention makes for light work :) | 20:32 |
Odd_Bloke | Landed. \o/ | 20:49 |
blackboxsw | Odd_Bloke: can you confirm breakage of make config/cloud.cfg | 20:59 |
blackboxsw | or powersj | 21:00 |
blackboxsw | on focal it doesn't work for me as it tries to interpret $user from config/cloud.cfg.tmpl line 17 | 21:00 |
blackboxsw | as a required substitution param | 21:00 |
Odd_Bloke | blackboxsw: Breakage of what exactly? | 21:01 |
blackboxsw | return str(selected_params[key]) | 21:01 |
blackboxsw | KeyError: 'user' | 21:01 |
blackboxsw | make: *** [Makefile:79: config/cloud.cfg] Error 1 | 21:01 |
blackboxsw | no emitted 'rendered' cloud-config | 21:02 |
blackboxsw | I'm unable to make that target (to generate cloud.cfg from template) | 21:02 |
blackboxsw | and if I do provide a bogus user: ME to the templater.render_string(...., tpl_params) then I get a rendered output file that subtitutes ME for $user on line 17 of config/cloud.cfg.tmpl | 21:04 |
blackboxsw | it's tools/render-cloudcfg is called by setup.py during package creation. I'm wondering why that hasn't broken our package builds too | 21:06 |
blackboxsw | interesting. this works on xenial: ./tools/render-cloudcfg --variant ubuntu config/cloud.cfg.tmpl | 21:08 |
blackboxsw | not on focal | 21:08 |
Odd_Bloke | I have never seen these Make targets before. :p | 21:08 |
blackboxsw | yeah I hadn't until I started fgreping. so something else in the template engine is getting hung up on the $user in the config template file | 21:08 |
blackboxsw | I think it may be focal only | 21:09 |
Odd_Bloke | blackboxsw: What do you want me to run to reproduce? | 21:09 |
blackboxsw | checking eoan /bionic I might have a trivial patch | 21:09 |
blackboxsw | Odd_Bloke ./tools/render-cloudcfg --variant ubuntu config/cloud.cfg.tmpl | 21:09 |
Odd_Bloke | And what are these used for? (Should we remove them?) | 21:09 |
blackboxsw | should emit output to stdout with the rendered template | 21:09 |
Odd_Bloke | It does. | 21:09 |
blackboxsw | Odd_Bloke: they are used in setup.py to build the package | 21:09 |
blackboxsw | but we probably can drop the makefile target | 21:10 |
powersj | blackboxsw, if these were broken, how did you upload to focal? | 21:10 |
Odd_Bloke | OK, so we probably shouldn't remove them. :p | 21:10 |
blackboxsw | powersj: I think something in the python environment used though dh_python is succeeding there whereas direct script running through python3 does not. | 21:11 |
powersj | ah | 21:11 |
Odd_Bloke | blackboxsw: I can't reproduce a problem on focal. | 21:11 |
blackboxsw | ok so something from where I sit | 21:11 |
blackboxsw | hrm | 21:11 |
blackboxsw | ahh I'm on eoan :/ | 21:12 |
blackboxsw | checking eoan and focal containers | 21:12 |
blackboxsw | and upgrading my laptop | 21:13 |
blackboxsw | ok success on focal | 21:14 |
blackboxsw | ok; dirty local dev environment. Fresh eoan no problems. something I've inevitably pip installed that is colliding w/ the renders | 21:18 |
blackboxsw | Odd_Bloke: powersj n/m thanks for validation | 21:18 |
powersj | :D | 21:18 |
* blackboxsw should work in a clean dev container to avoid thrashing | 21:18 | |
meena | someone post an image link or a github thingy pls | 21:18 |
blackboxsw | https://imgflip.com/i/3k3kft | 21:22 |
meena | excellent, previews are working. | 21:31 |
meena | now, to get back to refunctoring. | 21:31 |
meena | whoa | 21:37 |
meena | Python2.7 is dead?! | 21:37 |
Goneri | <Odd_Bloke> meena: Goneri: It's landed! <3 | 21:38 |
Odd_Bloke | meena: Yep! \o/ | 21:39 |
meena | Odd_Bloke: can i get some starting help with the refactor? | 21:40 |
blackboxsw | long live python 3 | 21:40 |
meena | just to get the class(es) started, i can do the rest myself. | 21:40 |
meena | blackboxsw: ETA for Python 4? :P | 21:41 |
Odd_Bloke | meena: This is wrong point in the decade to ask for help, I'm afraid. ;) | 21:44 |
Goneri | Odd_Bloke, thank you, now I will refresh the netbsd branch :-) | 21:45 |
meena | Odd_Bloke: in that case, i'll just repeat all of Distros mistake, and you get to fix them next decade. | 21:45 |
Odd_Bloke | meena: I would experiment with moving one of the two "*_on_{freebsd,linux}" functions onto either the Distro or Renderer classes. | 21:45 |
Odd_Bloke | Which one they go on will probably depend on what makes sense in the structure of the code. | 21:45 |
Goneri | I think we need a distros/linux.py and some inheritance | 21:45 |
Goneri | and a lot of linux specific content should be move from net/__init__.py to this new distros/linux.py | 21:46 |
meena | Goneri: that's what distros/__init__.py is. | 21:46 |
Goneri | distros/__init__.py is linux specific, it should be agnostic | 21:46 |
Odd_Bloke | On the Distro would seem more natural to me, as the functions aren't to do with the rendering of network stuff. | 21:47 |
Odd_Bloke | I would suggest that refactoring them onto an existing class would make sense. | 21:47 |
Odd_Bloke | Refactoring to have a Linux Distro and an agnostic, shared super-class is something I would support, but we would need to discuss that as a project. | 21:48 |
Goneri | a large part of net/__init__.py is actually just some Linux specific code. | 21:48 |
Goneri | Odd_Bloke, yes maybe, it's indeed already a good step in the right direction. | 21:48 |
Odd_Bloke | As a reminder, the intent of the exercise is to gather data about what refactoring looks like it would make sense. | 21:49 |
Odd_Bloke | So we don't need it to be Done (TM). | 21:49 |
Odd_Bloke | We just need to be able to see roughly what it would look like, and modifying the existing distros.Distro to add functionality and overriding it in freebsd.Distro would do that, I think. | 21:50 |
meena | Good point. | 21:50 |
meena | points. | 21:50 |
Goneri | IMO, a good metric is the number of is_FreeBSD in the code base | 21:50 |
Goneri | the less, the better | 21:50 |
Odd_Bloke | Agreed. | 21:51 |
meena | Odd_Bloke: how do we access the distro from cloudinit/net? | 21:59 |
Odd_Bloke | meena: That will be one thing that will need to be worked out. | 22:03 |
meena | Odd_Bloke: >_> | 22:05 |
meena | okay. | 22:05 |
Odd_Bloke | (= | 22:08 |
meena | i wonder if we can do that with decorators… maybe. probably not. | 22:12 |
meena | maybe the easiest way would be to | 22:49 |
meena | hmm… a class? | 23:02 |
* meena gives up for tonight o/~ | 23:19 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!