Thursday, 2017-05-11

jamielennoxjeblair: re variants, i agree i don't want everything global. In repo will stop the v2 job name spread, but i would say that applying extra selectors to a single project is exactly the reason i would expect that the same job name can be specified multiple times within a project job list as multiple jobs, rather than refinements of the first00:00
jamielennoxbut i'm more interested in the second point00:00
jamielennox"implied project variants are the only way to modify a job defined in another project"00:01
jamielennoxi'm not sure I understand why this is something we would want00:01
* jamielennox has some cycles to spare if someone wants to point me at a task00:07
jamielennoxdont want to add much more to that github stack until some merges00:08
jeblairjamielennox: you can use the same job multiple times in a project so that you can say "run devstack on trusty on the stable branch; run devstack on xenial on the master branch".  it isn't really intended to run the same job multiple times with different content -- that's different jobs.  to go back to your example "tox" isn't sufficiently descriptive for a job.  if you say to a user "the tox job succeeded" the next question is "which tox job?", ...01:00
jeblair... so "tox-py27" and "tox-py35" are more useful job names.01:00
jamielennoxjeblair: but job.name there is the unique component, so i can't just change that to describe a new job01:02
jamielennoxalthough i guess i can via parent: instead of name:01:02
jeblairjamielennox: right, i think in your example, tox-py27 with 'parent: tox' makes sense -- you can even use the same playbook and just have it use a job variable for the environment selection.01:03
jamielennoxi didn't intend to turn this into a multi-day debate, just something i wasn't expecting to be caught by01:03
jamielennoxyea, so i think it'd be useful to catch and raise validation error if you have the same job.name defined multiple times in a project section01:04
jeblairjamielennox: heh, with folks at summit and folks not, everything is multi-day.  it's worth working through this :)    and hopefully our standard library will have really good examples for people to follow.01:05
jamielennoxi can't think of any valid case why people would do that instead of define it all in one job section and it was a surprise01:05
jeblairjamielennox: (yes -- though only if they have the same selectors; i do still think we need to be able to have project-specific selectors, which means they have to be able to appear more than once, but just with different selection criteria)01:06
jeblairnext week i think we'll be ready to start working on standard lib / shared jobs in earnest01:06
jamielennoxjeblair: ok, so that's what i'm not sure about with the selectors - and i don't know if i can still access my old commit01:09
jamielennoxbut to me {{ tox_env_name }} would be a distinguishing selector01:09
jeblairjamielennox: by selector, i mean something that decides whether the job should run.  for instance, a branch selector.  so if a job shows up more than once, it should look like: "[{devstack: {branch: stable, nodes: trusty}}, {devstack: {branch: master, nodes: xenial}}]".  so only one of those gets run.01:11
jamielennoxjeblair: yea, ok01:13
jamielennoxso yea, i'm happy with a validation error for now so that if this becomes a bigger problem in future we can do something about it and non break backwards compatibility01:14
jeblairjamielennox: yeah, i think this is going to work well most of the time, but we probably need to make sure that either via docs, examples, config comments, etc, we convey some of these concepts01:15
jamielennoxjeblair: i assume it's rather late and you don't want to get into a conversation about tenant backends?01:17
jeblairjamielennox: yeah, i need to retire for the evening01:18
jamielennoxjeblair: no worries, in the meantime though do you have anything on the v3 path needing picked up?01:19
jamielennoxi don't want to grow that github tree any further01:20
pabelangero/01:22
* SpamapS has been making good progress on py3 in-flight01:35
SpamapSa few of the suites even pass01:35
SpamapSgoing to be quite a few patches though01:36
SpamapSin fact most of my problems are now in zk and mysql I think01:37
SpamapSjamielennox: you can grab anything unassigned in https://storyboard.openstack.org/#!/board/4101:42
SpamapSTodo is the more important stuff01:42
jamielennoxSpamapS: i was actually looking for that again cause i couldn't find my bookmark01:43
jamielennoxturning up at storyboard.openstack.org and trying to find that is not intuitive01:43
SpamapSnope it's pretty hard to find there ;)01:44
pabelangerI am learning that a dict.values() returns a view in python3, not a list01:54
pabelangernow we get to do list(dict.values())01:54
SpamapSpabelanger: correct02:03
SpamapSquite a few of those in my patch stream02:04
SpamapSwe do a lot of foo.values()[0] in zuul02:04
pabelangerSpamapS: Ah, I have been doing list(dict.values) because we actually check to see isinstance list02:05
SpamapSthat's sometimes needed too02:05
SpamapSa few places we return .values() from a method and it's more appropriate to return a list.02:06
SpamapSpabelanger: I'm pretty close to having tox -epy35 return 002:11
SpamapSwith a lot of skips02:11
SpamapSand depending on gear.Text* which is effectively going to be ggear0.8 I think02:11
pabelangercool, I hope to continue with nodepool tomorrow02:12
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Ensure zookeeper_servers is a list  https://review.openstack.org/46388002:12
pabelangerI think that is all I will do this evening02:12
SpamapSIt would be great if we can get them gated on py3 soon so the websocket stuff can land02:12
*** Cibo has quit IRC02:26
*** jamielennox has quit IRC04:34
*** jamielennox has joined #zuul04:34
* SpamapS has a py3k patch bomb04:41
SpamapSthat passes tox -epy3504:41
SpamapS(skipping a few really hard ones for py3)04:41
SpamapSINCOMING04:45
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Use gear Text interface  https://review.openstack.org/46146804:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Copy dirs to handle __pycache__ in py3  https://review.openstack.org/46389004:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: fix imports in py3  https://review.openstack.org/46389104:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: py3 Changes in __del__ for gitpython  https://review.openstack.org/46389204:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: hashlib error  https://review.openstack.org/46389304:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: make Job and ZuulRole hashable  https://review.openstack.org/46389404:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: None does not compare to int  https://review.openstack.org/46389504:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Fixes for test_model in py3  https://review.openstack.org/46389604:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: writing yaml to disk needs bytes  https://review.openstack.org/46389704:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: view changes for py3  https://review.openstack.org/46389804:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Encoding changes in tests for py3  https://review.openstack.org/46389904:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: base64 changes for py3  https://review.openstack.org/46390004:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: misc py3 changes  https://review.openstack.org/46390104:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: fix webapp tests for py3  https://review.openstack.org/46390204:46
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: skip py3 failing tests  https://review.openstack.org/46390304:46
SpamapSjeblair: if you want that squashed ^^ I'd understand. :)04:46
SpamapSfigured this allows topical reviewer load04:46
*** bhavik1 has joined #zuul06:50
*** DangerousDaren has joined #zuul07:39
*** hashar has joined #zuul08:29
*** isaacb has joined #zuul08:52
*** smyers has quit IRC09:04
*** hashar has quit IRC09:07
*** Cibo has joined #zuul09:08
*** smyers has joined #zuul09:15
*** Cibo has quit IRC09:17
*** Cibo has joined #zuul09:27
*** Cibo has quit IRC11:05
*** bhavik1 has quit IRC11:15
*** jkilpatr has joined #zuul12:09
*** jkilpatr has quit IRC12:41
*** patrickeast has quit IRC12:43
*** patrickeast has joined #zuul12:43
dmsimardpabelanger: should I create something in storyboard for nodepool boot from volume ?12:55
*** dkranz_ has quit IRC13:15
pabelangerdmsimard: I'd like to find jeblair this morning and chat about it13:30
dmsimardpabelanger: ok13:30
*** zaro has quit IRC13:38
*** zaro has joined #zuul13:39
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Sort flavors with operator.itemgetter('ram')  https://review.openstack.org/46399813:58
pabelangerShrews: ^ I am open to suggests for sorting flavors :) I managed to look to mordred and shade for some hints13:58
jeblairpabelanger, mordred, Shrews, SpamapS, jamielennox, jlk, fungi, clarkb: i won't be able to attend monday's zuul meeting; do others want to have it or should we cancel it?14:01
clarkbI can go either way. Monday is looking like expense report day for me14:04
pabelangerno objection to skipping14:04
*** yolanda has quit IRC14:14
*** yolanda has joined #zuul14:16
*** dkranz_ has joined #zuul14:21
fungii'm in favor of skipping. i _could_ make it but expect to be pretty burned out monday14:33
jeblairSpamapS: py3k stack reviewed; couple of comments, mostly +2s.  thanks!14:47
*** isaacb has quit IRC14:56
pabelangernodepool.tests.test_launcher.TestLauncher.test_lost_requests appears to be flapping15:13
*** isaacb has joined #zuul15:16
mordredpabelanger: maybe we should just shift nodepool to using the method that shade has15:32
mordredpabelanger: I'll try to make a patch tomorrow15:32
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Ensure zookeeper_servers is a list  https://review.openstack.org/46388015:34
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Sort flavors with operator.itemgetter('ram')  https://review.openstack.org/46399815:34
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Replace dict.iteritems() with dict.items() for python3  https://review.openstack.org/46402615:34
pabelangermordred: danke15:34
jlkjeblair: I won't likely make it if there were a meeting.15:36
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Update exception message handling for python3  https://review.openstack.org/46403415:59
SpamapSjeblair: \o/ thanks!16:06
* SpamapS +1's cancelling monday zuul meeting16:07
*** isaacb has quit IRC16:09
jeblairjlk: i've left a few more more reviews on the github stack16:13
*** jkilpatr has joined #zuul16:18
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Switch to next(generator) for python3  https://review.openstack.org/46404016:22
* jlk sits down, cracks nuckels, and prepares to read Jim's reviews.16:29
SpamapSjeblair: heh, one more attribute needed text'ing on gear. :-P16:30
* SpamapS adds exception16:30
jlkjeblair: if you're okay with all the URLs changing with v3, then I could see doing away with status_urL_with_change config entry and always putting the change in the status URL.16:42
jlkalthough... I'm not so sure the gerrit driver makes use of status_url16:42
jlkjeblair: I think you removed it in 60af7f42d0cd24539c8d408a73a7bdbe6ce6e48516:44
openstackgerritDavid Shrewsbury proposed openstack-infra/zuul feature/zuulv3: WIP: Add web-based console log streaming  https://review.openstack.org/46335316:44
Shrewsflake8 seems to have suddenly developed an aversion to async code16:44
*** Cibo_ has joined #zuul16:51
*** jkilpatr has quit IRC16:55
SpamapSShrews: it realized the futility of python16:56
Shrewshrm, it seemed to start complaining when i changed to the 3.5 asyncio style16:57
jlkhrm, anybody here familiar with the jquery.zuul.js file willing to lend me a hand?16:59
Shrewsand pep8/flake8 are pinned in g-r16:59
Shrewsgrrr16:59
Shrewsbut zuul isn't beholden to g-r, right?17:00
Shrewsso now i'm not sure where zuul gets its versions of those from, b/c the latest certainly aren't being installed17:02
Shrewsoh, from hacking17:10
Shrewswell poo17:10
*** DangerousDaren has quit IRC17:12
SpamapSwoot, 4 more tests enabled by fixing flake8 problems17:14
Shrewsjeblair, mordred: well, it seems 'hacking' does not yet support py 3.5, but it is a goal for pike (https://governance.openstack.org/tc/goals/pike/python35.html). So I guess I'm going to have to go back to the pre-3.5 version of asyncio syntax.  :(17:22
jesusaurjlk: oh, that removal of status_url kinda changes how we want to handle the github status link17:22
jlkyeah17:22
SpamapShrm17:23
jlkI'm now looking at the pipeline start-message config, which is right in the pipeline17:23
jlkbut... given that end users can define their own pipelines, that gets .... weird.17:23
SpamapSplaying with py3 brings up an interesting question about whether or not to try and enable binary secrets. pretty sure right now if somebody encrypts a binary private key it will explode.17:23
SpamapS(since we're all JSON based and JSON can't really handle non-utf8)17:25
clarkbShrews: or just dont use hacking?17:25
clarkbShrews: we explicitly ignore all hacking rules anyways so its jjst a simple install linters thing17:26
Shrewsclarkb: well, that's a possibility of course.17:26
clarkbbut we can install directly instead without losing anything17:26
Shrewsseems like a good discussion for the zuul meeting that we are not having  :)17:27
jesusaurjlk: yeah, my change originally added support for status_url in the pipeline and fall back to the old status_url in zuul.conf, but maybe now what we want is a pipeline-level success-url?17:28
* jesusaur needs to re-learn the config paths17:28
SpamapSjeblair: any thoughts on binary secrets? I think at this point we're going to have to have people hand them to us base64 encoded, but we might be able to retool our internal json message passing to do that for everything and then we can take small binary blobs as secrets.17:29
jlkwell, we could probably re-use the pipeline level start-message as the URL.  But the problem I see with any pipeline level thing is that pipelines are now usable by more than one connection17:30
jlkjesusaur: pipeline level configs cover the whole pipeline, but what we'd really want is connection level settings for this, since the URL could differ per-connection?  Dunno. Maybe not.17:30
jlkactually probably not since they'd all come back to zuul in some way17:31
jesusaurwould it be too ugly to add a github-status-url setting to the pipeline, which only gets used in the context of a github connection?17:32
jesusaurhm, but then again there's the issue of users possibly making their own pipelines, which gets weird17:33
jlkI think this is the same quandary that jamielennox was having17:34
jlkit does feel like we need something more centrally configured for this17:34
jesusaurit seems to me like it should be a connection-level setting17:35
jlkso perhaps in the [connection] block we add a status_url17:35
jlkat least for github driver17:35
jlkwe get self.driver and self.connection as reporter attributes17:36
SpamapSusers making their own pipelines? can you elaborate?17:37
SpamapSpipelines are only in config repos17:37
jlkah17:37
jlkwhat all can be loaded from a untrusted-projects ?17:38
jlkSo we could do this as a connection level setting in our config, or a pipeline level setting17:40
jlkone is more "DRY" than the other17:40
SpamapSjob and project configs17:41
SpamapSyou can load what jobs to run, and make jobs parented on existing jobs17:41
SpamapSincoming rebase17:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: skip py3 failing tests  https://review.openstack.org/46390317:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: fix webapp tests for py3  https://review.openstack.org/46390217:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: misc py3 changes  https://review.openstack.org/46390117:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: base64 changes for py3  https://review.openstack.org/46390017:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Encoding changes in tests for py3  https://review.openstack.org/46389917:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: view changes for py3  https://review.openstack.org/46389817:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: writing yaml to disk needs bytes  https://review.openstack.org/46389717:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Fixes for test_model in py3  https://review.openstack.org/46389617:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Use gear Text interface  https://review.openstack.org/46146817:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: None does not compare to int  https://review.openstack.org/46389517:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: make Job and ZuulRole hashable  https://review.openstack.org/46389417:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: py3 hashlib error  https://review.openstack.org/46389317:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: py3 Changes in __del__ for gitpython  https://review.openstack.org/46389217:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: fix imports in py3  https://review.openstack.org/46389117:42
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Explicitly decode decrypted secrets for py3  https://review.openstack.org/46404917:42
SpamapSnow only 10 tests disabled for py317:42
jlkSpamapS: so we're trying to find a home for a configuration of what URL to put in the github status body we send up at start/success/failure.17:43
jlkSpamapS: it used to be based on status_url in zuul config, but that got dropped in v317:43
jlkseemingly dropped in favor of pipeline.start_message17:43
SpamapSahh17:43
SpamapSso it's unstructured now17:43
SpamapSfeels like a thing that would be in zuul config really17:44
SpamapSwhen would it differ per-pipeline or per-connection?17:44
jlkthat's what I'm trying to think through17:44
jlkfor _our_ needs, we point back to the zuul status engine, with change identifiers so that the status page can show something.17:46
jlkor later, we point to our logs host to show the logs dump17:46
jlkeventually we may point to a page that will stream the jobs/logs, a la Travis17:46
jlkbut I am not being imaginative enough to think through when it would differ on a single pipeline per connection, or differ across all the pipelines at all.17:47
SpamapSyeah17:48
SpamapSI think it goes in zuul's conf file17:48
jlkthat seems to tie reporter back to scheduler, which jeblair was trying to undo17:49
jlkre 60af7f42d0cd24539c8d408a73a7bdbe6ce6e48517:50
jlkwell sorry I take that back17:50
jlkIf we put it in the [connection] block then we have ready access to it without having to go through self.sched.config.get, it'd be in self.connection.connection_config.get17:51
jlkI'm not sure if that semantic is enough for jim or not17:51
SpamapSnor I, but it feels silly to have something that is site-specific be duplicated on every connection. That said, how many github connections will there be? ;-)17:52
jlkdepends on if we want to support multiple GHEs with a single Zuul backend17:52
*** Cibo_ has quit IRC17:54
jlkI think I'm going to comment in the change and move on.17:56
* SpamapS is trying to shake off the "we're so close" feeling that the last 36 hours of py3 hacking has produced17:57
jlkhaha17:57
* jeblair catches up18:37
jeblairSpamapS: re binary secrets -- maybe we should treat *all* secrets as binary18:37
jeblairSpamapS: zuul deosn't care what they are, so we never actually need to decode them18:38
SpamapSjeblair: right, but we do have to put them into ansible's vars.18:38
SpamapSwhich implies json and thus can't be binary18:38
jeblairSpamapS: json or yaml?18:39
SpamapSthat's a great question18:39
SpamapSjson is used internally18:39
SpamapSbut we get to yaml things18:39
SpamapSand I don't know how or if yaml handles binary data18:39
jeblairSpamapS: if we're using pyyaml to write ansible vars files, it should dtrt (which is, in the case of binary data, do an automatic base64 thing)18:40
jeblairSpamapS: so i think the work would mostly be to make sure that we treat them all as binary internally in zuul, and make sure that makes it across the json bridge between scheduler and executor correctly18:41
SpamapSinteresting..18:41
SpamapSpython3 happily dumps binary data into yaml18:41
SpamapSer18:41
SpamapSpython218:41
jlkerm18:41
jlkwait18:41
jlkYou can put base64 things into ansible vars18:42
SpamapS!!binary |18:42
openstackSpamapS: Error: "!binary" is not a valid command.18:42
SpamapS  f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAsCVAAAAAAABAAAAAAAAAADDEAAAAAAAAAAAAAEAAOAAJ18:42
SpamapSyaml does it like that18:42
jeblairyeah that's the thing :)18:42
jlkin fact, there is Ansible filters for going in/out of base6418:42
SpamapSbut then i thought modules read json18:42
jlk{{ foo|b64decode }}18:43
* SpamapS pokes at this with a stick18:43
jlkSpamapS: you'd probably decode it on the way _into_ the module.18:43
jlkmodule:18:43
jlk  arg_that_is_secret: "{{ secret_var|b64decode }}"18:43
jeblair(i'll try to catch up on the status url thing, but it will take me a minute)18:44
jlkI digested into a review comment for you18:45
SpamapSjlk: Yeah I'm looking at how this mechanically works now18:45
jlkoooh hey, with ANsible 2.3 you can now have a single encrypted variable in an otherwise unencrypted YAML file18:47
jeblairjlk: oh thanks... going to read18:48
SpamapSdoes not work well18:49
SpamapShttp://paste.openstack.org/show/609390/18:49
SpamapSthat playbook, with a binary fed in via a yaml file, produces the text representation18:50
SpamapSas in,  the file has  b'\x00...' in it18:50
jlkoh so when you do content: that gets double processed18:50
jlkso it's... weird18:50
jlkso you may need to go ahead and re |b64encode   it18:50
SpamapSeh, no18:52
SpamapSthe data in the variable is real binary data18:52
SpamapSnot b64 encoded18:52
jlkoh. hrm.18:52
jlkI think...18:52
SpamapSI bet this doesn't work18:52
jlkI think you have to b64 encode it don't you?18:52
SpamapSyep18:52
SpamapSb64 encode it inside playbook, so feeding it to module works18:53
jlkI meant get it b64 encoded in the yaml.18:53
SpamapSand then there's probably some kind of "don't do that" in ansible docs18:53
SpamapSRealistically our target here is passwords and OAUTH-style tokens18:54
jlkhttps://github.com/ansible/ansible/issues/1379418:54
jlkalso relevant https://github.com/ansible/ansible-modules-extras/pull/14218:56
SpamapSyeah18:56
SpamapSwow, old pull18:58
jlkheh18:58
jlklooks like later they just added the ability for the copy module to copy around vaulted files18:58
SpamapSUGH18:59
SpamapSvault is super lame :(18:59
SpamapSthat's fairly disappointing18:59
jlkcould be worse, could be Barbican18:59
SpamapSIf it was Hashicorp vault, yay18:59
SpamapSbut it's ansible vault18:59
SpamapSwhich is meh18:59
jeblairwell, we're not looking at using vault right now, right?  all we want to do is put some (not secret from ansible's pov) data in a vars file19:00
SpamapSI think what we may need to do is have two types19:01
SpamapSsomething to tell zuul to base64 encode it when putting it in the variables19:01
jlkAre we writing a tool for people to use to encrypt the data?19:01
SpamapSjlk: yeah19:01
jlkquestion19:01
jlkcould we not _always_ base64 encode the data then?19:02
jeblairSpamapS: howe about if you want the secret base64 encoded, you base64 encode it.19:02
jlkis there a downside to base64 encoding non-binary content, so long as the decode works on the other side?19:02
SpamapSjeblair: I'm fine with that, but it severely limits the key size we can store in our current size limited PKCS container19:02
SpamapSI think it might even preclude 1024bit keys19:03
SpamapSbut I could be wrong19:03
* SpamapS didn't do the math19:03
jeblairSpamapS: okay, so what's wrong with splatting the binary data into the vars file?19:04
SpamapSjeblair: does not work, due to issue 13794 noted above, in ansible19:04
SpamapSthey'll utf-8 encode the binary data19:04
SpamapS(confirmed here on my laptop)19:04
jeblairhow would you use ansible to write an ssh private key file?19:06
SpamapSbase64 encode it, decode on the other end.19:06
jlkYou can copy it19:06
jlkyou'd use the copy module without using the 'content' method of that module19:06
SpamapSor yeah if you have it as a file19:06
jlkour problem is that we're trying to pass it through variables19:07
SpamapSthe problem really is there's no way to access vars without jinja'19:07
jeblairso there's no way to pass binary data into ansible as a variable and have that end up in a file19:07
jlkstraight binary, I don't think so19:07
jeblairswitching hats for a second: yowza that is... something we do *all the time* in puppet :(19:08
SpamapSyeah I think it's pretty broken that it's not possible19:08
jlkwe could be missing something, opening a convo in #ansible-devel19:08
jeblair(still with infra hat on (not zuul): i guess you could write a module to do that)19:09
jlkyeah, that module got rejected19:10
jlkand looking to try an dmake the copy module's content method have a "handle binary" way of operating seemed to fall over.19:10
jlkSEEMS like it's a jinja2 limitation19:10
SpamapSpretty sure modules receive their input as json19:11
SpamapSso this may just be impossible if there's nothing in that json interface that automatically b64's19:11
jeblairSpamapS: assuming jlk doesn't come back with new magic, i think you are right, we may need a zuul-internal workaround :(19:12
jeblairjlk, jesusaur: replied on 44678219:19
SpamapSjeblair: might be worth pushing it forward in parallel in ansible19:19
jeblairSpamapS: ++19:19
SpamapSjeblair: that would make me feel better about a janky internal workaround19:19
SpamapSa plugin might get it done19:21
jlkquestion19:26
jlkWe're reading the user's yaml file to find the secrets and decode them19:26
jlkthen we expose them as a variable ourselves19:27
jlkcouldn't we, at the point of decyrpting them, take the step to base64 encode them, so that Ansible will be able to handle them more easily?19:27
SpamapSyeah I think that may actually be the way to go19:28
jeblairbut optional, right?  since "mypassword" is not something that should necessarily be base64 encoded when passed to ansible19:28
SpamapSI think we could just base64 encode the value _if_ it won't utf8 decode19:28
SpamapSwhich is a bit janky19:28
jlkwell19:29
jlkI think it's like "the price of using this mechanism"19:29
jlkit's much easier to tell a user that everything encrypted will be base64 encoded19:29
jeblairSpamapS: well, i think the playbooks need to know which to expect, so a binary string that accidentally utf8 encodes would surprise the user19:29
jlkkind of like how everything slurped will be base64 encoded19:29
jlkhttp://docs.ansible.com/ansible/slurp_module.html19:29
jeblairjlk: but then we are placing extra requirements on top of what one would normally expect in a playbook...19:30
SpamapSjeblair: there's literally no way to get that binary string into their ansible except base64 encoded.19:30
SpamapSoh19:30
SpamapSn/m19:30
jeblairjlk: iow, an openstack playbook that expected plain-text username/password creds would not work19:30
SpamapSI read your assertion backwards19:30
SpamapSjeblair: yeah that's a very good point19:30
jlkhrm.19:30
jlkI see what you mean19:30
SpamapSso what if we make secrets vars always have a   _b64 variant19:30
SpamapSthe non _b64 variant of truly binary data will be bonghits19:31
jlkI think that still fails19:31
SpamapSit will be double-utf8-encoded19:32
jlkbecause the variable _name_ would change based on context (CI or not, encrypted or not)19:32
jlkso running your playbook outside of CI would be awkward19:32
jeblairwe could do something like that for the secret name in zuul though (maybe that's what SpamapS meant?)19:32
jlkmaybe I took the objection too far19:33
jlkdo we expect that the variable name doesn't change inside of zuul?19:33
jeblairsecret: name: foo; .... auth: secret: foo  / auth: secret: foo_6419:33
jeblairer, my suggestion has the problem of applying the transformation to all the elements of a secret (which is a collection of variables).  that's probably not desirable.19:34
jlkso with vault, if your file is decrypted or encrypted the variable names do not change19:34
jlkand the variable values do not change19:34
jeblairi wonder if the !!secret data type might be the best place to put the switch19:35
jeblairnope, that's not good either19:35
jlkwhich makes it somewhat convenient to run the playbooks in multiple locations19:35
jlkis what we are designing working the same?19:35
SpamapSit will cost very little to go ahead and feed every secret in twice, once as a utf-8 string (convenient but possibly corrupted) and once as a base64 encoded version (larger, requires decoding, but always exactly what you encrypted)19:35
jeblairjlk: yeah, when you say "secret: foo: bar" you get an ansible variable named "foo" with content var19:35
SpamapSit will be a bit painful to discover this19:36
jeblairSpamapS: though that impinges on the way a user would write a playbook19:36
SpamapSjeblair: I feel that ansible impinges on the way a user would write a playbook that needs binary variables19:36
jeblair:)19:37
jlkjeblair: hrm, I think that means replicating outside of zuul is hard, because something else will have to make that variable name shift of "secret.foo.bar" to just "foo.bar"19:37
jeblairjlk: i may not follow.  i was trying to say that we're trying to pass through names unmunged.19:38
jlkI feel like we'd better serve our users if they could run the playbook with an unencrypted vars file the same way it would be ran inside zuul encrypted19:38
jeblairjlk: that is the intent, and i think that's the case.19:38
jlkso "secret: foo: bar" goes in the project or job or pipeline def?19:38
SpamapSI think thus far I would prefer one of thse two: 1) all decrypted things are passed as base64 encoded values 2) all decrypted things are passed as a string, and a _b64 base64 encoded version.19:39
* jlk should go read the spec19:39
jeblairjlk: a secret is a top level config object, and is then referenced in a job.  oh, i do think we include the secret name in the variable name.  so i may have answered your question wrong, sorry.19:40
jeblairSpamapS: i have a third option19:41
jlkeither of you have a link to the spec?19:41
jeblairit's just the zuulv3 spec19:41
jeblairSpamapS: https://etherpad.openstack.org/p/OodXAsk1oM19:42
jeblairSpamapS: we have a 'data' field in the secret object.  we can add 'base64-data' to indicate that the fields within there should be written to ansible vars file as base6419:43
jeblairso that's an extra flag we can just pass all the way through to the executor and it can do what's appropriate when it writes it19:43
SpamapSjeblair: feels less magical and more predictable than my ideas. :)19:44
SpamapSand less annoying than (1)19:44
jlkso the spec assumes that the secrets are defined within the zuul yaml file, with their encrypted data there directly19:45
jlkand if a user wants to test locally, they'd have to write out their own vars file with the unencrypted data, in a hash that matches what zuul would provide19:46
jeblairjlk: i'm open to changing the variable naming scheme.  i think i agree with you on that; i worry about collisions being more likely, but maybe that's outweighed by your point.19:46
jlkwhat if there was a radically different approach?19:47
jlkmaybe this was already thought through19:47
pabelangerohai19:47
jlkbut model it slightly more like valut19:47
jlkvault.19:47
jlkThe secrets for a repo get put into a vars YAML file. That file can be wholly encrypted by our tool, and decrypted by Zuul19:48
jlkone-shot encrypt/decrypt of the whole thing19:48
SpamapSjlk: I think that's pretty simple to build into the encryption tool19:48
jlkthen ansible is ran with -e secrets-file.yaml19:48
SpamapSbut you can't decrypt what's in there19:48
SpamapSit's encrypted to US19:49
jlkin this model, the variable structure never changes, it's just stored in-repo encrypted.19:49
jlkSpamapS: I think that's fine19:49
jlkbecause locally you'd have the shadow un-encrypted version19:49
jlkupdate it locally, run the encrypter, commit the result19:49
jlkgit ignore the unencrypted one19:49
SpamapSright, that's pretty much how it works now19:50
jlkbut yeah I see how that's a problem (like with vault) in that you can't easily see the variable names19:50
jlkwell19:50
SpamapSthough it would be nice to basically just run zuul-encrypt-secrets -e @vars.yaml --encrypt-var password and have it just edit .zuul.yaml19:50
jlkin my model, the end user decides what format to use in the YAML19:50
jlkbe it binary, base64, whatever19:50
jlkwhat goes in is exactly what they expect on the other side19:51
jlkbecause we would encrypt the _file_ rather than trying to parse, encrypt, decrypt, re-create the same structure.19:51
SpamapSjlk: I see your point19:51
jeblairjlk: jobs need to request secrets though, which means we still need a zuul named data structure19:51
jeblairso we're doing double entry across files19:51
SpamapShowever, we will more quickly run afoul of the size limitations if we start encryptiong base 64 strings and not actual binary blobs.19:52
jlkdo jobs need to request _specific_ secrets, or just access to secrets at all?19:52
jeblairjlk: specific19:52
jlkokay, that throws a wrench into my model19:52
jlkdo we have use cases for such granular exposure?19:53
jeblairjlk: dropping the excess hierarchy may be the simplest thing (it makes the hand-created vars file more obvious)19:53
SpamapScncf-demo-aws cncf-demo-azure ?19:53
jeblairjlk: yes, should be in the spec, lemme look19:53
jlkstill trying to understand19:55
jlka job can only request a secret that's defined in teh same repo19:55
jlkso presumably you've got control of both (the repo and the job, thus the secret too)19:55
jlkis specific secret exposure a feature to reduce an attack surface of something?19:56
SpamapSyes, we don't want secrets to be exposed to untrusted playbooks :)19:56
jeblairjlk: hrm, i don't see that called out in the spec.  at any rate, we might have a lot of secrets in a trusted repo, yet have varying levels of trust of the jobs in that repo.  we might have a job we trust with gerrit creds but not pypi creds.  we need the jobs to request only the secrets they need so we're not exposing them unecessarily.19:56
SpamapSjlk: not sure what case you're making?19:56
jlkoh I think I get it now19:57
jlkthe code you're calling from the job shouldn't necessarily have access to every secret in the repo.19:57
jeblairright19:57
jeblairi have to move my biological containment vessel to another location now19:57
jlkeven though the same human controls the repo, has access to all the secrets, and wrote the job19:57
SpamapSwe might put more sensitive secrets on a different node type19:58
SpamapSyeah I have to get some lunch19:58
jlkyeah, I could see doing separate files for each level of secrets19:58
jlkbut that's forcing things into my model, for less good reasons19:58
jlk(job could request which _file_ of secrets, and only those files would be decrypted)19:59
jlkbasically what I'm trying to find is a good way for humans without the existence of zuul to easily run the playbooks19:59
jlkto replicate what CI is doing for debugging purposes19:59
SpamapSjlk: it's also worth noting that you can have job-only roles that coerce the secrets into the variables that are in your unencrypted version with set_fact...19:59
SpamapSinclude a set of tasks for that when: local_thing is undefined and zuul.secret.thing is defined20:00
SpamapSI do think it's a good idea to make the conversion from local-unencrypted to .zuul.yml really smooth20:00
jlkWe could probably make that a feature of the encryption too20:01
jlktool20:01
* SpamapS cracks his knuckles with his own ruler for using .yml20:01
SpamapSok... screen break20:01
jlkso running it locally just @unencrypted.yaml and you'll have the same variable names20:01
jlksame, lunch20:02
jeblairSpamapS, jlk: if you think about yaml file manipulation, you may want to look at the existing encrypt-secrets.py in zuul/tools and especially system-config/tools/hieraedit.py20:11
*** jkilpatr has joined #zuul20:27
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: WIP: debug test_lost_request failures  https://review.openstack.org/46407520:27
jeblairi'm probably going to be mostly unavailable until about wednesday20:27
*** hashar has joined #zuul20:28
pabelangerjeblair: I promise not to write any craxy playbooks20:29
pabelangercrazy*20:29
Shrewspabelanger: we need to wait for the image before starting the launcher (for the flapping test)20:34
Shrewshttp://logs.openstack.org/40/464040/1/check/nodepool-coverage-ubuntu-xenial/755b1ff/console.html#_2017-05-11_16_29_53_90479420:35
Shrewsso we have a race on the builder getting the image ready, and the launcher making sure there are images there to satisfy the request20:35
Shrewsfunny we are only now seeing that20:36
pabelangerShrews: That is what I think too.  For now, I added waitfornodes() to see how that worked, but maybe we need waitforimages() too?20:36
Shrewspabelanger: waitfornodes is too late in the process20:36
pabelangerShrews: yes, that is what I thought20:36
pabelangerso, let me see about adding waitforimage check20:37
Shrewswe need to not do pool.start() *until* waitforimage returns20:37
pabelangerk20:37
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Add waitForImage to test_lost_request  https://review.openstack.org/46407520:40
pabelangerShrews: ^ right?20:40
pabelangerI'll stack my py3 changes on that too,20:43
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Rename nodepool.py to launcher.py  https://review.openstack.org/46380720:45
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Ensure zookeeper_servers is a list  https://review.openstack.org/46388020:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Use six.moves.urllib for python3 compat  https://review.openstack.org/46359520:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Update exception message handling for python3  https://review.openstack.org/46403420:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Sort flavors with operator.itemgetter('ram')  https://review.openstack.org/46399820:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Use raise Exception for python3  https://review.openstack.org/46359420:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Replace dict.iteritems() with dict.items() for python3  https://review.openstack.org/46402620:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Switch to next(generator) for python3  https://review.openstack.org/46404020:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Fix imports for python3  https://review.openstack.org/46380820:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Remove FakeFile from fakeprovider.py  https://review.openstack.org/46358720:46
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: Python 3.x incompatible use of print operator  https://review.openstack.org/46358620:46
pabelangerlooks like nodepool.tests.test_commands.TestNodepoolCMD.test_delete_now is a little flappy too20:55
pabelangerhttp://logs.openstack.org/95/463595/4/check/nodepool-coverage-ubuntu-xenial/63d6712/console.html#_2017-05-11_20_51_05_90886820:55
*** dkranz_ has quit IRC20:59
pabelangerbest I can tell, zk.getNode() is returning no data21:18
openstackgerritPaul Belanger proposed openstack-infra/nodepool feature/zuulv3: DNM - TestNodepoolCMD.test_delete_now failure  https://review.openstack.org/46408321:25
*** hashar has quit IRC21:35
jlk(bringing convo here) jamielennox what was it you were saying that needed to be tenant specific for the URL we were talking about?21:50
jesusaurjlk: i think he was saying it was the webapp (which aiui is primarily the status.json endpoint, and not the whole js app)21:55
jesusaurjlk: so thinking about this a little more, i guess we want to be able to set two different urls: we want to point at the zuul webapp when the status is 'pending' and then we want to point at the logs host when the status is either 'success' or 'failure'22:02
jesusaurdoes that seem right?22:02
jlkfor now, for us, yes. Eventually for us I suspect we'll point to a single URL, and that single URL will be a webapp that can show the status of the job and click throughs for live logs as the jobs start22:03
SpamapSjlk: I kind of want that app to be status.json++22:07
SpamapSThere's nothing Bonny specific about any of that.22:08
SpamapSor github specific22:08
jlksure, depends on if we want our own branding skin on it though22:08
jlk(this is the Horizon problem)22:08
jamielennoxjlk: mostly i was wondering if we wanted to make things per-pipeline22:08
jamielennoxSpamapS: i expect zuul will publish a status.json (or something) that we would render independantly22:09
jlkI couldn't come up with a good reason, but that doesn't mean a good reason isn't out there22:09
jamielennoxi would happily expose whatever visualization that zuul has, but it wouldn't be the "Bonny" interface22:09
SpamapSso...22:10
SpamapSI'd prefer that we focus our dev on Zuul's webapp22:10
SpamapSSkinning it so people know they're looking at us is indeed something I'd want to do.22:11
jesusaurjamielennox: i think thats how the current status.json works, the 'webapp' just exposes a json blob, and then that gets read and rendered by the js in zuul/etc/status/public_html22:11
SpamapSBut log streaming, links to PR's, general overview, all things in Zuul now.22:11
SpamapSso given that, I think there's basically one value: what's the URL base to find the zuul webapp? And then secondary to that is "where did we stuff logs?"22:12
SpamapSWe had a discussion yesterday about possibly having zuul read a JSON file from the job's work directory that could have artifact/log paths in it, and feed that to any jobs depending on this one.22:13
SpamapS(an in-person discussion)22:13
jesusaurand maybe rather than try to figure out how to add the logs url as a status_url, we should try to add the logs url to the js that renders the status?22:14
jamielennoxso zuul will do streaming of job results and such, but it's not (AFAIK) ever looking to provide you like a nice web gui22:14
jamielennoxso it would be nice to have more concept of buildset handling (though maybe that's just a reporter)22:15
jamielennoxbut what we need for github is still that url that represents a buildset, rather than an individual build that zuul is set up for now22:16
jlkStyle question:22:16
jlkhttp://paste.openstack.org/show/609396/22:17
Shrewspabelanger: yes, that looks correct. the delete flap is a known thing and is a race within kazoo itself. we're kind of hoping to try out using kazoo read locks to prevent that, if we can ever get the change merged into kazoo22:21
jlknobody wants a bike shed opportunity?  :)22:25
SpamapSjlk: I like to pass my None's through to where they can do the most damage if unhandled ;)22:26
jlkhah, thankfully format() is pretty chill about them22:26
jlked = 'foo {something} bar {jerk}'22:26
jlkIn [17]: ed.format(something='derp', jerk=foo.get('baz'))22:27
jlkOut[17]: 'foo derp bar None'22:27
SpamapSjlk: I count that as "the most damage"22:27
jlkany of you familiar with how the status json filters work?22:33
*** jamielennox is now known as jamielennox|away22:42
*** harlowja has quit IRC22:57
*** harlowja has joined #zuul22:57
*** jamielennox|away is now known as jamielennox23:22

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