Wednesday, 2019-05-29

*** rlandy has quit IRC00:10
*** mattw4 has quit IRC00:19
*** sshnaidm has quit IRC00:44
openstackgerritPaul Belanger proposed zuul/nodepool master: Add error handling when cleaning up resources  https://review.opendev.org/66186601:04
pabelangerclarkb: Shrews: we managed to wedge our cleanup handler in zuul.a.c, due to a provider outage, ^ is my attempt to fix it01:05
clarkbthat fix makes sense. I'll have to vote on it in the mroning though. Currently making dinner01:07
pabelangerwfm01:07
pabelangergoing to diable the provider for now01:07
pabelangeralso, starlink goes over head tonight at 22:23 EST, hopefully get to see them01:13
fungii get sms notifications on my phone when the iss is about to go overhead01:18
*** sshnaidm has joined #zuul01:50
openstackgerritTristan Cacqueray proposed zuul/nodepool master: static: add host-key-checking toggle  https://review.opendev.org/65367902:38
openstackgerritTristan Cacqueray proposed zuul/nodepool master: static: enable using a single host with different user or port  https://review.opendev.org/65920902:38
*** panda|ruck has quit IRC03:03
*** panda has joined #zuul03:03
openstackgerritTristan Cacqueray proposed zuul/zuul master: model: add cleanup-run to the job configuration  https://review.opendev.org/66188003:07
openstackgerritTristan Cacqueray proposed zuul/zuul master: wip: executor: run cleanup playbook on stop  https://review.opendev.org/66188103:07
*** threestrands has joined #zuul03:31
*** altlogbot_0 has quit IRC03:44
*** altlogbot_2 has joined #zuul03:46
openstackgerritTobias Henkel proposed zuul/zuul master: Report tenant and project specific resource usage stats  https://review.opendev.org/61630604:10
openstackgerritTobias Henkel proposed zuul/zuul master: Fix typo in docs  https://review.opendev.org/66188604:13
*** raukadah is now known as chandankumar04:37
*** altlogbot_2 has quit IRC04:38
*** altlogbot_2 has joined #zuul04:42
*** pcaruana has joined #zuul05:15
openstackgerritTristan Cacqueray proposed zuul/zuul master: model: add cleanup-run to the job configuration  https://review.opendev.org/66188005:42
*** gtema has joined #zuul05:55
openstackgerritTristan Cacqueray proposed zuul/zuul master: wip: executor: run cleanup playbook on stop  https://review.opendev.org/66188106:22
*** bjackman has joined #zuul06:30
*** saneax has joined #zuul06:49
openstackgerritTristan Cacqueray proposed zuul/zuul master: wip: executor: run cleanup playbook on stop  https://review.opendev.org/66188106:59
*** hashar has joined #zuul07:03
*** tosky has joined #zuul07:11
*** themroc has joined #zuul07:34
*** tosky has quit IRC07:40
*** tosky has joined #zuul07:42
*** flepied has joined #zuul07:55
*** jpena|off is now known as jpena07:58
openstackgerritMerged zuul/zuul master: Report tenant and project specific resource usage stats  https://review.opendev.org/61630608:21
*** panda is now known as panda|ruck08:23
*** sshnaidm has quit IRC08:30
*** sshnaidm has joined #zuul08:31
openstackgerritAndreas Jaeger proposed x/pbrx master: Retire repo  https://review.opendev.org/66191208:34
*** bjackman has quit IRC08:46
openstackgerritSlawek Kaplonski proposed zuul/zuul-jobs master: Add role to fetch journal log from test node  https://review.opendev.org/64373308:53
*** MrCoder25 has joined #zuul09:06
jktI'm using the `command` Ansible module for launching my shell script which runs my project's tests. How does stdin of that shell script look like?09:08
jktI'm asking because I'm debugging a random failure within a 3rd-party project that I'm testing. Apparently, it calls poll(stdin), and the result is revents=POLLHUP09:08
jktthis thing used to work before, whizh puzzles me. The only change I made was reinstalling the build containers (Fedora 29), but again, I used the same Ansible playbook for that installation as before09:09
jktany clues? :)09:09
*** bjackman has joined #zuul09:15
*** hashar has quit IRC09:28
*** saneax has quit IRC09:32
*** saneax has joined #zuul09:32
*** MrCoder25_ has joined #zuul09:39
MrCoder25_Hi, i'm using zuul 3.8.1 and trying to use the kubernetes nodepool driver and executing jobs09:40
*** MrCoder25 has quit IRC09:40
MrCoder25_I managed to have nodepool create a pod but i'm having difficulties connecting to the pod from my zuul job09:40
MrCoder25_I get the following error: 2019-05-29 11:37:07,587 DEBUG zuul.AnsibleJob: [build: 12a85cdb5bfa48459dd973d24a65e64b] Ansible output: b'fatal: [pod-centos]: FAILED! => {"changed": false, "module_stderr": "error: You must be logged in to the server (Unauthorized)\\n", "module_stdout": "", "msg": "MODULE FAILURE\\nSee stdout/stderr for the exact error", "rc": 1}09:41
MrCoder25_I assume that the error message is from the kubectl client but I am not sure what i need to do to resolve it09:41
MrCoder25_Is there an example job that shows how to run a job on a kubernetes pod created by nodepool?09:42
MrCoder25_Or can anyone give me any pointers what i need to do to resolve it09:42
*** threestrands has quit IRC09:54
*** electrofelix has joined #zuul10:06
*** gtema has quit IRC10:48
*** jpena is now known as jpena|lunch11:30
*** jangutter_ has joined #zuul11:32
*** jangutter has quit IRC11:36
*** bjackman has quit IRC12:27
*** bjackman has joined #zuul12:29
*** jpena|lunch is now known as jpena12:34
*** rlandy has joined #zuul12:35
*** jangutter has joined #zuul12:51
*** jangutter_ has quit IRC12:54
*** bjackman has quit IRC13:02
*** bjackman has joined #zuul13:03
*** dmellado has quit IRC13:25
*** dmellado has joined #zuul13:25
*** bjackman has quit IRC13:26
*** armstrongs has joined #zuul13:55
*** rf0lc0 has joined #zuul13:58
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132713:59
*** rfolco has quit IRC14:00
*** rf0lc0 is now known as rfolco14:16
armstrongshey on the zuul executor is it possible to get ansible to use a custom ansible.cfg as i have some custom ansible library modules i need to use so would like to override the default one14:21
armstrongsi have it stored within my git repo14:21
pabelangerarmstrongs: not today, ansible.cfg is hardcoded in zuul-executor and not exposed.  I have often thought how we could expose it, since for ansible-network we need to setup different settings for network_cli connections14:25
armstrongsso theres no way to point at my custom library modules, that means i can't run my tests :( Is there any way to hack it?14:27
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132714:27
SpamapSarmstrongs:modules are loaded in the playbook and role paths14:28
SpamapSarmstrongs:you just can't load *plugins*14:28
pabelangerarmstrongs: if the role is trusted, I believe zuul-executor will load it, if next to playbook, IRC14:28
SpamapSand yes, as pabelanger says, trusted context can run any module on the executor14:28
SpamapS(though I've kind of taken the position that executor-only jobs are more trouble than they're worth)14:28
pabelangerarmstrongs: in this case, you likey want to ue nested ansible, zuul-executor ansible-playbook, runs ansible-playbook on the node for nodepool14:29
armstrongsah so just put it under trusted rather than untrusted14:29
pabelangerthis is a common way we do testing in ansible-network14:29
armstrongsso just move it in the main.yml14:29
armstrongsthe repo that contains it14:30
pabelangerarmstrongs: the down side with trusted, you won't get pre-merge testing14:30
armstrongshmm ok so alternative is to setup a zuul nodepool node with ansible installed execute it there and it will load the cfg from the workspace?14:33
pabelangeryup, that is right14:33
armstrongsso a nested ansible call14:33
armstrongsok14:33
armstrongsthanks again guys14:33
armstrongswill try that14:34
armstrongs:)14:34
armstrongssounds better14:34
fungiit's probably the safer option at least, since that code is more thoroughly sandboxed by being on a separate, stateless machine14:35
fungiso the most which could happen by exploiting it (probably) would be compromise of the artifacts produced in that build14:36
Shrewshttps://duo.com/decipher/docker-bug-allows-root-access-to-host-file-system14:44
*** saneax has quit IRC14:46
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132714:48
Shrewspabelanger: i don't see what your nodepool patch is fixing. that cleanup task is already wrapped in an exception handler: https://opendev.org/zuul/nodepool/src/branch/master/nodepool/launcher.py#L66614:50
clarkbShrews: it stops that loop from breaking out14:50
clarkbso if the failure is consistent you will only eveer get that far through the for loop before breaking out14:51
Shrewsclarkb: oh, i see now14:51
clarkbI nees to leave a +2 once at computer14:52
Shrewsi think a test case would be good though14:52
pabelangeryah, what clarkb said :) I can also do a test case14:52
pabelangerI believe we have something today to test leaked instances14:53
*** chandankumar is now known as raukadah14:54
Shrewspabelanger: yep. there should be an example there too of getting hold of the manager. should be easy to mock the failure.14:58
pabelanger+114:59
Shrewspabelanger: the difficult thing would be controlling the order of the provider loop to guarantee we proceed after the failure15:00
Shrewsmaybe a test isn't really necessary here anyway.15:02
Shrewspabelanger: ok, i think i talked myself out of that  :)15:02
pabelangerhehe15:02
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132715:18
*** mattw4 has joined #zuul15:24
tobiashSpamapS: re pre-populate private keys, do you have an idea how we can get rid of pycrypto for seeding the private key generation?15:27
clarkbtobiash: zuul could fork to openssl/openssh if a seed/master key is provided?15:27
clarkbwould probably be slow but its a one time cost (mostly)15:27
*** mattw4 has quit IRC15:28
tobiashis that something that openssl supports?15:28
*** armstrongs has quit IRC15:33
SpamapSProbably worth investigating pycryptodome .. also makes one wonder why cryptography doesn't allow the seed argument. Might be a relatively simple patch.15:33
clarkbtobiash: openssl genrsa takes a -rand argument which lists files to load into the seed15:33
clarkbtobiash: genrsa is apparently superceded by genpkey which does not document -rand as an arg15:33
pabelangertobiash: I like the idea of a master key, I should test that out too15:34
clarkbcan probably get away with genrsa until they delete it?15:34
SpamapSI'm also kind of wondering again (I think I wondered this when we started) why we don't use PGP15:34
clarkb(as an option with forking)15:34
*** altlogbot_2 has quit IRC15:35
*** irclogbot_0 has quit IRC15:36
openstackgerritAndreas Jaeger proposed x/pbrx master: Retire repo  https://review.opendev.org/66191215:37
*** altlogbot_1 has joined #zuul15:37
openstackgerritMerged zuul/zuul master: Fix typo in docs  https://review.opendev.org/66188615:38
*** irclogbot_0 has joined #zuul15:38
*** mattw4 has joined #zuul15:40
fungiSpamapS: if memory serves (it's been a while now so this may also have changed) there were no great options for openpgp python modules, and also it would have been more finicky to implement the command-line encryption tool15:41
*** MrCoder25_ has quit IRC15:43
fungialso, for the use case under discussion... couldn't we just symetrically encrypt the private rsa keys on the server? then all zuul needs to do is fetch the decryption key from vault or wherever and decrypt the private rsa keys into memory when it needs to decrypt a job secret with one15:44
fungiunless i'm misunderstanding the problem statement15:45
tobiashfungi: my use case is to not having to backup the private keys15:46
*** themroc has quit IRC15:46
*** mattw4 has quit IRC15:46
fungioh, so you want the private keys to be two-party keys?15:47
fungior you're wanting to store all the private keys somewhere central which does get backed up?15:48
clarkbfungi: tobiash uses a master key (seed) and can regenerate all keys from that15:48
SpamapSIf you use a single random key as the seed for all the others, you can re-create all the others with the seed only.15:48
fungiwhat does it get salted with to keep them from all being the same key? an incremented serial?15:49
clarkbI'm guessnig project name15:50
fungii guess that would work as long as you never rename a project15:50
fungior you keep track of what the original project was to make sure you can regenerate the original key15:50
tobiashI have a master key in the deployment and deterministically generate all project specific keys from that15:50
tobiashThat way zuul is stateless from this perspective15:51
fungimostly wondering how you make the regeneration deterministic without making them all wind up with the exact same key15:51
tobiashI seed the prng from the private master key15:51
fungiusing the same random seed multiple times would in theory produce the same key every time15:51
tobiashWith the project name as salt15:52
fungigot it, that's the piece i was looking for15:52
fungiso do you never rename projects, or do you generate new keys for them when you rename them, or do you track their original names so as to still be able to regenerate their keys?15:52
*** hashar has joined #zuul15:55
fungialso i guess you don't have multiple tenants, or you use a different seed per tenant?15:55
fungi(otherwise two identically-named projects in different tenants would get the same key)15:55
openstackgerritMerged zuul/zuul master: Create zuul/web/static on demand  https://review.opendev.org/66149815:56
tobiashKeys are only depending on the canoni al project name15:57
tobiashNot on the tenan615:57
fungiso if you had two projects with the same canonical name in different tenants they'd have the same key, i suppose it depends on how you're controlling access to configure and run jobs for those projects as to whether or not that's a concern16:00
fungicould be seen as a feature rather than a risk, if you wanted to reuse the same secret in jobs for the same project in different tenants16:01
fungiby "canonical name" i assume you mean including the hostname for the connection16:02
tobiashThat's how it is in zuul generally atm16:03
tobiashAnd yes, renaming a project requires reencrypting the secrets of that project16:04
tobiashThe canonical name in zuul is unique for any project16:05
tobiash(within one zuul deployment)16:05
fungiyep, the biggest risk i could see is if you had tenant project configuration under control of different groups, one tenant could add a project from another tenant and then be able to add jobs which expose the secrets in those projects16:06
Shrewsdoes anyone know how to have tox not use a regex on the test name when specifying a test on the command line?16:10
Shrewsmaybe that's a stestr thing16:11
clarkbyes that is a test runner thing, has nothing to do with tox. python regexes may have a "this is a literal string" flag16:12
clarkbShrews: re.escape() will escape a string for you. So you could run that then pass the result to tox/testr16:14
Shrewsi just ran stestr directly with -n option16:14
Shrewsthat seems to work16:14
openstackgerritMerged zuul/zuul master: encrypt_secret: display the full_url on error  https://review.opendev.org/66113416:17
fungitobiash: oh, actually i think that concern is actually with zuul's implementation of rsa keys for secrets. the path on disk doesn't include the tenant, even though the api call to get the public key does... so the same project in different tenants will have the same key, but since the projects lists are in the central tenant configuration file and not split between configuration projects, the zuul admin has16:18
fungicontrol to prevent one tenant from adding a project for another tenant and adding a job to obtain secrets from it16:19
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132716:26
fungii'm also not sure i've had enough caffeine today to work out a reasonable exploit where a config project maintainer could exfiltrate a secret from another project in its tenant anyway16:26
fungimaybe by manipulating a parent job in the config repo, it would be feasible, depending on how the inheriting job in the normal project repo is structured16:28
fungiSpamapS: digging in the pyca/cryptography documentation, it looks like maybe overriding the backend with a subclassed one might provide a means to inject specific seed data into openssl calls https://cryptography.io/en/latest/hazmat/backends/openssl/#os-random-engine16:46
fungi(the generate() method includes the ability to provide a backend parameter)16:46
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132716:47
*** kmalloc_away is now known as kmalloc16:55
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132716:59
*** jpena is now known as jpena|off17:15
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132717:27
*** sshnaidm is now known as sshnaidm|off17:33
fungianybody know whether there's an outstanding change to add project key directory renames to https://opendev.org/openstack-infra/system-config/src/branch/master/playbooks/rename_repos.yaml ?17:35
fungi(for the zuul scheduler's filesystem)17:36
fungialso, do we need to stop the scheduler to do them?17:37
fungithough i guess we likely will regardless17:37
corvusfungi: should be safe to do with scheduler running, but yeah, we usually have it stopped anyway (since gerrit won't be able to merge changes)17:37
corvusfungi: i don't see such a change, though i thought we made one for the migration?17:39
fungiit was just hacked into the migration script instead17:45
fungidue to realizing at the last moment we needed to do that17:46
corvusapparently a not-uncommon occurance :)17:47
fungiheh17:52
fungibut yeah, it was squashed into 65313817:52
clarkboh did that not make it into my omnibus change?17:52
*** hashar has quit IRC17:53
fungioh, and i just realized i meant to ask about it in #openstack-infra, apologies for the noise #zuul17:54
fungithough i suppose it was sort of related to the earlier topic17:54
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132717:55
*** tosky__ has joined #zuul17:59
*** tosky has quit IRC18:00
*** tosky__ is now known as tosky18:00
*** electrofelix has quit IRC18:03
openstackgerritDavid Shrewsbury proposed zuul/zuul master: WIP: Store hold requests in zookeeper  https://review.opendev.org/66111418:04
*** ofosos has quit IRC18:08
Shrewstobiash: btw, i think ^^ is necessary for the scale-out scheduler18:08
tobiashShrews: yes, makes sense :)18:09
Shrewscan't recall if that's called out in your spec18:09
tobiashnope, good point18:09
clarkbtobiash: I approved the usage stats chagne yseterday btw but didn't check if it ended up merging18:16
tobiashclarkb: thanks, it merged after one recheck due to a test timeout18:16
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132718:28
*** panda|ruck has quit IRC18:35
*** panda has joined #zuul18:37
openstackgerritDavid Shrewsbury proposed zuul/zuul master: WIP: Store hold requests in zookeeper  https://review.opendev.org/66111419:00
mordredShrews: see! I *was* being helpful with my random out of the blue suggestion19:02
openstackgerritDavid Shrewsbury proposed zuul/zuul master: WIP: Store hold requests in zookeeper  https://review.opendev.org/66111419:03
Shrews"helpful" is a relative term19:03
Shrews:)19:03
Shrewsi now have therapy things to attend to. bbl19:04
*** themroc has joined #zuul19:07
*** rlandy is now known as rlandy|brb19:47
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132719:53
*** themroc has quit IRC19:58
*** rlandy|brb is now known as rlandy20:15
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132720:34
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132720:52
*** pcaruana has quit IRC21:23
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132721:27
*** tosky has quit IRC21:49
openstackgerritJames E. Blair proposed zuul/zuul-jobs master: WIP: registry test job  https://review.opendev.org/66132722:04
*** tjgresha has quit IRC22:07
*** rlandy is now known as rlandy|bbl22:22
*** ianychoi has quit IRC22:32
*** ianychoi has joined #zuul22:33

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