Thursday, 2017-04-27

openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Fix zuul-nodepool integration test  https://review.openstack.org/46032500:15
jamielennoxjeblair: would you have an opinion on putting something like routes, or an actual web framework into the webapp?00:16
jamielennoxcurrently it's the only reason for the dep on both webob and paste (which is only used for the server) and has some misses00:16
jeblairjamielennox: probably a good idea.  should probably be something wsgi, so we can embed it in apache, etc.  but maybe visit this after productionized v3?00:17
jeblairjamielennox: what do you mean 'some misses'?00:18
jamielennoxjeblair: so the current one i just found was that both the status routes anchor at the end, but not the beginning00:20
jamielennoxso like /status/change/(\d+,\d+)$00:20
jamielennoxbut with v3 we expect a tenant id before /status00:20
jamielennoxthe old path matches, invokes the call, and then errors out into the logs because tenant_name == ''00:20
jamielennoxa 404/403/500 is probably ok, but the log message at ERROR is annoying00:21
jeblairyeah, i think there's more work to do there to finish making that multi-tenant.00:21
jamielennoxjeblair: so i started down the wsgi route on a previous patch, but the webapp thread reaches into state and queries tenant info etc00:21
jeblairjamielennox: yeah, if we want to make a real standalone wsgi app, it will be a bit more work (requiring interaction with the scheduler over gearman)00:22
jeblairso i think for now, best thing to do is clean up what we have so it doesn't become a big distraction, then look at doing something better later.00:23
jamielennoxjeblair: so for now i wasn't thinking anything that serious, routes should be fairly light on in just doing a proper url match, but anything wsgi should be hostable from the existing paste server00:23
jamielennoxi don't really have any opinions on frameworks, just something a bit stricter than current00:24
jamielennoxjeblair: is gearman maintaining that role longer term? i was expecting zuul would go zookeeper eventually in a similar way to nodepool00:26
jeblairjamielennox: i'd like to move to zk for zuulv4; we might want to spiff up the webapp before then.00:26
jeblairi have to work on dinner now00:27
jamielennoxok, thanks00:27
*** yolanda has quit IRC03:56
*** yolanda has joined #zuul04:04
*** yolanda has quit IRC04:10
*** isaacb has joined #zuul05:18
*** isaacb has quit IRC06:57
jamielennoxjeblair: for my backscroll tomorrow, why when you source.getProject() and it's missing do you add a new project of that name?07:01
jamielennoxhttp://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/driver/gerrit/gerritsource.py?h=feature/zuulv3#n4807:01
jamielennoxjeblair: it means for example when you use the webapp and the source + project doesn't exist it automatically creates one and then returns something you can't use07:02
jamielennoxand any projects that come over gerrit that are not in the layout get added07:03
jamielennoxit's not usable by webapp because public/private keys are added to the project object in configloader.py and so AttributeError instead of 404 when you try to fetch the key07:06
openstackgerritTobias Henkel proposed openstack-infra/zuul feature/zuulv3: Move dependency cycle detection into pipelines  https://review.openstack.org/45142309:02
*** jkt has quit IRC10:12
*** jkilpatr has quit IRC10:38
*** jkilpatr has joined #zuul11:08
*** dkranz has joined #zuul14:12
*** dkranz has quit IRC14:43
jeblairjamielennox: within the source, that's intentional so that if a change depends-on a project which isn't configured in zuul, it still works.14:53
jeblairjamielennox: the webapp should probably be changed to use the new hostname-qualified syntax for specifying a project, and use tenant.getProject, which will only return configured projects14:53
*** dkranz has joined #zuul15:01
SpamapSjeblair: I thought we'd move to etcd for zuulv4. All the cool kids are... ;-)15:24
jlketcd deployed on coreos managed by k8s15:25
jlksurely nobody would complain if k8s was a zuul requriement....15:25
jeblairSpamapS: let's see what's cool by the time we get to zuulv4 :)15:27
SpamapSretcd -- rust etcd ;-)15:28
* SpamapS has to stop15:28
SpamapSthat well went dry months ago :-P15:28
jlkdid it oxidize as it dried out?15:28
SpamapSmmmmmmmmmmmmmmmmmm dad jokes15:29
*** SpamapS has quit IRC15:37
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Fix zuul-nodepool integration test  https://review.openstack.org/46032515:37
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Enforce cloud as a required config value  https://review.openstack.org/46035415:37
jeblairmordred: ^ fixed one more test fixture that needed the cloud param15:37
*** SpamapS has joined #zuul15:37
* SpamapS notes weechat 1.7 looks a lot like weechat 1.315:38
pabelangerjeblair: speaking of cloud config value. I've notice we don't actually support reloads if clouds.yaml changes.  Meaning nodepool has to stop / start today. Is that something we can change moving forward? eg: any objections to write a patch to fix that15:45
*** herlo has quit IRC15:45
pabelangeror, will it be a fair amount of work15:45
jeblairpabelanger: the tricky part is that nodepool doesn't know about it at all.  probably the best compromise is to have nodepool accept a signal (or better yet, input on a socket) to force a flush of its providers.15:50
pabelangergood idea15:51
clarkbit could inotify on the file(s)15:51
jeblairclarkb: but it doesn't know about the file15:51
jeblairand part of the point of outsourcing it to osc is that it doesn't have to15:52
clarkbmaybe thats something osc could provide as a feature?15:52
pabelangerI was thinking we'd SIGUP from puppet when clouds.yaml changed or manually. Not sure if adding that logic into nodepool would be better or not15:52
pabelangerI'll see how to best flush providers in nodepool15:53
jeblairyeah, options like "here's the path to the config file we used" (if any -- you can configure a cloud entirely with env variables).  or even 'register callback function if config file changes' might be possibilities15:53
jeblairbut i think the sighup/socket approach is all we'd need for our use15:53
jeblair(and i think it's easy to incorporate into almost any config mgt system)15:54
jeblairi'd really like to avoid doing this until after zuulv3 though, please.  :)15:54
pabelangersure, just wanted check first, before working on it15:58
*** yolanda has joined #zuul16:09
openstackgerritDavid Shrewsbury proposed openstack-infra/zuul feature/zuulv3: Add config option for executor process user  https://review.openstack.org/46067116:30
ShrewsIf someone wants to supply definitions for the undocumented options that I added there ^^^, I'll be happy to add them in a new patchset.16:30
Shrewsor add your own patch set16:34
Shrewsor do it in a different review16:34
* Shrews embraces open source freedom16:34
jeblairShrews: done, in comments.16:36
Shrewsjeblair: THAT WAS NOT A VALID OPTION16:38
Shrews:)16:38
openstackgerritDavid Shrewsbury proposed openstack-infra/zuul feature/zuulv3: Add config option for executor process user  https://review.openstack.org/46067116:40
jeblairShrews: can you +3 https://review.openstack.org/460354 ?16:41
Shrewslooking16:41
Shrewsjeblair: that's an interesting test failure on 46035416:51
Shrewswe protect against that, from what I can see16:52
jlkclarkb: I think today I'm finally going to get around to trying to run tests locally again. But "locally" in my world would be in docker, so we'll see.16:52
clarkbjlk: I think the idea is "works in not the gate" whatever that means for you16:52
jlkwell, it hwas working on my 8 cpu VM16:52
jlkI wasn't "blocked" per se. Cloud is infinite, right?  :D16:53
Shrewsjeblair: oh, maybe we don't, actually16:53
mordredjeblair, clarkb, pabelanger: re: clouds.yaml reloads - I could totally see (later) adding an optional method to the OpenStackConfig object to register a callback function and to tell the object to monitor for config changes16:54
mordredI agree, I do not think it's a thing we should do right now - but I don't think it's a terrible or invasive feature to add later16:54
clarkbjlk: even on your 8cpu VM I think you should see about half the wall time and memory use goes from 4.6GB ish to 200MB ish16:55
clarkbso now you can cloud even ahrder16:55
jlkclarkb: yeah I did see tests get a lot faster after those fixes. That was very appreciated.16:56
jlkI have a lot less time to look at twitter while tests are running now16:57
openstackgerritDavid Shrewsbury proposed openstack-infra/nodepool feature/zuulv3: Protect against no matches for an upload  https://review.openstack.org/46067816:59
Shrewsjeblair: ^^^ that should fix that race, i think16:59
jeblairShrews: cool.  we'll need to recheck-bash mordred's change in before your fix will pass tests.17:01
jeblair(which i see is already in progress)17:01
jeblairthanks17:01
*** harlowja has quit IRC17:08
mordredjeblair: just got a questoin in a different channel about delay between patch merge and doc publication17:23
mordredjeblair: I mention it here because it makes me think that perhaps $something should emit an event that could be reported into places like IRC that is something like "post-jobs-for-change-XXX-complete"17:24
jeblairmordred: yes, an irc reporter would be great.  it's on my list of things to do after v3 is out.  another thing that will help there is a new "most recent only" pipeline manager.  it will reduce the delay between merge and publish by reducing the number of extraneous publication jobs.17:25
pabelangerfedmsg has an IRC plugin :)17:28
mordredjeblair: ++17:32
jeblairpabelanger: yep, fedmsg/mqtt is an option too -- i suspect we may still want an irc driver though because we may want an irc trigger.17:33
mordredjeblair, pabelanger: perhaps the fedmsg/mqtt driver would also implement the trigger interface in addition to the reporter interface?17:34
mordred(as could an irc-specific zuul driver)17:34
jeblairmordred: it could, but then where would we write rules that say "these commands in irc should be used to trigger these jobs, if issued by these people"?17:35
mordreda native IRC driver sounds lke a great idea to me (or a driver using that library we keep thinking of rewriting our bots in)17:35
jeblairthat sort of logic is easy to put in zuul, vs writing another system that bridges irc and fedmsg17:36
mordredjeblair: oh, I was mostly imagining that the fedmsg folks would have some sort of irc bot something that would allow them to configure those things - so the config in that case would be the irc-fedmsg interface, which would result in fedmsg messages being emitted or not17:37
jeblair(i expect we would have a fedmsg trigger too, of course)17:37
jeblairmordred: sure, if fedmsg already has that, that's the easier way17:37
mordredjeblair: and I mostly mentoined just because i'd _guess_ they'dhave such a bridge already17:37
* mordred thinks a fedmsg driver and an errbot driver would both be great - and both should implement all the things :)17:37
pabelanger++17:38
jlkat some point we should talk about extending the driver framework so that drivers can be shipped out of tree, and discovered if they are in the same python environment. That way somebody _could_ write a fedmsg driver without having to get it accepted in upstream zuul.17:44
jeblairjlk: yes; that's been the intent for a while.  however, i'd like to have some batteries included.  :)17:45
jlkabsolutely17:45
jeblairpabelanger: are you plannong on working on https://review.openstack.org/454396 ?17:45
openstackgerritMerged openstack-infra/nodepool feature/zuulv3: Enforce cloud as a required config value  https://review.openstack.org/46035417:46
jlkgerrit and github seem like mighty fine batteries. But if somebody wants to support Visual Source Safe, well....17:46
jeblairjlk: time for an external battery pack17:46
jlkhopefully not one that will explode17:46
jlk(metaphor stretching)17:47
pabelangerjeblair: I am, I should be ready to switch back to zuulv3 now17:47
openstackgerritDavid Shrewsbury proposed openstack-infra/nodepool feature/zuulv3: Protect against no matches for an upload  https://review.openstack.org/46067817:47
*** harlowja has joined #zuul17:51
harlowjaSpamapS let me know if u are going to do k8s bonnyci demo18:02
harlowjai'd like to join :)18:02
harlowjathose guys and there mono-repo .....18:02
harlowjathey seem to forget they aren't in google anymore, lol18:02
harlowja*imho18:03
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Ensure PRs arent rejected for stale negative reviews  https://review.openstack.org/46070018:05
*** tobiash_ has joined #zuul18:09
tobiash_Hi, just curious, did someone think about running zuul & co in docker on kubernetes?18:13
jlkI think there's been some thoughts in that direction, but I haven't seen a lot of effort18:15
tobiash_I'm currently thinking if it makes sense to switch our ansible based deployment to a containerized PaaS solution like openshift or kubernetes18:15
tobiash_Eventually we will make that step (if it works out) with the switch to zuulv318:16
tobiash_This also could enable easy auto scaling of the zuul executor18:17
jeblairtobiash_: yes, i think that's worth looking into.  we just haven't done much with that yet while we focus on v3 development.18:26
tobiash_we anyway run these services already in containers18:27
tobiash_getting nodepool-builder run in docker required some hacks though18:28
jlkthe big challenge to me is separating all the individual processes so that they can be isolated in a container18:29
jlkand figuring out what, if any, of those processes assumes about other local processes18:29
tobiash_that gets much better already in v318:30
tobiash_we run nodepool-launcher, nodepool-builder, zuul-scheduler, zuul-executor and zookeeper in docker (each one in a separate container)18:31
tobiash_nodepool-launcher was the trickiest one due to diskimage builder18:32
tobiash_but we still have to try out the transition from vm+docker (via ansible) to directly use kubernetes18:33
pabelangertobiash_: ya, diskimage-builder in a container is fun. Spend some time over christmas doing it18:34
pabelangerbut it works18:34
tobiash_s/nodepool-laucher/nodepool-builder18:34
tobiash_yepp18:34
tobiash_it works for me when having elements, tmp and gen in the same mount into the container18:35
tobiash_otherwise I had trouble with diskimage builder running on the aufs filesystem18:36
mordredtobiash_: we also _definitely_ have plans/urges to provide first-class support for using zuul v3 to perform CI of docker and kubernetes workloads18:36
mordred(independent of whether or not zuul makes any steps towards running in k8s itself)18:37
* tobiash_ now understands what k8s means...18:37
mordredtobiash_: we've spoken wiht a few k8s people about some of it - but there are some pieces of the design that would be great to discuss with someone, such as you, who has a grasp of zuul and also is doing things with k8s already18:38
clarkbbuilder you mean18:38
mordredwe've mostly been deferring thinking about it deeply until we've got v3 deployed for openstack with the existing vm support18:38
tobiash_mordred: I'm not using it yet but we plan to evaluate if a zuul deployment works fine in k8s18:39
mordredtobiash_: cool - it'll be good to learn what your results are from that18:39
tobiash_will report in a few weeks :)18:39
tobiash_what do you think of adding a 'k8s' provider additionally to nodepool?18:40
tobiash_that could greatly reduce resources used for short or lightweight jobs and reduce response time for these18:41
pabelangerthat's been talked about before18:41
tobiash_oh, must have overlooked that, will check scrollback buffer18:42
pabelangernothing official yet, but more like it would be cool if18:43
pabelangerI know clarkb likes the idea of using nova-docker18:43
clarkbwell mostly because its there, but apparently its eol now18:44
clarkbso :(18:44
tobiash_maybe we could also use a driver concept in nodepool (v4), shade, k8s, aws, azure18:45
clarkbtobiash_: that sort of exists if you consider drivers implementing the zk protocol18:46
pabelangertobiash_: yes, mordred has mentioned a few time of a linchpin integration for nodepool. I think the next step might be a spec for the plugin system for that?18:46
clarkbwith the only existing driver being nodepool for openstack18:46
*** openstackgerrit has quit IRC18:48
tobiash_clarkb: well, you can think of nodepool as a driver but I think nodepool does much more than a driver18:48
mordredyah - so....18:49
mordredI think this is definitely a thing we want to do - but I think it winds up being a  few differentuse cases18:49
mordredone is "I have an application in this git repo that is designed to be run in containers, so I want to request from the CI system a k8s endpoint (or a docker endpoint) that my ansible playbooks can interact with to run and validate my code"18:51
jeblair(i think the way we will want to extend nodepool is with a separate process communicating over the zk protocol, however, there's enough boilerplate things such a system would need to do, we should abstract that out into code that can be shared among them.  that's what we should do before making our second nodepool backend.  we can focus on that a bit more when we get v3 out of the way.)18:51
mordredso in that case, one would expect the user to say in their job description "I need a k8s" and for zuul to ask nodepool for a "k8s" and nodepool to hand one of those to zuul and zuul would place it into the ansible inventory18:52
mordred*handwaving around details, clearly*18:52
mordredthere is also "I have this workload thatisn't specifically container oriented, but it lightweight and running it in a container would be just fine"18:53
mordredwhich might be more something like requesting an ubuntu:xenial container in the job description, zuul asking nodepool for an ubuntu:xenial docker container, then puttingit into the inventory and the job runs there mostly like it would on a vm except it's a container not a vm18:54
mordredour pep8 jobs are a good example of content that would likey be happy to use sucha job18:54
jlkthat tracks with what travis does18:55
jlkyou get a container env by default, you have to ask for something different18:55
mordredfrom a resource management perspective, there are some open questoins - should there just be a single k8s cluster that is registered with nodepool, and the first case is handled by nodepool making a single-use tenant on the k8s cluster then handing the endpoint and credentials to the job's inventory?18:56
clarkbmordred: proper multitenancy is a thing in k8s now?18:56
mordredand for the second case nodepol just asks k8s to spin up a bare ubnutu container ina pod then hands remote access credsfor that container to zuul for the inventory?18:56
mordredclarkb: as of the latest release, yes - they're just now releasing it18:56
clarkbah ok last I checked it was hand wavy18:56
mordredso by the time we get to it, it should be a thing18:56
jlkthis sounds like a fascinating discussion to have, after v3 :)18:57
tobiash_looking forward to this :)18:57
mordredjlk: yup. I totally don't want to attempt to solve it today - I mostly wanted ot braindump a little for tobiash_ so he can think about it a bit while poking at k8s18:57
pabelangermordred: clarkb: from what I heard on monday meetup, 1.6 of k8s gets experimental RBAC, but I didn't think it was multi tenant yet18:57
pabelangerinbound only :(18:57
mordredpabelanger: ah - ok. although it still might have full multi-tenancy by the time we get to implementing this :)18:58
clarkbpabelanger: that lines up with what I had heard. "we have things but they arent intended to secure tenants from each other"18:58
pabelangermordred: agree18:58
mordredthere are also questions about how to get from a set of source code repositories that zuul prepares to those repos being in a container context18:59
mordredit's a little easier for the 2nd case -the pep8 case- but fora container-native application there is probably an intelligent way to build the right containers based on git repo content on demand18:59
pabelangerthat's why I like the idea of we flag a nodepool VM as docker ready, then it can run zuul docker jobs for X hours, then we delete and create. Then we get the multi-tenant from openstack18:59
mordredso that it works as that developer would expect18:59
pabelangerbut, that's basically k8s18:59
jlkyeah I think the second case is the easy one to target. Container gets started with the source repo volume mounted in19:00
mordredyah- I definitely don't want to accidentially re-invent k8s inside of zuul19:01
jlkwhich is more of nodepool has access to static hosts that can run docker?19:01
jlkmaybe not. *shrug*19:01
clarkbmordred: can't you just shove the whole git repo into the one true data store etcd? /s19:01
jlkmaybe i should go learn some more about this stuff before throwing out shit-posts.19:01
mordredjlk: well, we hav ea nodepool feature need for nodepool to manage pre-existing hosts19:01
jlkclarkb: *twitch*19:01
mordredclarkb: :)19:01
mordredclarkb: I am certain there will be a solution to that problem once we learn a few more thigns then turn our attention to it19:02
* jeblair notes afs would actually be a solution to that.19:02
mordred:)19:02
* jeblair notes the omission of "good" from that observation19:02
ShrewsThe important question that no one seems to be asking, is when will zuul support delivering games to my PS4???19:04
*** openstackgerrit has joined #zuul19:05
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Move makemergeritem into model  https://review.openstack.org/46071419:05
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Use project canonical hostnames in mergers and executors  https://review.openstack.org/46071519:05
tobiash_Shrews: you could write a driver ;)19:05
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Represent github change ID in status page by PR number  https://review.openstack.org/46071619:05
jeblairmordred: 460715 implements your go-style repo layout TODO.19:05
mordredjeblair: super sexy19:06
jeblairjlk: it's possible 460715 may have a small interaction with the github branch due to some test changes; hopefully not.  i tried to keep it minimal.19:06
jlkalrighty, I'll peek19:06
tobiash_mordred: now you mentioned pre-existing hosts, is there already a spec for this (didn't find one)?19:07
mordredtobiash_: I _think_ it's referenced in the zuulv3 spec - one sec, lemme look (I do not think it's specced out into full implementation details though)19:07
jeblairtobiash_: it's briefly mentioned in the zuulv3 spec, but it's not fleshed out.  i don't think we need a spec.  just an implementation.19:07
tobiash_I have this use case and maybe could work on that in the next few weeks if nobody currently works on that19:08
mordredtobiash_: two sentences "Nodepool should also allow the specification of static inventory of non-dynamic nodes. These may be nodes that are running on real hardware, for instance."19:08
mordredat the end of http://specs.openstack.org/openstack-infra/infra-specs/specs/zuulv3.html#id119:09
tobiash_mordred: Ah, these two sentences, so just a requirement19:10
tobiash_Is there already some concept for that in someone's head?19:12
pabelangertheres been a few specs over the years to run docker containers for CI: https://review.openstack.org/#/q/infra-specs+docker19:13
clarkbmaybe a utility to register them with zk then a known zk prefix to look for such data in?19:13
tobiash_probably this should be stored in a zookeeper structure for static nodes19:13
clarkbtobiash_: :)19:13
jeblairtobiash_: it probably needs to be another 'launcher', which means we probably need to abstract out the boilerplate launcher code i mentioned above.19:14
pabelangerI know gozer was big on the idea, IIRC19:14
clarkbpabelanger: ya thats where the original can we use nova docker idea came from since gozer had control of the cloud aiui and could in theory deploy ironic + nova for baremetal and nova + nova-docker for containers19:15
clarkbpabelanger: I don't know that it ever happened there but have heard some third party CIs do nodepool + ironic + nova and that does work19:15
pabelangerclarkb: ya, I did hear that too about 3rd-party19:15
jeblairtobiash_: basically, the config file should define the nodes, the new 'launcher' should sync those nodes to the /nodes/ tree in zk.  they should get checked out as normal, and when they are returned, just reset to 'ready' rather than 'deleted'.19:15
clarkbpabelanger: for baremetal I think thats still a good setup but for containers things have changed all over the place since then19:16
clarkbjeblair: ++ you made "utility" an actual useful thing in that description19:16
tobiash_jeblair: ok, that sounds like the simplest solution, so you mean a nodepool-static-launcher?19:17
jeblairtobiash_: yep19:17
tobiash_I maybe also could think of a static node provider (which would already impose a backend driver=19:17
tobiash_but that probably would need more work19:18
tobiash_but I could imagine that this could later then be extended to support more providers like k8s, aws,...19:18
jeblairtobiash_: if you want, i can probably write this up in more detail.  but give me a few days.19:19
tobiash_jeblair: just decide if it should be 'another launcher' or 'multi backend support'19:20
jeblairtobiash_: yeah, i'll take a look at that and what the config file would look like19:20
tobiash_I'll try to look into this then and will come up with a draft or (probably) more questions19:21
*** herlo has joined #zuul19:34
dmsimardHow much is it a pita to maintain Zuul's "fork" of (for example) the module command ?19:39
dmsimardDo you rebase it often on upstream, for example ?19:39
*** tobiash_ has quit IRC19:44
mordreddmsimard: nope. we haven't touched it much since forking it19:51
dmsimardmordred: not too concerned about it ? bugs/cve/whatever19:52
mordreddmsimard: I have a todo list item to sit down with the ansible core team and go through what we're doing there in detail to see what the opportunities are to upstream/add interfaces19:52
mordreddmsimard: not hugely, no - that said, once we get some zuul jobs running on ansible prs - we should probably get something to notify us when changes are made to those files upstream so we can track them19:53
dmsimardI was contemplating perhaps overloading the default callback (sort of how you do with the command module) but it doesn't solve the problem I want to solve anyway19:53
dmsimard(in the context of ara)19:53
mordreddmsimard: speaking of overloading default callback ... we should talk at some point about what the interaction between ara's and zuul's callback plugins might look like19:57
mordreddmsimard: specifically - since we fetch console and shell output out of band (and not through the stdout_lines attributes on the tasks)19:58
dmsimardyeah, I need to rewrite https://review.openstack.org/#/c/444088/ to a more broader "allow end users to use callbacks" or something to that effect19:58
mordreddmsimard: if we were to start enabling ara on the jobs by default, ara would not have access to any of the stdout for any of the shell/console tasks19:58
dmsimardmordred: ara doesn't read from stdout19:58
dmsimardit doesn't parse stdout19:58
mordredI know - it's a callback plugin19:59
mordredbut tasks have output that it reports19:59
dmsimardmore or less, they return a "results" object with plenty of things, the output if appropriate19:59
dmsimardif you don't strip the results object, the data should be there even if you don't necessarily print it to stdout20:00
mordredright20:00
mordredwhat I'm saying is - we strip the task's stdout attribute from the results object20:01
dmsimardmordred: can you show me what you mean ?20:01
mordreddmsimard: so - like if you look at this: http://logs.openstack.org/67/458567/2/check/gate-shade-dsvm-functional-neutron/fe38922/logs/ara/reports/index.html20:01
mordredand click on the status link for the task "Check whether /etc/hosts contains hostname"20:02
mordred(it would be nice if those would produce a link I could paste to people, fwiw, but let's leave thatfor now)20:02
dmsimard(permalinks to playbooks and task results are coming in the next version to avoid this kind of awkward instructions btw :p)20:02
mordreddmsimard: you can see it has a command, delta, end, start and stdout, right?20:02
dmsimardmordred: right20:03
mordredand the stdout is the stdout from the shell command that was run20:03
dmsimardhttps://twitter.com/dmsimard/status/85517045962891673920:03
mordredwoot!20:03
dmsimardmordred: there was originally more output than that or something ?20:03
mordrednope - that's a normal non-v3 ansible run, so ara is working as expected20:03
mordrednow - if it was in v3, that stdout section would be empty20:03
dmsimardwhere in the code does that happen ?20:04
mordredbecause our command/shell tasks do not return any content in their stdout fields20:04
mordredone sec- I get you links20:04
mordreddmsimard: there are multiple pieces to it - in http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/library/command.py#n127 - which is our fork of the command module20:05
mordredwe write stdout to a file and spin up a daemon thread that will stream it on demand20:05
mordreddmsimard: then in http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/callback/zuul_stream.py?h=feature/zuulv3 - which is the callback plugin we run on the executor20:06
dmsimardSo you redirect the stdout, you mean ?20:06
mordredyes, that's right20:06
dmsimardah so it's not that you strip it, ansible doesn't see it in the first place20:06
dmsimardhum, but you shouldn't do that ?20:06
mordredhttp://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/callback/zuul_stream.py?h=feature/zuulv3#n9520:06
mordredwe connect to the port on the remote host and fetch the stdout content from the streaming service running on the remote node20:07
mordredand then output it into the ansible log20:07
mordreddmsimard: it's important to do it for us for 2 reasons20:08
dmsimardmordred: the command still exits json with a stdout key, so that's actually empty ? http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/library/command.py#n45620:08
mordreda) it's how we are able to provide streaming access to logs rather than waiting for the shell command to be done20:08
mordreddmsimard: yes, that's correct, we send back an empty stdout key20:08
dmsimardmordred: so, pretend I'm an ansible/zuul_v3 user, that means I can't for register from a command task and read from stdout as a condition ?20:09
mordredb) many of our shell commands are "run devstack and then run tempest" and produce a LARGE amount of output - if we didn't redirect it we'd be having giant return structures in memory :)20:09
dmsimards/for//20:09
dmsimardyeah I'm 100% for what you've been doing in regards to streaming ansible output, it's cool and clever20:09
mordreddmsimard: oh - hrm. that's a great point. you are right about that. bother - we might have to include it20:09
mordredjeblair: ^^ see most recent 3 or 4 lines20:10
mordreddmsimard: if nothing else, I'll consider this conversation a success just for you pointing that out20:10
dmsimardmordred: I don't think it's an issue to return non-empty stdout/stderr keys with their actual contents -- you get to decide if you want to print them later anyway20:10
mordreddmsimard: well - I was more concerned on that case about buffering them all in ram20:11
dmsimardlike, the default callback will (example) json.dumps(results) which has a stdout key20:11
dmsimardbut if you're not using the default callback, nothing prints20:11
mordreddmsimard: which for some of our devstack jobs tha are memory constrained anyway could be problematic20:11
dmsimardah, I see what you mean20:11
dmsimardhum, I can actually help profile that if you'd like20:11
mordredmaybe we need to be able to flag some commands to do the streaming but not to return to stdout - we could have a custom module for that20:12
mordred_most_ commands it should be fine to do both20:12
mordredbut for some - like "run devstack" - we, as test authors, may want to opt-out of returning the stdout content in the result object20:12
dmsimardbut wait a sec20:12
jeblairmordred: caught up and generally agreeing :)20:13
dmsimardI've been running puppet-openstack-integration and packstack jobs which are at the 8GB ram ceiling as well, through ansible with that 30 minute long shell command with like 20k lines of output20:13
mordreddmsimard: oh - good! and it's not terrible?20:13
dmsimardAnd we're not running into oom as far as I am aware20:13
mordredok. good.20:14
* dmsimard gets link20:14
mordredso maybe the shortest path is to just re-enable putting stdout into the results object, but keep an eye on memory pressure to see if it exists20:14
dmsimardhttps://logs.rdoproject.org/weirdo-generic-puppet-openstack-scenario003/1502/ara/reports/index.html20:15
dmsimardThere's a 38 minute long task in there20:15
jeblairmordred: that does mean that when we switch the ansible output to json, zuul will need to parse that enormous json object regardless, right?20:15
dmsimardwith an entire puppet-openstack-integration thing20:15
dmsimardah, the output is actually not that much -- I forgot we changed how p-o-i logged20:15
dmsimardmordred: now I wonder where the pressure is -- is it on the control node or the remote node ?20:16
dmsimardIs it "streamed" to the control node and kept buffered there ? Or kept on the remote node and flushed at the end ? A bit too low level for me to know20:17
mordredjeblair: yah - we'd want to  make our own version of the json callback plugin for those purposes I think20:19
jeblairmordred: ok, so it could discard stdout, but otherwise it's returned from the node for any interested callback plugins (or registered by playbook tasks)20:19
mordredjeblair: ya20:19
mordreddmsimard: it's _currently_ streamed in essentially a line-by-line manner on demand - so it's never buffered on either end more than a line-ish of text20:19
jeblairmordred: you mean our thing, or ansible?20:20
dmsimardmordred: so is the output flushed to disk then ? could you DDoS someone with an ansible "output" bomb ?20:20
mordreddmsimard: if we make the change to also include it in the result object - the entire output would be buffered completely into ram on both the worker and the executor node20:20
jeblair(because i thought dmsimard was asking how ansible handled returning result objects)20:20
jeblairdmsimard: or were you asking about how we do console streaming?20:21
dmsimardjeblair: we're discussing how the zuul command module strips the stdout/stderr keys and how that ties into 1) ara 2) if I'm a zuul user and want to use the stdout key from a registered command task inside a condition20:21
mordredin our current setup, the output is sent to disk, then in separately streamed  - so we're not succeptible to an ansible bomb- except for filling disk space20:21
jeblairdmsimard: yep, i got that.  i'm trying to flag what i see as a miscommunication between you and mordred.  :)20:21
mordredif we start returning stdout in the result object again, then we could also be open to an ansible bomb from the node20:22
dmsimardmordred: right, but does ansible do that "natively" (flush line by line to disk in a tmp file) is what I meant to ask, or does it keep everything in ram20:23
mordreddmsimard: my understanding is that it keeps everything in ram20:23
mordredbecause it has to construct a json payload to ship back over the wire20:23
jeblairand it can only do that once -- there's no incremental return protocol20:23
mordredyah20:23
*** Cibo_ has joined #zuul20:23
mordred(we wind up back in the place where chatting with the core team sounds good :) )20:25
SpamapSharlowja: also mono repo doesn't relieve you from the need for speculative merge testing that zuul does. It just relieves you from cross-repo deps20:25
harlowjaagreed20:26
mordredjeblair, dmsimard: we could pretty easily put a limit on what we return in stdout in the result object - since we construct that at the end20:26
jeblairSpamapS: i'd argue it reduces, not eliminates that need (most projects ultimately have deps)20:26
mordredif it winds up being a problem20:27
jeblairmordred: yeah, that works too20:27
dmsimardmordred: yeah so I agree that "script.sh" outputting 30k lines is probablematic, you could also argue that it's an ansible anti-pattern -- upstream would tell you: "don't do that, translate your bash script into granular ansible tasks"20:27
mordredyah - which is one of the reasons I imagine this particular topic feels less richly handled compared to other things20:28
*** jkilpatr has quit IRC20:29
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Use project canonical hostnames in mergers and executors  https://review.openstack.org/46071520:29
mordredbut I think for now we should a) include it at the end b) if the content size winds up being a problem, add a max cap to what we return20:29
jeblair++20:30
SpamapSjeblair: the way they do things, I don't think they have any deps that aren't in the mono repo. Even binary-only deps.20:30
dmsimardIt's not an easy problem to solve, the problem being streaming output is all fine and good until you want to do multi node and then the output is interleaved20:30
mordredso that for the easier case of a person legit running a shell command and then wanting to do something with the output, that they aren't broken20:30
dmsimardI think that was DeHaan's reasoning in some age old issue20:30
mordreddmsimard: it is indeed - and in fact, we stream the logs and interleave them into the log file!20:30
mordred:)20:30
SpamapSNo word on whether or not they maintain long arduous forks that never get pushed upstream.. ;)20:31
jeblairfortunately, metadata was invented and we can un-interleave.  :)20:31
dmsimardI'm curious how mtreinish's work with the mqtt-publishing callback will turn out20:32
dmsimardOr if stdout/stderr is important to him20:33
dmsimardmordred: hey, how about this -- you still flush to disk file but you read from that file when doing the exit_json20:34
dmsimardlike, there's the zuul stream file -- not that one, you create another one just for that one command20:34
dmsimardyou could even be nice and delete the tmpfile before doing the exit_json for space constraints20:35
jeblairi'm not as worried about the memory pressure on the node as i am on the executor (where the problem is magnified 100x)20:35
SpamapSIIRC, memory is the main scaling problem in larger ansible installations.20:36
dmsimardjeblair: that's sort of what I was asking before, I have no knowledge of where the pressure occurs (and when)20:37
dmsimardSpamapS: I can see that happening -- ansible sends the raw data to all the callbacks, if there's a lot of data to chew through it gets exponential20:39
SpamapSand lots of forked processes20:42
jeblairdmsimard: i think both are important, but in zuul's case, expect 100 ansible processes running simultaneously on one executor.20:42
jeblairso we're going to see problems there first20:42
*** jkilpatr has joined #zuul20:43
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Validate flavor specification in config  https://review.openstack.org/45187520:45
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Add support for specifying key-name per label  https://review.openstack.org/45546420:45
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Add ability to select flavor by name or id  https://review.openstack.org/44978420:45
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Support externally managed images  https://review.openstack.org/45807320:45
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Cleanup from config syntax change  https://review.openstack.org/45186820:45
*** dkranz has quit IRC20:45
openstackgerritMerged openstack-infra/nodepool feature/zuulv3: Protect against no matches for an upload  https://review.openstack.org/46067820:46
openstackgerritMerged openstack-infra/nodepool feature/zuulv3: Fix zuul-nodepool integration test  https://review.openstack.org/46032520:47
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Validate flavor specification in config  https://review.openstack.org/45187520:49
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Add support for specifying key-name per label  https://review.openstack.org/45546420:49
openstackgerritJames E. Blair proposed openstack-infra/nodepool feature/zuulv3: Support externally managed images  https://review.openstack.org/45807320:50
mordredjeblair: I started hacking on the change from above - because at first I thought "that's a simple 3 line change" - and indeed it could be a simple 3-line change. EXCEPT ... dum-dum-dum ...20:52
jeblairmordred: who you calling a dum-dum?20:52
mordredjeblair: we re-use the same logfile across tasks, so the 3-line change version "just open the file and read the contents right before returning"20:52
mordredjeblair: would not _quite_ do what one might expect20:52
mordredjeblair: so I think accumulating in memory as we write to the file is likely a better approach, yeah?20:53
mordredjeblair: and clearly me :)20:53
jeblairmordred: yeah, for now.20:53
jeblairif it's a problem, we can always make a second (per-task) file20:53
*** jkilpatr has quit IRC20:57
mordredhrm. that might actually be the easiest way to accumulate. otherwise I'mma need to get all mutexy20:57
jeblairmordred: why would you need to mutex?  isn't the thing writing to the file the same thing that would accumulate in ram and return the blob?21:08
mordredjeblair: the file writing happens in a thread21:08
mordredI mean- could also just skip the mutex and dirty-read21:09
mordredsince we'd be fairly assured that the writer thread will be done writing by the time we go to return the data21:09
mordredit might  make my skin crawl slightly, but should be fine 99% of the time21:09
jeblairmordred: don't we join the thread before returning?21:12
mordredjeblair: we do - but it also might be stuck and refuse to join (which we have some code for)21:16
mordredjeblair: but yah- I think we do enough that it should be safe21:16
dmsimardmordred: there ya go: https://twitter.com/dmsimard/status/85770631980507545621:22
openstackgerritMonty Taylor proposed openstack-infra/zuul feature/zuulv3: Also send stdout back in the Result object  https://review.openstack.org/46075321:22
mordreddmsimard: nice!21:23
openstackgerritMerged openstack-infra/nodepool feature/zuulv3: Add ability to select flavor by name or id  https://review.openstack.org/44978421:29
openstackgerritMerged openstack-infra/nodepool feature/zuulv3: Cleanup from config syntax change  https://review.openstack.org/45186821:29
jeblairfun question: what should the 'origin' remote url be on the git repos zuul stages in the executor?  currently it's set to the url that zuul itself uses, however, that's likely to involve an ssh username (and subsequently a key) which may not exist on the workers.  we could add the concept of a "public" url, but not every repo zuul manages will be public.  we could use the url that zuul uses unless there is a 'public url' attribute on the ...21:51
jeblair... connection.  or we could just remove the origin remote completely and leave it up to users to add whatever remotes they may need.21:51
jeblairi'm inclined to start with the latter (no remote whatsoever) and then add the public-or-private url later.21:53
mordredjeblair: do we have any thoughts on what a job might want an origin for?21:53
jeblairmordred: i can't think of any (since we are guaranteeing that the repo is completely up to date (and possibly into the future) on all branches and tags before starting a job.  those are the only things we use an origin for now.21:54
mordredjeblair: and yah - I say start with that, then public-or-private. I mean, if it's a private repo, then the user would really only be able to interact with a remote in a job from a job that could have secrets21:54
mordredjeblair: not having an origin also helps people to not accidentally automatically do a git pull or something silly21:55
mordred"here is a repo we have set up for you for this job" "great, I'm going to change it and test something other than what I expected to!"21:55
jeblairmordred: mm good point21:56
*** tflink has quit IRC22:13
*** harlowja has quit IRC22:14
clarkbI would set it to the transitive origin22:18
clarkbthat way should it be necessary things will just work22:18
*** tflink has joined #zuul22:18
jeblairclarkb: well, i think what you are calling the transitive origin is the thing i was calling "the url that zuul uses".  but that won't work, because, for us, that's "git+ssh://jenkins@review.openstack.org/openstack...."22:23
jeblairor, well, zuul@review.openstack.org.  this is only on the v3 branch :)22:24
clarkbjeblair: couldn't that be anonymous and then passed on?22:24
jeblairclarkb: yes, for us, but not everyone, which is what i meant by adding a 'public url' option22:25
clarkbah ok22:25
mordredjeblair: it's possible that one could infer a public_url from the canonical_hostname settings used for cloning perhaps - for if/when we go down that route22:25
mordredso that a config of that parameter is only needed if your setup is extra strange22:25
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Comment on PRs if a remote call to merge a change failed  https://review.openstack.org/46076222:26
mordredjeblair: so zuul sees that review.openstack.org is really git.openstack.org and sets the origin to https://git.openstack.org/openstack... blindly22:26
jeblairmordred: yep.  the config setting may only need to be a boolean.22:26
mordred++22:26
mordredbut I'm still on "set it to nothing for now and see how that goes"22:27
jeblairya, me too.22:27
clarkbone case I'm thinking of is the reno case22:28
clarkbsince it updates all the branches (whcih I don't think zuul will do necessarily?) then builds historical documentation out of that entire view of git repo22:28
jeblairclarkb: zuulv3 will update all the branches22:29
clarkbah ok22:30
jeblairclarkb: basically, the executor is going to give you a repo or repos with a complete representation of the future state of relevant project(s), including all branches.  put another way, all of the commits that end up as zuul refs now will end up as branch tip commits in the on-disk repo.22:30
jeblairreno jobs should get *much* simpler.  :)22:31
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Add support for requiring github pr head status  https://review.openstack.org/44939022:39
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Adds github triggering from status updates  https://review.openstack.org/45384422:39
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Implement pipeline requirement on github reviews  https://review.openstack.org/45384522:39
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Ensure PRs arent rejected for stale negative reviews  https://review.openstack.org/46070022:39
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Represent github change ID in status page by PR number  https://review.openstack.org/46071622:39
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Comment on PRs if a remote call to merge a change failed  https://review.openstack.org/46076222:39
openstackgerritJesse Keating proposed openstack-infra/zuul feature/zuulv3: Include exc_info in reporter failure  https://review.openstack.org/46076522:39
jlk(sorry, some more rebase of the rebase while I'm rebasing)22:39
jeblairjlk: all your rebase are rebase to rebase22:39
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Use connecction to qualify projects in merger  https://review.openstack.org/46076622:40
jeblairthere is substantial overlap in the last 2 changes i wrote -- 460715 and 460766.  i'm going to attempt a squash and see if the result makes sense...22:43
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Use connection to qualify projects in merger  https://review.openstack.org/46076922:47
jlkjeblair: the github-v3 stack has completed the rebase. THere are a few more (new to gerrit) patches to bring over from our fork, that I'm going to hit up now, before circling back through on review thoughts.22:50
jeblairjlk: cool; i plan on picking up the review thread on that again rsn.22:51
jeblairand yeah, the squashed version is only slightly worse than either of the originals quashed into it, so it's probably a net win (it's about 120% of the size of one of the originals), so that's probably what we should land.  i've WIP'd the originals.22:53
*** jkilpatr has joined #zuul22:53
*** jkilpatr has joined #zuul22:54
jlkoh right, gotta switch gears now and put myself back into the "port v2 to v3" mind set, instead of "rebase older v3 on current v3".22:54
jlkoh crap. Found something in our tree that should be squashed into earlier commits, more noise incoming.23:17
openstackgerritMerged openstack-infra/nodepool feature/zuulv3: Whitelist pydevd debug threads  https://review.openstack.org/45804123:19
jeblairjlk, mordred: i reviewed another 3 changes in the github stack.  one of them adds even more confusion to the translate/passthrough github events question.  plus there's a question about reporting.  once jlk gains headspace for this, i imagine we're going to need further design chats.23:21
jlkyup! possibly tomorrow23:21
mordredjlk: I look forward to those chats23:23
*** harlowja has joined #zuul23:23

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