=== cpaelzer__ is now known as cpaelzer
=== hjensas is now known as hjensas|PTO
=== vrubiolo1 is now known as vrubiolo
smoseri'm not sure what this ailure is... but i dont think related to the pull request it came from13:48
smoser https://travis-ci.com/github/canonical/cloud-init/jobs/42133881113:48
smoser(#640 https://github.com/canonical/cloud-init/pull/640/checks?check_run_id=1331314409)13:48
AscIIyeah, I don't get it either13:48
smoserintegration test failed. in colect_test_data13:58
smoser2020-10-30 10:07:15,081 - /home/travis/build/canonical/cloud-init/tests/cloud_tests/stage.py:run_stage:102 [ERROR]: stage: collect test data for xenial encountered error: Create instance from copy: The container is already frozen13:58
smoseri hit 're-run' , but i dont know if it did anything13:58
AscIIdoes not look like it14:00
smoserOdd_Bloke: help? ^ or blackboxsw or falcojr ?14:08
Odd_BlokeHuh, I've never seen that before.14:09
Odd_BlokeLooks like a new LXD snap did land today, so it could be an issue with that, I'll test locally.14:10
smoserhooray for "dude on the internet broke my c-i"14:11
falcojrthat's why we have CI, right? ;)14:11
otuboblackboxsw: thanks for the feedback! According to https://fedorapeople.org/groups/schedule/f-34/f-34-key-tasks.html Fedora 23 will branch from Rawhide on 2021-02-09. So I guess that's time enough for at least one cloud-init release :-)14:12
otubo*Fedora 34, missclicked sorry :-)14:12
Odd_Bloke(https://github.com/lxc/lxd/commit/1cb7475c22a02f5317641c746c87430b0d561551 landed 4 days ago, seems unlikely to be a coincidence.)14:24
Odd_BlokeOK, I can reproduce it locally; I'll submit a PR to pin our `snap install lxd` at an older known-working version and then file a bug with lxd.14:56
Odd_Bloke(I expect the response will be roughly "lol pylxd" but nevertheless. :p)14:56
Odd_Blokesmoser: https://github.com/canonical/cloud-init/pull/642 <-- it's not a linter by any means, but this should at least guide people in a clearer direction?14:59
smoserOdd_Bloke: its a good idea. commented there.15:14
danzarovhello guys, does anybody know if there is a way I can perform a for loop to add users instead of specifying multiple user blocks like showed here https://cloudinit.readthedocs.io/en/20.3/topics/examples.html#including-users-and-groups15:20
danzarovi know i can use a variable type string and do something like: - name: ${username} ...and so on15:21
danzarovbut still i would need to create multiple variables and multiple user blocks15:21
smoserdanzarov: i think maybe if you start it with ## template: jinja you can use jinja.15:34
smoserbut a simple "another layer of indirection" solves the problem too.15:34
smoserjust have a program write the user-data that you provide.15:34
meenai used pylxd while developing against the go API, because go has no REPL15:46
rharperfalcojr: https://github.com/canonical/cloud-init/pull/598  I approved this; it needs a rebase;  I don't see the rebase and merge button; not sure if you can do that;16:07
danzarovsmoser, nice, im going to try jinja, thanks (:16:12
Odd_Blokerharper: There should be an "Update branch" button (which would then mean you could use the "Squash and merge" button once it was up-to-date), but the submitter must have disabled the option that allows maintainers to push to their branch.  That means we're reliant on them updating the branch for landing.16:23
Odd_Bloke(Same issue as with A'scII y'day.)16:23
Odd_Blokerharper: If we don't hear anything from them for a while, then we can work around it by opening a PR with their commits rebased; they wouldn't receive credit as the committer of the squash commit in that case, however.16:26
=== Odd_Bloke changed the topic of #cloud-init to: Known CI Issue: https://github.com/canonical/cloud-init/pull/643 | 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
Odd_Blokesmoser: rharper: blackboxsw: If I could get a review of https://github.com/canonical/cloud-init/pull/643, we can unblock CI while I dig into the specifics of the LXD failure.16:29
blackboxswgrabbing that now thanks Odd_Bloke16:30
smoseroh, falcojr doesnt count16:33
smoseri saw his and left it16:33
falcojrhaha, all my reviews are still pretend16:34
blackboxswworking towards it https://discourse.ubuntu.com/t/submitting-for-commit-rights-to-cloud-init/18770 :)16:35
rharper"latest lxd 4.7 snap causes failures"  when has lxd update not broken users?16:36
smoser https://github.com/canonical/cloud-init/pull/64016:39
smoserwhy dont' i see a "update branch" button16:39
smosermaybe AscII did not say "allow maintainers to update" or somethign ?16:39
smoserAscII: can you fetch && rebase ?16:39
smoserand push16:39
AscIIsmoser: i simply don't have that setting. Odd_Bloke guessed this might be because it's an organization repo18:03
AscIIit might really be simpler if I delete the fork on the org repo and set up a new one in my own namespace18:04
smoserAscII: well i dont care too much either way18:07
smoserand really this should not be a problem.18:07
AscIIanyway, it's rebased and you could merge it18:08
blackboxswAscII: I think that might make sense, for future PRs, I see the mismatch between hetzneronline vs18:08
blackboxswasciiprod. So pushes to your own remote may give you the permission to check the box that says "allow maintainer changes"  for this one off the rebase will/should work18:08
blackboxswn/m too late18:08
blackboxswn/m too late. as in, you already solved it.18:09
meenaglad we solved that mystery18:09
AscIIThe PR is too embarrasing anyway. I should have doubled checked that before blindly adding the check18:10
AscIIand voila, travis is happy too18:10
=== Odd_Bloke 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
smoserAscII: landed.18:14
Odd_Blokestgraber is fixing our lxd issue: https://github.com/lxc/lxd/pull/810218:14
smoserAscII: well, to be fair to me (who requested the check) you would have just added a more subtle bug18:14
smoserwhich was sometimes metadata['instance-id'] would have been a integer, and sometimes a string.18:14
blackboxswWoot! Odd_Bloke thanks!18:15
AscIIyou are right, that would have been an even bigger pain.18:15
blackboxswsmoser: rharper do either of you use https://github.com/cloud-init/qa-scripts/ repo anymore. We'd like to consolidate unused repos  (moving anything applicable into uss-tableflip.18:16
smoserthings that are there that i have used in the past 6 months:18:18
blackboxswboth public repos (we'll make sure no internal  jobs etc are using it), just didn't want to find out later about other consumers18:18
smoser * get-propposed-cloudimg18:18
smoser * lxc-proposed-snapshot18:18
smoser - lxc-pstart18:18
smoserand those depend on psuedo-init i think18:19
blackboxswthanks smoser, we'll tease out those dependencies and make sure to wrap up missing script dependencies. goal is to get applicable scripts/tools into  uss-tableflip/scrits18:22
smoseryeah. thats fine.18:22
rharperblackboxsw: same as smoser;  I think paride 's plan of merging bits into tableflip is fine18:24
blackboxswgood deal. thanks rharper18:24
meenahttps://github.com/canonical/cloud-init/pull/637 is ready to go19:13
meenaand so is https://github.com/canonical/cloud-init/pull/625 ( @ smoser )21:00
danzarovsmoser, i tried a bunch of different ways but it didn't work :( maybe because i'm trying to use the ##template: jinja inside the AWS::EC2::LaunchTemplate UserData21:30
danzarovit doesnt seem to be interpreting the code21:30
powersjdanzarov, are you base64 encoding your data?21:32
danzarov@powersj, yup :/21:32
danzarovit works, just the jinja code that doesn't21:32
danzarovi did a very similar approach to the accepted answer here /\21:33
danzarovbut seems that using # {% for x in anything %} is just interpreted as a comment, im not sure21:34
powersjyeah based on our docs I don't think you want to comment them: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html?highlight=jinja#using-instance-data21:35
danzarovi saw that one, im not using inside the runcmd: directive though21:35
meena(https://github.com/canonical/cloud-init/pull/622 also looks ready but needs another rebase)21:35
danzarovlet me show you how im trying to do that @powersj, just a sec21:36
danzarovsomething like that21:40
danzarovbut i dont think this is possible21:40
powersjblackboxsw, is it possible to use custom variables with cloud-init's jinja parsing? or is it limited to only variables exposed in /run/cloud-init/instance-data.json?21:46
powersjdanzarov, fwiw I did get https://pastebin.ubuntu.com/p/KXhrDyC7w9/ to create alice and bob22:01
powersjthe set line didn't seem to work when commented out as I got "Format for 'users' key must be a comma separated string or a dictionary or a list and not NoneType"22:04
powersjso it appeared to not resolve the list name22:04
blackboxswpowersj: no custom vars permitted by cloud-init proper jinja handling per the simplistic rendering of vars we do here https://github.com/canonical/cloud-init/blob/master/cloudinit/handlers/jinja_template.py#L8122:05
powersjand when uncommented I got Could not render jinja template variables22:05
blackboxswextending that to add customized support would not be a "hard" if we have a feature bug etc22:05
meenaa feature bug…22:06
powersjit's the featured bug of the week :P22:06
powersjdanzarov, btw the way I was testing this was using lxd per https://cloudinit.readthedocs.io/en/latest/topics/faq.html#lxd22:08
powersjlol @ "btw the way"... maybe I should call it a week22:08
meenapowersj  https://twitter.com/musha68k/status/132229913616784179622:08
danzarov@powersj, that's interesting, gonna test it on my environment22:09
danzarovdid the alice and bob example worked?22:10
powersjdanzarov, https://pastebin.ubuntu.com/p/xcfCJNpJNF/22:14
danzarovim spinning up a cluster here, gonna test inside the UserData22:15
danzarovlets see how it goes22:15
blackboxswdanzarov: powersj if something goes awry and you instance doesn't look like it got setup properly, you can quickly inspect the rendered userdata on the instance with `sudo cloud-init query --format="$(cloud-init query userdata)"`22:21
blackboxswwhat the above cmd does is `cloud-init query userdata` report the raw userdata template you provided to the instance at launch.22:21
danzarovthats good, will be very useful22:21
powersjthat is a good one blackboxsw we should add that to the docs page for jinja22:22
blackboxswthe `cloud-init query --format` wrapper will render the jinja template content and try performing your loop to see ultimately how the final  #cloud-config looked with vars rendered loops iterated22:22
blackboxswyeah will add that now22:22
blackboxswjust came up with it as I hadn't thought of a non-lxd way to iterate quickly on this22:22
blackboxswdanzarov: feature-wise you were looking initially to support rendering,reacting to the host underlying environment variables in jinja templates?22:23
blackboxswlike whether an image or environement could expose an environment variable that cloud-init's jinja template could react to?22:24
blackboxswI ask as powersj alluded to "custom variables with cloud-init's jinja parsing"22:24
powersjblackboxsw, https://pastebin.com/TMsKWR69 that was what danzarov was trying to do22:24
blackboxswI like the idea of augmenting the stock vars that are available to cloud-init's jinja templates,22:25
blackboxswright where names were hardcoded in the user-data though  {% set list1 = ['name1', 'name2'] %}22:25
danzarovhrmm got this22:25
danzarovOct 30 22:20:58 cloud-init[3577]: util.py[WARNING]: Failed loading yaml blob. Invalid format at line 8 column 4: "while scanning for the next token22:25
danzarovfound character '%' that cannot start any token22:25
danzarov  in "<string>", line 8, column 4:22:25
danzarov      {% for name in ["alice", "bob"] - ...22:25
danzarov       ^"22:25
danzarovops, sorry multiple lines22:26
blackboxswI was wondering about whether there were a need to have a {% set userlist = env['CUSTOM_USERS'] %} type facility22:26
blackboxswas right now we limit cloud-init template vars to just instance-data.json22:26
blackboxswit would be a nice facility to allow augmenting those template vars22:27
danzarov@blackboxsw, actually i did that just to illustrate, what im doing in reallity is seting the userlist variable with a list comming from terraform cloudformation stack parameters22:27
danzarovso i basically assigned userlist with this list of usernames comming from terraform22:27
danzarovand i want to loop like @powersj did22:28
danzarovbut i got this error, i wonder if this is specific to UserData in aws launchtemplate UserData22:28
blackboxswas a note, any variables exposed by the metadata service gets cached in cloud-init's instance data and a `cloud-init query --all` can list any available keys/data from that datasource under the 'ds' key22:28
blackboxswso if there are ways for you to expose terraform stack params via the datasource,then cloud-init jinja templates pick up on that22:29
danzarovhumm i saw something interesting using the command you mentioned above22:29
danzarovsudo cloud-init query --format="$(cloud-init query userdata)"22:29
danzarovWARNING: Ignoring jinja template for query commandline: 'tuple object' has no attribute 'split'22:29
danzarovgot this22:30
danzarovoh i didnt know about the ds key22:30
blackboxswok so back out to `sudo cloud-init query userdata`22:30
blackboxswyou'll need to be running as root user for all query commands using userdata. so the call should actually be `cloud-init query --format="$(sudo cloud-init query userdata)"22:31
danzarovoh wait, i left a mistake on my code that can be causing the problem22:31
danzarov  # {% set list1 = var.split(',') %}22:31
* powersj disappers 22:31
danzarovlet me remove this and try again22:32
danzarovbtw i was doing this split because i had to pass a string like username = 'user1,user2,user3'. because cloudformation stack resource doesnt support passing a list22:35
danzarovhmm weird, same error as above22:43
danzarovfound character '%' that cannot start any token22:43
blackboxswdrive by doc pr  https://github.com/canonical/cloud-init/pull/645/files23:10
blackboxsw<- dinner run. have a good one folks23:10
danzarovthanks for the help23:10
danzarovblackboxsw, powersj you guys rock! it worked (((:23:32
danzarovi had some indentation problem after that code, sorry didnt notice at first23:33

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