Friday, 2017-07-21

pabelangermordred: cool, thanks00:00
pabelangermordred: when you have time, executor-debug.log is showing some new warnings in callback_plugins00:00
pabelangeralso see more Ansible output again, not sure if expected in debug log00:01
pabelangercould be a side affect00:02
mordredpabelanger: this:00:03
mordredf73b046] Ansible output: b" [WARNING]: could not parse environment value, skipping: ['{{ tox_environment |"00:03
mordred2017-07-21 00:02:15,577 DEBUG zuul.AnsibleJob: [build: 4ee60681aa364036a9a2d080ff73b046] Ansible output: b"default(omit) }}']"00:03
mordred?00:03
mordred(that's weird, btw)00:04
mordred2017-07-21 00:02:15,557 DEBUG zuul.AnsibleJob: [build: 4ee60681aa364036a9a2d080ff73b046] Ansible output: b'skipping: [ubuntu-xenial] => {"changed": false, "skip_reason": "Conditional result was False", "skipped": true}'00:04
pabelangerthat is new, but expected00:04
mordredthat's weird too - I think that seems like we should log00:04
mordredI think we should, if we can, get both of those things into th ejob log instead of the zuul debug log00:05
pabelanger++00:05
pabelangerya, I haven't seen skipping yet in job-output.txt00:05
mordredk. I'll get that done next00:05
pabelangerhttp://paste.openstack.org/show/616096/00:06
pabelangerwas the warning I saw too00:06
mordredjeblair: I have verified that report_url is getting properly updated in status.json - so the issue of displaying the wrong url is most likely in the status page00:06
mordredNoneType is fixed in that latest patch00:06
pabelangermordred: 485864?00:07
mordredyah00:07
pabelangernice00:07
pabelangergoing to read up how we can attach job-output.txt to subunit00:07
pabelangerso we can see logging changes with tox -epy3500:08
mordredcool00:08
SpamapSjeblair: should be fairly straight forward to add a concurrency limit00:09
* SpamapS knows he's been editting a lot of code today because he tried to end that IRC comment with <ESC>:wq00:09
mordredSpamapS: :)00:11
SpamapSand now I need to write a test playbook that writes 2MB to a job dir.. hm00:12
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Add missing word to docs  https://review.openstack.org/48587400:15
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: WIP Remove refspec  https://review.openstack.org/48587500:15
jeblairmordred: fixed ^00:16
jeblairSpamapS: id appreciate a review from you on 485329 (and children) when you have a chance.00:17
pabelangerwill poke at subunit logging more later, don't want to get distracted :)00:18
SpamapSjeblair: certainly. Almost ready to emerge from my coding cocoon. :)00:22
openstackgerritMonty Taylor proposed openstack-infra/zuul feature/zuulv3: Log skipped tasks to the job output  https://review.openstack.org/48589600:40
openstackgerritMonty Taylor proposed openstack-infra/zuul feature/zuulv3: Add spacer line after loops  https://review.openstack.org/48589700:40
SpamapShrm00:42
SpamapSpause module does not play nice with logging00:42
mordredSpamapS: with the job console log?00:42
SpamapSmordred: with ttrun in unit tests :_P00:42
SpamapSI think it sends a CR or something00:43
mordredah. weird00:43
SpamapSwait_for: delay=10 path=/ works fine00:47
openstackgerritMonty Taylor proposed openstack-infra/zuul feature/zuulv3: Display log url when a job completes  https://review.openstack.org/48589800:49
mordredjeblair: ^^ that should fix the status page url completion thing00:49
pabelanger+200:51
jeblairmordred: i assume we were swapping it inside the json construction (in python) before?00:51
SpamapSso..00:53
SpamapSI think I've got this thing worked out00:53
SpamapSbut.. my thread is still running after its stop() method because it sleeps for 1s between du and looking for the stopped flag..00:54
SpamapSwhitelist it?00:54
SpamapSor sleep a bit?00:54
mordredjeblair: yes - I believe that's where it was changing before00:54
SpamapSFeels like a good thing to check for leaked threads00:55
mordredpabelanger: https://review.openstack.org/#/c/483987/ needs to have the depends-on dropped00:55
jeblairSpamapS: i'd whitelist, but maybe we can have a list of threads we should wait a little bit longer on before raising the exception in shutdown.00:58
jeblairSpamapS: greylist.00:58
*** jkilpatr has quit IRC00:58
SpamapSjeblair: Yeah, these will be gone in just a tad under 1s I think.00:58
SpamapSactually one waits 5s on its condvar before checking00:59
SpamapSit's too bad there's no clean "select([condvar1, condvar2])"01:00
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Monitor job root and kill over limit jobs  https://review.openstack.org/48590201:02
pabelangermordred: thanks!01:04
pabelangermordred: https://review.openstack.org/#/c/485834/ and https://review.openstack.org/#/c/485836/ are straightforward too01:07
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Display log url when a job completes  https://review.openstack.org/48589801:18
*** isaacb_ has quit IRC01:22
mordredpabelanger: that ^^ should just magically go live via puppet right?01:36
mordredyup01:43
mordredBOOYAH. status page links switch to log links now01:43
mordredooh! and the gzip patch landed01:44
mordredso we have date links again: http://logs.openstack.org/87/483987/9/check/tox-linters/26eb683/job-output.txt.gz#_2017-07-21_01_41_16_96807001:44
Shrewsmordred: \o/01:57
mordredShrews: I tell you what - that log streaming is some sexy stuff02:00
Shrewsyup02:00
openstackgerritMonty Taylor proposed openstack-infra/zuul-jobs master: Simplify bindep logic removing fallback support  https://review.openstack.org/48265002:04
openstackgerritClint 'SpamapS' Byrum proposed openstack-infra/zuul feature/zuulv3: Monitor job root and kill over limit jobs  https://review.openstack.org/48590203:18
SpamapSnow with docs!03:18
SpamapSjeblair: all +3'd.. though I do think there are some little fixes we could make to the docs... it's mostly t3h awesome.03:44
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Check out implicit branch in timer jobs  https://review.openstack.org/48532903:49
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Rename tags job variable jobtags  https://review.openstack.org/48584503:50
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Rename uuid to build  https://review.openstack.org/48585103:51
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Add zuul.items to job vars  https://review.openstack.org/48585303:51
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Add missing word to docs  https://review.openstack.org/48587403:52
tobiashmorning05:27
tobiashgetting post failures after my daily deployment rebase05:27
* tobiash is investigating05:27
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Log items in loops better  https://review.openstack.org/48586405:39
tobiashah, just the uuid -> build rename bit me05:49
*** jhesketh has quit IRC06:35
*** jhesketh has joined #zuul06:35
tobiashjeblair: tried to import zuul-jobs into my deployment via the git driver:06:55
tobiashjeblair: http://paste.openstack.org/show/616126/06:55
tobiashjeblair: was the git driver intended to be used as a source for job configs?06:59
tobiashjeblair, pabelanger: currently trying out to import zuul-jobs via a local mirror (which I have to do under a different name)07:06
tobiashjeblair, pabelanger: zuul refuses to start with this07:07
tobiashjeblair, pabelanger: http://paste.openstack.org/show/616127/07:07
tobiashjeblair, pabelanger: what do you think about separating out the project section of zuul-jobs into a different repo07:08
tobiashjeblair, pabelanger: that would simplify consuming this repo from 3rd parties (which may have to mirror them locally)07:09
*** amoralej|off is now known as amoralej07:11
SpamapStobiash: ahh yeah, that was a real breaking change... doh ;)07:19
SpamapStobiash: yes, the git driver is specifically intended to be used as a source for things like base configs.07:19
tobiashSpamapS: found it quickly and the error (it was even well described in the build log, which was only available during web streaming...)07:20
SpamapS:)07:20
*** hashar has joined #zuul07:21
SpamapSit's a bold new world07:21
openstackgerritTobias Henkel proposed openstack-infra/zuul-jobs master: Rename uuid to build  https://review.openstack.org/48603007:46
tobiashjeblair, mordred: before restarting something you'll probably want to land ^07:47
SpamapStobiash: +3'd ... seems urgent08:18
openstackgerritMerged openstack-infra/zuul-jobs master: Rename uuid to build  https://review.openstack.org/48603008:18
tobiashSpamapS: wait08:19
tobiashSpamapS: too late, I should have said together with the restart08:19
tobiashSpamapS: restart and land need to be the same, sorry forgot to note that08:19
openstackgerritTobias Henkel proposed openstack-infra/zuul feature/zuulv3: DNM: test change  https://review.openstack.org/48603908:22
openstackgerritTobias Henkel proposed openstack-infra/zuul-jobs master: Revert "Rename uuid to build"  https://review.openstack.org/48604208:24
tobiashSpamapS: now we have two possibilities, either land ^ or someone needs to restart scheduler and/or executor before the jobs work again08:25
tobiashSpamapS: I personally would be fine with waiting for a restart08:28
SpamapStobiash: let's leave it08:51
SpamapSwe'll agree to never never do this again08:51
SpamapS :)08:51
tobiashSpamapS: I promise to be more precise in my wording next time :)08:52
*** jkilpatr has joined #zuul10:26
*** jkilpatr has quit IRC10:33
*** jkilpatr has joined #zuul11:09
*** hashar is now known as hasharAway11:11
*** hasharAway is now known as hashar11:43
pabelangermordred: nice work on status page14:14
pabelangerHmm, jobs are failing14:16
pabelangerzuul.build14:17
pabelangerguess that is the 486030 change14:17
pabelangerguess we need to increase testing on zuul-jobs for those roles14:18
pabelangerright, that's because they are used in the trusted project14:19
pabelangermordred: jeblair: going to restart zuulv3 to pick up latest variable changes14:23
SpamapSpabelanger: yeah that was a breaking change, not much we could do with testing of changes there14:23
pabelangerSpamapS: ya14:24
pabelangerokay, everything restarted14:26
pabelangerSpamapS: tobiash: https://review.openstack.org/#/c/485834 and https://review.openstack.org/#/c/485836 are ready for review if you'd like14:32
pabelangerplaybook changes for latest zuulv3 updates14:32
pabelangerand removes duplicate role from being run14:32
tobiashpabelanger: +214:34
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Remove validate-host from unittests/pre.yaml  https://review.openstack.org/48583615:06
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Remove gather_facts: true  https://review.openstack.org/48583415:06
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: WIP: Move subunit processing  https://review.openstack.org/48584015:06
pabelangerokay, I think we have an issue with upload-logs role15:19
pabelangerjeblair: is it possible for rev, newrev and oldrev to all be null? http://paste.openstack.org/show/616185/15:19
*** jesusaurum has joined #zuul15:23
*** jesusaur has quit IRC15:26
jeblairtobiash: yes, i want the git driver to be usable for things like zuul-jobs.  however, it hasn't kept up with the others, and i don't think it has tests yet.  also, i'm not sure it works with git network urls?  (it might need to clone things locally into a private area in order to work?)15:54
jeblairtobiash: in the tenant config, you can "include: job" for the zuul-jobs repo to tell it to only load jobs (and not the project config)15:55
jeblairtobiash: however, yes, i agree that we should eventually move that out of that repo to make it easier for folks to use it without needing to use include/exclude statements.  but it might be more convenient to do that a little later after we've stabilized zuul-jobs a bit more.15:56
jeblairpabelanger: yes, newrev and oldrev are not valid values for pre-merge changes.  i think i was a little sloppy yesterday in docs/code about whether those variables would be absent or null when they are not applicable.  i actually don't really care -- what do you think would be best from an ansible user POV?15:58
jeblairmordred, SpamapS: ^15:58
pabelangerhaving them null is find16:00
pabelangerabsent would be more work in ansible16:00
pabelangerbut we need to update our log_path: http://git.openstack.org/cgit/openstack-infra/zuul-jobs/tree/roles/upload-logs/tasks/main.yaml16:00
pabelangernow I see16:01
jeblairpabelanger: oh i see16:01
pabelangerwe need to update http://git.openstack.org/cgit/openstack-infra/zuul-jobs/tree/roles/upload-logs/tasks/main.yaml#n716:01
pabelangerwhen zuul.newrev is not None16:01
jeblairpabelanger: yep.16:01
jeblairpabelanger: "is defined" isn't that bad...16:02
pabelangerright, it is defined, but null16:02
pabelangerso zuul.newrev[-2:] fails16:02
jeblairpabelanger: sorry, i meant, now that i see that there's "when: foo is defined" i'm wondering is it really easier to have them null?16:03
pabelangerI think we want them always defined, but they should be empty16:03
pabelangers/should/could16:03
pabelangerthat way we always have the same zuul variables in the inventory file16:04
tobiashjeblair: ah, missed that config detail... thx16:04
jeblairyeah, that might be more clear to humans16:04
pabelangerjeblair: otherwise, we'd likely need to do something like {{ zuul.newrev | default(None) }} when accessing it in playbooks16:05
jeblairpabelanger: yeeah, if we used it like that.  i suspect that most uses would look more like the upload-logs role, where we decide whether we're in pre-merge or post-merge mode and do something completely different depending on that.16:06
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: upload-logs: zuul.newrev can be none now  https://review.openstack.org/48617216:08
jeblairpabelanger: so we have: the argument for "None" is that it makes for more clear debugging, and in cases where it might be optional, it's easier to handle in jinja templates.  the argument for "undefined" is that it's still easy to use in a conditional, but will produce an error if it's used in the wrong context (so we don't accidentally publish a "None.tar.gz" file :)16:08
SpamapSNot sure I agree null is better than absent in Ansible16:09
SpamapSjinja makes it pretty easy to deal with undefined things.16:09
SpamapSnulls can be sneaky16:09
tobiashyes, especially if you want a to use a default value with {{ foo | default(whatever) }}16:10
tobiashthat would be harder with defined None values16:10
pabelangertobiash: that is true16:11
pabelangerhowever, do we expect users to be modifying zuul variables?16:12
jeblairno16:12
tobiashI think the following would be needed for dealing with None values {{ foo if foo is not None else 'bar' }}16:12
pabelangerjeblair: having zuul.newref:<empty> is another option16:13
pabelangerthen {{ foo | default(whatever) }} should work16:13
jeblairpabelanger: i don't understand the syntax "zuul.newref:<empty>"16:13
tobiashis this an ansible keyword for 'defined but actually undefined'?16:14
pabelangerjeblair: https://etherpad.openstack.org/p/ansible_variables16:15
jeblairtobiash: a second kind of null?16:15
*** hashar is now known as hasharDinner16:15
pabelangerrev is just empty, with our null or none keywork16:15
jeblairpabelanger: when i load that with yaml, that loads as None.16:15
tobiashjeblair: don't know16:15
tobiashansible can be tricky with this kind of stuff16:16
pabelangerjeblair: I wonder why we are setting it to null16:16
*** bhavik1 has joined #zuul16:16
jeblairpabelanger: what do you mean?  why is zuul setting it to null?  because i programmed it to yesterday.16:17
pabelangerjeblair: right, at the moment it is zuul.rev: null in inventory file16:17
pabelangerI think null / none / <empty> all mean different things in ansible world16:17
tobiashtried a few weeks ago to forward a variable into a role with foo: "{{ bar | default(omit) }}" and the result was not an undefined variable in the role but something like 'omit_placeholder_<long hexstring>'16:17
jeblairpabelanger: no, "null" in yaml is equivalent to "None" in python.16:18
tobiashand <empty> a somewhat super-none?16:19
jeblairpabelanger: i've never heard of "<empty>".  but it looks like you're not trying to say "<empty>".  based on the etherpad you're using "<empty>" to mean no value present in the yaml.  that's the same as null.  it gets loaded into python as None.16:19
pabelangerjeblair: yes, that's what I was trying to say.  I also confirmed null is the same for ansible too16:21
pabelangerjeblair: okay, so I still vote for zuul.ref = null, but the downside is what tobiash mentioned: {{ zuul.ref | default('something') }} would be harder to do16:24
SpamapSpabelanger: I don't expect users to be modifying zuul variables. But I do expect them to use zuul variables to construct their own values.16:24
pabelangerjeblair: so I think that is fine, because we don't want users modifying them16:24
pabelangerSpamapS: ++16:25
SpamapSAnd it's pretty clear what the meaning of |default("thing to use when it isn't there") means.16:25
jeblairpabelanger: also with 'null' accidentally using None.tar.gz would be easy to do.16:25
SpamapSdoes it come out as None actually?16:25
* SpamapS hasn't really looked16:25
pabelangerI think it would be ".tar.gz"16:26
pabelangerbut agree16:26
jeblairi'm counting pabelanger as one vote for null and SpamapS as one vote for undefined.16:26
jeblairtobiash: do you have a preference?16:27
SpamapSnull comes out to ""16:27
pabelangerya, that is what I see16:28
jeblairso yeah, ".tar.gz"16:28
SpamapSversus fatal: [localhost]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'dict object' has no attribute 'newrev'\n\nThe error appears to have been in '/home/clint/tmp/test.yaml': line 6, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n16:28
SpamapS  msg: \"--{{ zuul.oldrev }}--\"\n    - debug:\n      ^ here\n"}16:28
SpamapSI like things that 'splode when I'm wrong16:29
SpamapSexcept wife.. if she did that, she'd never be unexploded... ;)16:29
pabelangerwith OPs had on, I think it will be much easier to debug things if zuul variables are always set vs dynamically added to inventory files16:31
SpamapShow so?16:32
SpamapShow will you even know you _need_ to debug16:32
SpamapSif it's just ""16:32
jeblairpabelanger: i'm not sure i'd use the word "much".  maybe "a little".  but it's not too much of a stretch to say "oh, there's no newrev there.  the docs say it's not there under these conditions.  must be one of those conditions".16:33
tobiashI vote for undefined as this is the way of least surprise (at least for me) as a job author expecting |default(something) to work16:33
jeblairthat's pretty close to "hrm, newrev is null.  the docs say it's null under these conditions..."16:33
SpamapSRight if I see a failure because of a missing variable, I go looking for that variable's definition. If I see a file being uploaded named .tar.gz, I have to find where in the code that filename is set.........16:34
pabelangersure, I can understand that16:34
pabelangerI'll flip back to undefined then :)16:35
*** bhavik1 has quit IRC16:35
tobiashso 3 : 0 for undefined :)16:35
SpamapSThe downside of leaving them undefined is if somebody debug prints zuul to find out what's in it, it will be variable.16:36
pabelangerI mean it comes down to playbook exsploding above or .tar.gz file, maybe just having the playbook break is the better way to know there is an error16:36
SpamapSbut I think that's still more true to the data model and thus will cause less confusion.16:36
SpamapSpabelanger: Right, with zuul jobs especially, I think breaking is generally better than continuing in error/confusion16:37
*** dmsimard is now known as dmsimard|afk16:37
SpamapSThere are definitely domains where I'd go the other way.16:37
pabelanger++16:38
SpamapShttps://github.com/ansible/ansible/issues/27016 <-- They fixed it! :)16:41
pabelangerneed to read up on meta16:43
pabelangernever seen that before16:43
pabelangerSpamapS: oh, nice. That is pretty cool reset_connection16:44
pabelangerI was trying to think of a way of laying down /etc/bashrc and having ansible restart ssh connection16:44
pabelangercool16:44
SpamapSpabelanger: Yeah, specifically useful for that.16:46
pabelangerclear_facts is cool too16:46
SpamapSor anything else where you need to reconnect16:46
pabelangera good way to purge fact cache16:46
tobiashpabelanger: it's new to me also, I did exactly this by killing the ssh process on the host using a paramiko connection... reset_connection could have been so much easier...16:47
pabelangerYa, same16:47
pabelangerbasically figured I had to restart sshd16:47
pabelangerbut not now16:47
jeblairSpamapS: i wrote a few words on 48590216:49
SpamapSjeblair: thanks!16:50
* SpamapS will read those words16:50
tobiashI also like option 316:57
tobiashWhat are the plans of the zuul folks regarding ptg? Just releasing zuulv3 into the wild and fixing bugs or is there also other stuff planned?17:02
SpamapSjeblair: and agreed on all points. I'm glad you thought of a way to not have threads waiting on every job :)17:02
SpamapSjeblair: I just didn't find stopJob. :-P17:02
SpamapSand I forgot that the condvar waits were busy spins17:03
tobiashThinking about if it makes sense for me to join17:03
SpamapS(was thinking a bunch of threads sitting in futex() wouldn't hurt so much)17:04
jeblairSpamapS: yeah, my fondest dreams involve bountiful fruit, babbling brooks, and condition objects that don't spin.17:08
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Undefine Zuul variables in Ansible when appropriate  https://review.openstack.org/48618317:09
jeblairtobiash, SpamapS, pabelanger: ^17:09
tobiashjeblair: in the commit message you also mention branch and tag which are not changed in the code17:11
tobiashjeblair: is that intentional?17:11
jeblairi hesitate to potentially discuss painting a different wall of the bikeshed, but... i documented the 00000 thing in there because that's what we get from gerrit and github, so we pass it through.  i could be convinced that (a) we should not document it since it's just something we get from the underlying tech.  or (b) that we should actually suppress it and make *our* interface to create and delete based on undefined values.  that has the slight advantage ...17:12
jeblair... of potentially being more compatible with potential future systems, at the cost of being something different than what people are doing now in jobs.17:12
jeblairtobiash: yes -- branch and tag already had the correct behavior (they only appear as attributes on objects where they are guaranteed to be set to actual values)17:13
tobiashjeblair: ok, +217:13
jeblairtobiash: i guess maybe i should have written the commit message differently :)17:13
jeblairbut i did *think* about them when making the change :)17:13
tobiashjeblair: about the bikeshedding thing: undefining on 00000... could make it easier for the job to check for absense17:15
pabelangerjeblair: +217:16
tobiash(which I think is the meaning of the 0000... thing)17:16
jeblairtobiash: yeah, you get 0000..1234 if you create, and 1234..0000 if you delete a ref.17:18
tobiashjeblair: so in an ansible like interface I personally would have them undefined17:19
jeblairperhaps there is a reason based on git functionality that both gerrit and github use 0000.... that may be worth looking into17:19
jeblairtobiash: i agree17:19
SpamapSjeblair: it would appear py3 uses sem_wait() for it17:20
jeblairhttps://github.com/git/git/commit/f65fdf04a13d2252de8b2b4b161db7c43f2c28ad17:21
jeblairso yeah, 0000 does come from git.  so we could change the iterface for user convenience, but i'm a little more hesitant to mask something about git than i am about gerrit/github.17:22
tobiashjeblair: well git itself also changes the user interface to "push origin :refs/tags/foo"17:23
tobiashjeblair: we might consider this as an implementation detail of git17:24
jeblairtobiash: i don't follow17:24
tobiashjeblair: the user interface in git is mainly the command line client where you don't do 'git push origin 0000:foo'17:24
jeblairSpamapS: do you happen to have a link to the py3 source handy?17:24
pabelangertobiash: big task for PTG will be move zuulv3 into production for openstack-infra. I suspect we'll be writing a lot of ansible17:24
jeblairSpamapS: for condition17:25
jeblairtobiash: well, we're on the receiving side of the git push.  so we have, in some form, received a git pack with instructions to create a tag.  both gerrit and github transmit information about those instructions fairly faithfully, including the values that git supplied.17:28
jeblairoh here it is https://github.com/python/cpython/blob/3.6/Lib/threading.py17:29
tobiashjeblair: right, I'd consider this as the wire protocol where the jobs (dealing more with the git commandline client) could be seen more as the users17:30
tobiashjeblair: so that's the basis for my argumentation17:30
jeblairtobiash: yeah, makes sense.17:30
tobiashjeblair: but I'm also fine with the other option17:30
SpamapSjeblair: I do...17:31
SpamapSjeblair: it's pretty deep within the bowels17:32
SpamapSjeblair: ultimately, you end up here https://github.com/python/cpython/blob/aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c/Python/thread_pthread.h#L33417:32
jeblairtobiash: i do kind of want to change 0000 to undefined because i think it will be a better experience for people writing jobs who may not be, as you say, familiar with the git wire protocol.  i just want to be very careful with choosing to mask something about git.  making git "friendlier" could easily lead us down a long road.  :)17:32
jeblairSpamapS: ah thanks17:33
tobiashjeblair: yeah it's better to think before about that :)17:33
jeblairtobiash: i think i'll go ahead and write a change to collect opinions17:34
*** jkilpatr has quit IRC17:36
*** jkilpatr has joined #zuul17:40
tobiashsounds good17:41
SpamapSjeblair: stracing and ltracing shows nothing happening .. just sem_wait... so maybe py3 fixed it?17:42
SpamapS(not that this changes what we should do, just helps us understand things)17:42
jeblairSpamapS: yay!  yeah, i think if we don't need the extra threads we shouldn't add them.  but i'm happy if python threading is better.17:43
SpamapSso.. I don't see the busy wait in py2 either17:48
SpamapSso maybe my test code isn't demonstrating the problem17:48
jeblairoh hrm :/17:49
SpamapShttp://paste.openstack.org/show/616194/17:49
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Undefine Zuul variables in Ansible when appropriate  https://review.openstack.org/48618317:50
SpamapSuser0m0.016s17:50
SpamapSdoesn't look busywait to me :-P17:51
jeblairhrm, i wonder if it was event and not condition17:52
* jeblair alters test program17:52
jeblairokay, event with a timeout is a busy wait.17:54
jeblair(event without timeout is not busy)17:55
jeblairsame thing for condition.17:55
jeblairSpamapS: so specifying a timeout for either threading or condition, in py2, causes busy wait.  something like 10 hertz regardless of the length of the timeout.17:57
jeblairSpamapS: so specifying a timeout for either event or condition, in py2, causes busy wait.  something like 10 hertz regardless of the length of the timeout.  [corrected]17:57
pabelangeris http://pythonhosted.org/watchdog/ something we might be able to use?  Python API library and shell utilities to monitor file system events.  I am not sure if we can get the required info from inotify however17:57
SpamapSjeblair: interesting.17:58
jeblairSpamapS: it looks like py3 is better even with a timeout.18:01
SpamapSI've never actually looked at the benefits of Event vs. Condition18:02
SpamapSah yeah, py3 event does not busy wait on select()'s18:02
jeblairSpamapS: it looks like under py3, for both events and conditions, there's no busy waiting even with a timeout.18:02
SpamapS\o/18:02
jeblairhappy days18:03
SpamapSbut still... if we have a timeout on every job we have 3-4 threads per job..18:04
SpamapSso yeah.. best to just use the stopJob18:04
jeblair++18:04
jeblairpabelanger: i want to say we thought about inotify but didn't think it would work.  maybe clarkb recalls details.18:05
pabelangermaybe because: Inotify does not support recursively watching directories, meaning that a separate inotify watch must be created for every subdirectory18:06
SpamapSWhat would you inotify on?18:07
* SpamapS lost the context, but has a lot of inotify experience.18:07
pabelangerI was curious if you could caclucate the directory size with inotify over du18:08
pabelangerbut I too am not certain18:08
SpamapSNot sure it would be anymore efficient.18:09
SpamapSdu is going to walk the structure, which will all be in RAM, every second or so.18:10
SpamapSinotify would be cramming events in constantly.18:10
pabelangertrue, was mostly seeing if there was an existing library to consure18:10
SpamapSNow, a perpetual du..18:10
pabelangeralso, I know I've asked before but cannot remember. What was the issue with LVM per jobdir?18:10
SpamapSthat doesn't fork.. just loops on du'ing.. would be a tad more efficient.18:11
SpamapSLVM would need root to manage.18:11
SpamapSOr setuid helpers18:11
pabelangerright, that would be it18:11
SpamapScomplicates deploying executors in containers18:11
SpamapSlots of stuff ;)18:11
SpamapSbwrap might have done the latter though18:11
SpamapS(though it's supposed to work without privileges, I think that takes newer kernels)18:11
pabelangeroh, nice18:12
SpamapSI think this is the lightest weight thing we can do by ourselves..18:13
SpamapSand then we can look at teaching nodepool to talk to container schedulers which might make "run playbooks on a 'node'" a real thing.18:13
SpamapSOne could make an argument that with bubblewrap running on scaled out executors, zuul _is_ a container scheduler though ;)18:14
pabelangerschedulers all the way down!18:15
pabelangerjeblair: okay to restart zuulv3 to pick up 486183?18:18
jeblairpabelanger: please!18:20
pabelangerzuulv3.o.o restarted18:22
openstackgerritPaul Belanger proposed openstack-infra/zuul feature/zuulv3: DNM - multinode testing  https://review.openstack.org/48619518:39
*** jkilpatr has quit IRC18:47
*** jkilpatr has joined #zuul18:50
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: invert add-build-sshkey logic  https://review.openstack.org/48620319:00
pabelangerjeblair: how do I go about testing the base-test playbook in project-config?19:02
pabelangerhttps://review.openstack.org/#/c/486199/ for example19:02
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: DNM - invert add-build-sshkey logic  https://review.openstack.org/48620319:08
pabelangerI guess something like19:08
tobiashpabelanger: commented on ^ right before there was an update19:09
pabelangertobiash: right, i thought about that, but we'd have to do it for all command. I think the better option is just to run that role on localhost, rather then having all hosts include it19:11
pabelangerhttps://review.openstack.org/#/c/486199/ for example19:12
pabelangertobiash: you can see the current issue with https://review.openstack.org/#/c/486195/19:13
pabelangergroup-inventory test19:13
tobiashpabelanger: yea, saw it already19:14
tobiashpabelanger: will this delegate to all but localhost work even if the playbook is running against localhost?19:14
pabelangerI think it should19:15
pabelangerbut want to test19:15
pabelangerI'm not sure !localhost is needed, since all doesn't apply to it19:15
pabelangerbut added it to be safe19:15
tobiashpabelanger: I still think the more expected behavior from a user point of view is to run against all nodes and restrict key generation (and agent stuff) to localhost with once19:15
pabelangerright, this would do the same thing, just invert the logic19:16
pabelangerall nodes really only need to get new authoized file19:16
pabelangernot tell localhost to run the command19:16
tobiashpabelanger: yes, but would be more less surprising if you just run the role from an different playbook19:17
pabelangerwell, add-build-sshkey right now is only usable in a trusted playbook, because of delegate_to bits.19:19
pabelangerremoving delete_to localhost means we could start to use this playbook in untrusted jobs, if somebody wanted too19:19
pabelangerbut, I'd like to experiment with it first and see how it preforms, and currently means we need to land project-config change19:21
tobiashpabelanger: sure19:22
*** amoralej is now known as amoralej|off19:26
tobiashjeblair: wasn't there a change that every job inherits from base if not specified? I'm not sure but I think I read something about this topic here some time ago.19:30
tobiashhrm, don't find it, I've probably wrong memory about this19:33
*** dmsimard|afk is now known as dmsimard19:35
jeblairtobiash: story 2001110 not yet implemented19:36
pabelangertobiash: here is some code I use today which is similar: http://git.openstack.org/cgit/openstack/windmill/tree/playbooks/bastion.yaml it should almost be the same19:37
tobiashpabelanger: ah, so you treat localhost as bastion host then19:38
tobiashjeblair: ah there it was19:38
pabelangertobiash: yup, I wrote most of that code with zuulv3 in mind! So, my logic for bastion will likely be removed when added as zuulv3 job19:39
*** hasharDinner is now known as hashar19:56
*** jkilpatr has quit IRC20:03
jeblairpabelanger: i don't think we have a general restriction on delegating to localhost20:05
jeblair(in untrusted playbooks)20:05
jeblairin an untrusted playbook, you can run some stat and file commands on localhost, but that's it.20:06
jeblairpabelanger: i don't think inverting the ssh playbook logic would change any of that.20:07
jeblairpabelanger: to put that another way, it's not the "delegate_to" option, that's a problem, it's "run a command on localhost" that's the problem.20:07
pabelangerjeblair: right, but ATM, you wouldn't be able to use the role to say setup ssh between 2 multinodes (if you wanted that for some reason). But in this case, I do think it make more sense to limit that role to localhost only via a playbook20:10
pabelangerwe'd have to add run_once to all the delegate_to: localhost tasks20:11
jeblairpabelanger: all we need to do for that is to copy the private key to the remote node.20:11
pabelangerjeblair: we also ssh-add -D20:12
pabelangerso, there would be a race between 2 nodes20:12
pabelangerand both would do that step20:12
jeblairpabelanger: we could add it to this role, but i think it might be best to do it in its own role.  in that case, it's just one task to be run on all the nodes.20:12
jeblairpabelanger: i don't understand what "ssh-add -D" has to do with inter-node ssh20:12
pabelangerlet me get a log of the problem and pastebin it20:13
jeblair(the reason i think setting up the private key on remote nodes should be its own role is so that the base job remains safe to run on long-running nodes)20:14
pabelangerright now, we only want add-build-sshkey role to be run once, across all nodes, but that doesn't happen20:15
pabelangerhttp://zuulv3.openstack.org/static/stream.html?uuid=330519b1ee974d91a1330e772a5d979c&logfile=console.log20:15
jeblairpabelanger: well, yes, i understand that.20:15
jeblairi've read your patches and commented on them.20:15
pabelangerokay, but I believe you are saying we do not need run_once for ssh -D commands too?20:16
jeblairpabelanger: nope never said that.  we'll need run_once for all the delegate_to: localhost commands.20:16
pabelangerokay, that clears things up a little.20:17
pabelangerhowever, that is more ansible code in our playbooks. If we inverted, it would be less20:18
jeblairi don't think lines of code is always the best measure of clarity20:18
pabelangersure, I just find it more ackward this way.  Let me get patch20:19
jeblairpabelanger: there's a very simple test to apply here.  who should control the set of hosts the key gets installed on?  the playbook author or the role author?20:20
pabelangerI would say playbook20:20
jeblairpabelanger: then i think that suggests we should stick with the current structure and fix it with run_once20:21
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Only run once our delegate_to locahost commands  https://review.openstack.org/48621720:23
pabelangerjeblair: sure, there are 2 ways to do it. We can keep going on this route.20:23
jeblair^+220:25
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Fix stat check for add-build-sshkey  https://review.openstack.org/48621920:29
pabelangerjeblair: ^ also fixes a typo which should help prevent the issue20:29
jeblairpabelanger: oh, i wonder if we should just merge that instead?20:30
pabelangerya, either / both likely work20:30
pabelangerdealers choice!20:30
jeblairpabelanger: what's the "failed_when: false" supposed to do?20:31
jeblairmaybe that was expected to cause zuul_temp_ssh_key_stat to be undefined...20:31
pabelangerya, think that is right20:32
jeblairoh, is the logic just backwards?20:32
pabelangerI wonder if we don't need it. need to do a quick test if we stat an file that does exist20:33
jeblairoh, hrm, it looks like "failed_when: false" might tell ansible never to consider this task failed20:34
pabelangerya, stat on not existing file works20:35
pabelangerstat.exist == false20:35
pabelangerso, not sure why we need that logic20:35
jeblairokay so i think your patch is good20:36
pabelangerwe should check if zuul_temp_ssh_key variable is define and not none20:36
pabelangerto avoid it being empty20:36
jeblairisn't it in the defaults file?20:36
pabelangeryup, so we are protected a little20:37
jeblairpabelanger: i merged 219.  let's try it out.  :)20:37
pabelangerk20:37
jeblairwell, it's in the queue at least20:37
pabelangerwant me to rebase?20:37
jeblairpabelanger: oh it depends on the other one20:37
jeblairpabelanger: yeah20:38
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Fix stat check for add-build-sshkey  https://review.openstack.org/48621920:38
openstackgerritMerged openstack-infra/zuul-jobs master: Fix stat check for add-build-sshkey  https://review.openstack.org/48621920:40
pabelangerI still think we might have a little race condition20:42
pabelangerYa, because we don't have stragegy free20:43
pabelangerso both hosts will run the task at the same time20:43
pabelangerso, we also need run_once20:43
pabelangeror add run_once to the file check20:43
pabelangerYup, failed20:44
pabelangerjeblair: so we also need 48621720:44
jeblairneat20:45
openstackgerritMerged openstack-infra/zuul-jobs master: Only run once our delegate_to locahost commands  https://review.openstack.org/48621720:46
SpamapSah derp.. abandoned while I was reviewing. ;)20:46
SpamapSthat will serve me right for reviewing before finishing reading backscroll20:46
jeblairSpamapS: was your review "i think we should use run_once" by any chance?20:48
SpamapSno20:50
SpamapSI am super confused by the whole thing20:50
openstackgerritPaul Belanger proposed openstack-infra/zuul feature/zuulv3: DNM - multinode testing!  https://review.openstack.org/48619520:50
SpamapSargs: { creates: "{{ zuul_temp_ssh_key }}" }20:50
SpamapSwould have been my attempted solution20:50
pabelangerssh -d would then have been the next issue20:50
SpamapSrun_once for that would work20:50
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove refspec  https://review.openstack.org/48587520:51
pabelangerright, there is multiple ways to fix it20:51
SpamapSbut even then, I think just some clever fail handling20:51
SpamapSlet the "key is already gone" be a non-fail20:51
*** jkilpatr has joined #zuul20:52
pabelangerwhy do we log [Zuul] Log Stream did not terminate in the console.log?20:53
jeblairpabelanger: i don't think we've fixed the underlying bug which causes us to spuriously emit that yet.  once we do, i think that would be handy to have in the log.  :)20:55
jeblair(because it should never happen unless things are going wrong)20:55
pabelangerjeblair: okay, so we should be stopping zuul_stream between plays?20:56
jeblairpabelanger: yes.  that's currently only happening when nothing is being sent20:58
pabelangerack, thanks20:58
pabelangerso, we have a little issue with tox log publishing over multi nodes20:59
pabelangerboth are attempting to rsync in the same directory20:59
pabelangerlike we might need to create a new subdir for each node20:59
pabelangerlet me see if I can get that working21:00
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Use undefined values instead of 40 zeroes  https://review.openstack.org/48622521:01
SpamapSAli baba and the 40 zeroes...21:01
tobiashjeblair: I think I observed this stream did not terminate on shell tasks with ansible parse errors (e.g. undefined variables)21:04
jeblairokay, that's our bikeshed from this morning up for color selection.  I'm in no rush to land that one.21:04
jeblairtobiash: those would also probably produce no output on the stream i guess?21:05
openstackgerritTobias Henkel proposed openstack-infra/zuul feature/zuulv3: Fix broken project config in dynamic config test  https://review.openstack.org/48622621:05
openstackgerritTobias Henkel proposed openstack-infra/zuul feature/zuulv3: Don't ignore inexistent jobs in dynamic config  https://review.openstack.org/48622721:05
tobiashjeblair: yes, these produce just an ansible error21:05
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Store tox logs by inventory_hostname  https://review.openstack.org/48622821:07
openstackgerritPaul Belanger proposed openstack-infra/zuul feature/zuulv3: DNM - multinode testing  https://review.openstack.org/48619521:08
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Support multi node jobs for tox logs  https://review.openstack.org/48622821:23
*** _ari_ is now known as _ari_|gone21:33
openstackgerritPaul Belanger proposed openstack-infra/zuul-jobs master: Support multi node jobs for tox logs  https://review.openstack.org/48622821:36
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove refspec  https://review.openstack.org/48587521:40
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_REFNAME  https://review.openstack.org/48623221:43
pabelangercool, multinode logs working21:44
pabelangerhttp://logs.openstack.org/95/486195/3/check/group-inventory/9279283/21:44
pabelangerhttp://logs.openstack.org/28/486228/3/check/tox-linters/ab40fa7/ for single node jobs21:45
pabelangernot sure if we want to dynamically change tox folder or not21:45
pabelangerjeblair: mordred: SpamapS: tobiash: would love some feedback on: review.openstack.org/48622821:46
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_OLDREV and ZUUL_NEWREV  https://review.openstack.org/48623321:49
tobiashpabelanger: +2 with comment21:52
* tobiash has eod now21:54
pabelangertobiash: thanks, replied21:55
pabelangerhave a good weekend21:55
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_COMMIT  https://review.openstack.org/48623521:55
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_REF  https://review.openstack.org/48623621:55
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PATCHSET  https://review.openstack.org/48624022:13
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_CHANGE  https://review.openstack.org/48624122:13
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Fix the rendering of item entries  https://review.openstack.org/48624222:13
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_CHANGE_IDS  https://review.openstack.org/48624322:13
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_CHANGES  https://review.openstack.org/48624522:25
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_BRANCH  https://review.openstack.org/48624622:25
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_VOTING and add zuul.voting  https://review.openstack.org/48624722:25
*** hashar has quit IRC22:27
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_URL  https://review.openstack.org/48624922:32
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PIPELINE  https://review.openstack.org/48625022:32
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PROJECT  https://review.openstack.org/48625122:32
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_UUID  https://review.openstack.org/48625222:32
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_CHANGE_IDS  https://review.openstack.org/48624322:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_CHANGES  https://review.openstack.org/48624522:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_VOTING and add zuul.voting  https://review.openstack.org/48624722:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_BRANCH  https://review.openstack.org/48624622:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_URL  https://review.openstack.org/48624922:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PROJECT  https://review.openstack.org/48625122:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PIPELINE  https://review.openstack.org/48625022:38
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_UUID  https://review.openstack.org/48625222:38
pabelangerHmm, I am not seeing any post-run info in job-output.json, is that to be expected?22:48
pabelangeractually, looks like it is just post-logs that I do not see22:48
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_VOTING and add zuul.voting  https://review.openstack.org/48624723:04
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_URL  https://review.openstack.org/48624923:04
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PROJECT  https://review.openstack.org/48625123:04
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_PIPELINE  https://review.openstack.org/48625023:04
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Remove ZUUL_UUID  https://review.openstack.org/48625223:04
jeblairpabelanger: i think that makes sense -- the json file is only updated at the end of the play, so necessarily the last one will be missing entirely23:05
jeblairpabelanger: (unlike the text log, where we at least get the lines up to the point where the upload happens)23:05
pabelangerjeblair: okay23:08
pabelangerI'm trying to find the best way to get our jobdir.root from an ansible playbook, and haven't been able to find something I like23:09
jeblairpabelanger: what do you need it for?23:10
pabelangerjeblair: I was looking to rework http://git.openstack.org/cgit/openstack-infra/zuul-jobs/tree/roles/validate-host/tasks/main.yaml#n16 in favor of just publishing the infro directly from fact-cache.  Kinda like we do with inventory_file23:12
pabelangernot a major issue atm23:12
jeblairpabelanger: how do we copy the inventory file now?23:13
pabelangerjeblair: from localhost playbook using the {{ inventory_file }} magic variable23:14
pabelangerthats returns the path23:14
jeblairpabelanger: is there a {{ fact_cache }} magic variable?  :)23:14
pabelangerno :(23:14
pabelangerwas looking at source code23:14
pabelangerif I knew the location of ansible.cfg, I could use the lookup function23:15
jeblairpabelanger: isn't the fact cache json?23:15
pabelangerjeblair: ya, that is true23:16
jeblairpabelanger: so we'd be doing about as much processing as we're doing now23:16
pabelangerya23:16
pabelangerokay, so not much to change then23:16
pabelangerokay, think I am done for the week23:17
pabelangerenjoy weekend23:18
openstackgerritMerged openstack-infra/zuul-jobs master: Remove gather_facts: true  https://review.openstack.org/48583423:18
openstackgerritMerged openstack-infra/zuul-jobs master: Remove validate-host from unittests/pre.yaml  https://review.openstack.org/48583623:19
openstackgerritJames E. Blair proposed openstack-infra/zuul feature/zuulv3: Use undefined values instead of 40 zeroes  https://review.openstack.org/48622523:19
openstackgerritMerged openstack-infra/zuul feature/zuulv3: Log skipped tasks to the job output  https://review.openstack.org/48589623:29

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