Thursday, 2022-07-21

*** dviroel|afk is now known as dviroel|out00:37
*** rlandy is now known as rlandy|out01:09
*** ysandeep|out is now known as ysandeep05:00
sahidMorning all, is it possible to "block" the machine running for https://review.opendev.org/c/openstack/neutron/+/839479/21 so I can connect myself to it and debug CI job failing for neutron-ovs-grenade-dvr-multinode ?06:30
sahidI'm completly stuck trying to fix it, and reproducing the env is not quiet easy06:31
*** ysandeep is now known as ysandeep|lunch07:35
dpawlikclarkb: so "message" field got a json content08:29
dpawlikclarkb: other fields are not needed, but if someone want to create a visualization in Opensearch Dashboard instead of Grafana, it will have all informations08:30
noonedeadpunkhi there! I tried to re-use this publish job https://opendev.org/openstack/ansible-collections-openstack/src/branch/master/.zuul.yaml#L355-L360 here https://opendev.org/openstack/ansible-config_template/src/branch/master/zuul.d/project.yaml#L35 As a result, during relese elodilles catched 'Unable to freeze job graph: Project openstack/ansible-config_template is not allowed to run job ansible-collections-openstack-release'09:48
noonedeadpunkwhat am I missing?09:49
noonedeadpunkShould pipelines be somehow allowed for specific projects, or?09:50
noonedeadpunkk, so there's allowed_projects defined somewhere09:55
noonedeadpunkah, ok, so it's basically because of the secret09:58
noonedeadpunk`If a job with secrets is defined in an untrusted-project, allowed-projects is automatically set to that project only, and can not be overridden`09:59
*** ysandeep|lunch is now known as ysandeep09:59
noonedeadpunkSo basically, if I want/need to re-use secret, then I need to define job not inside project, but in project-config?10:00
noonedeadpunkOr any other suggestion on how to sort things out? As basically the goal is to publish collection under openstack namespace to ansible-galaxy, that is currently owned by ansible-collections-openstack SIG10:02
noonedeadpunkAs it's sounds, like moving this secret to project-config and restricting with allowed-projects might be a good alternative, but dunno10:08
noonedeadpunkAlso higly likely that I can jsut copy/paste job and secret, as secret is encrypted per tenant, not per project iirc?10:11
noonedeadpunkAnd I guess pypi releasing is solved with releases holding secret....10:13
noonedeadpunk(or not)10:14
noonedeadpunkit's in project-config indeed10:14
noonedeadpunkso wdyt of moving job and secret from ansible-collections-openstack to project-config? Or there're some legal things involved as it's basically SIG and ansible stuff is licensed differently?10:16
*** rlandy|out is now known as rlandy10:32
*** ysandeep is now known as ysandeep|afk10:53
*** dviroel|out is now known as dviroel11:24
funginoonedeadpunk: the secret is encrypted to the project which contains it11:30
fungiand needs to live in the same repo with the playbook which uses it11:30
funginot sure what you mean by "legal things" and "basically sig"11:36
fungibut yes, usually if a job needs to use a secret and will be run by multiple projects, putting it in a trusted config repo like openstack/project-config is the most popular solution11:37
fungithe key points are documented here: https://zuul-ci.org/docs/zuul/latest/config/secret.html#secret11:40
noonedeadpunkfungi: well, ansible is licensed under GPL which puts some restricitions. I can recall quite big ML thread regarding licenses used there, which resulted in ansible-collections-openstack being not under governance/releasing and managed by SIG12:51
noonedeadpunkfungi: but I'm not sure if secret should be re-encrypted if move it between projeccts? As it's encrypted with zuul tenant RSA key, doesn't it?12:52
noonedeadpunkJust trying to understand how we should go forward with that12:53
noonedeadpunkwill likely go and ask them...12:54
fungiit's not a per-tenant key. zuul generates a distinct key per project so that one project can't expose a secret for another even within the same tenant12:54
fungiso yes, if you want to move the key (and the job which uses it) into project-config, it will need to be encrypted to the project-config key rather than the ansible-collections-openstack key12:55
fungialternatively, there may be a way via allowed-projects to give ansible-config_template permission to run a job defined in ansible-collections-openstack12:59
fungihttps://zuul-ci.org/docs/zuul/latest/config/job.html#attr-job.allowed-projects13:00
funginope, i was wrong. "If a job.secrets is used in a job definition in an untrusted-project, allowed-projects is automatically set to the current project only, and can not be overridden."13:02
fungithough you might be able to encrypt the same credentials individually for each separate project (e.g. ansible-config_template) and then use https://zuul-ci.org/docs/zuul/latest/config/job.html#attr-job.secrets.pass-to-parent to hand that project's copy to the central job in ansible-collections-openstack13:04
fungibut i don't see a good reason not to just put the job and secret in project-config instead13:04
*** dasm|off is now known as dasm|ruck13:05
noonedeadpunkNah, I already posted that among my older posts that allowed-projects is not an option right now... 13:19
noonedeadpunkI just wonder who has these credentials in an unecrypted way13:19
*** ysandeep|afk is now known as ysandeep13:20
noonedeadpunkSo who can re-encrypt and push... likely sshnaidm13:20
fungiyeah, reminder here that the admins have a policy not to decrypt secrets themselves: https://docs.opendev.org/opendev/infra-manual/latest/testing.html#handling-zuul-secrets13:22
noonedeadpunkyeah, that's out of quiestion now :)13:23
noonedeadpunkwas trying to understand if you see any blockers why this can't be moved to system-config13:24
fungiproject-config (confusingly, system-config is not a trusted config repo, it's where we keep our systems deployment configs not our zuul configs)13:26
fungithey used to be part of the same repo, but circa 2014 we decided we wanted a separate (larger) core review team for job configs so we split them apart13:27
fungiit used to just be called "config" back in the long-long ago, in the beforetime13:27
sshnaidmnoonedeadpunk, what is it about?13:39
noonedeadpunksshnaidm: well, I tried to re-use your a-u-c job for publishing collection on galaxy and it's in fact not posisble, as secrets can't be read by any other project, if they're stored in untrusted zuul project13:40
sshnaidmnoonedeadpunk, I see, let's talk in  20min, brb13:41
noonedeadpunksshnaidm: so basically either secrets and job should be moved to project-config repo, where all openstack secrets are (possibly limit repos that can use this job with allow-projects?) or we should just copy-paste stuff or create another namespace which could be also an option13:43
sshnaidmnoonedeadpunk, I don't see a problem to move it to project-config, but definitely should be restricted to a limited repos. I don't think it's a good idea to allow everyone to push random things there14:14
sshnaidmIt's weird we can't reuse it from current repo..14:15
noonedeadpunkyeah, I restricting to specific repos sounds reasonable to me as well14:16
noonedeadpunkwell, I was surprised as well, but that kind of makes sense from other side14:17
sshnaidmI don't think though you need to copy job content if you just want to encrypt secret. AFAIK you just define your own secret with same name and can use the job14:17
sshnaidmbut maybe I missed something, or it's different zuul configurations..14:18
noonedeadpunkwell, maybe, parenting would work. given that secret would be local to the repo14:18
noonedeadpunkwe can try that out ofc if you prefer this way14:19
sshnaidmnoonedeadpunk, I think a job in project-config should be fine14:20
sshnaidmmind to make a patch?14:20
noonedeadpunkofc I can. Except you would need to paste re-encrypted secret there :)14:20
sshnaidmnoonedeadpunk, sure14:21
sshnaidmnoonedeadpunk, is there a way to limit patches there without our reviews or kind of? Just in case someone wants to push there without coordination14:28
sshnaidmnoonedeadpunk, actually, is it possible to have only job in project-configs, but secrets in each repo?14:29
fungiyes, you can use pass-to-parent for that14:31
fungian example is the git repo sync some projects use to mirror their repos to various github orgs14:31
fungizuul doesn't allow projects to run secret-using jobs from other non-config projects for valid security reasons related to the ability of non-config projects to exercise proposed job changes before being reviewed, so anyone who can push a change to gerrit could expose the secret if zuul didn't restrict it14:33
sshnaidmfungi, thanks14:33
sshnaidmnoonedeadpunk, seems like the best solution? ^^14:33
fungiwe used to allow it years ago, and then discovered there was no way to secure the secrets if that was allowed14:33
fungii linked the pass-to-parent option documentation above, if you want to see the usage and caveats14:34
sshnaidmfungi, yeah, sounds logical14:34
sshnaidmfungi, ack14:34
fungireusable secret-using jobs in a config project are safer, because config projects explicitly don't support pre-merge applicaiton of job changes14:35
sshnaidmnoonedeadpunk, we can actuall make a very general job that will allow push collections to galaxy to any namespace, "just define your secrets and params"14:35
sshnaidmfungi, yeah, right14:35
fungithat's a similar model to other publication jobs we already have14:35
noonedeadpunkwell, yes, we can do that14:35
noonedeadpunksshnaidm: eventually it's already pretty much simple/common?14:36
noonedeadpunkas namespace is retrieved from galaxy.yml?14:36
noonedeadpunkso it's already pretty much true14:37
sshnaidmthat's great14:37
sshnaidmsorry, didn't look at it in a while14:37
sshnaidm"it just works" (s)14:37
sshnaidm*(c)14:37
noonedeadpunkyeah, well, I pushed some edit to make it work in theory :)14:37
sshnaidmyeah, thanks :)14:38
noonedeadpunkso, we don't push secret at the end?14:38
noonedeadpunkand will store secret inside projects?14:38
sshnaidmyes14:38
sshnaidmwith "pass to parent"14:38
sshnaidmI'll generate a secret for your project14:39
noonedeadpunkok. I guess secret name and params should be quite static though?14:39
sshnaidmyeah14:39
noonedeadpunkNot sure that url should be in secret then?14:40
fungia "secret" is usually considered as a bundle of closely-related bits of data, some of which can be encrypted but not all of which need to be14:41
noonedeadpunklooking at pypi example, you don't store pypi url there...14:42
fungiif the url is expected to vary by project then it should probably be a part of the secret. if it will be the same for every project then it can be a separate parameter/default14:43
noonedeadpunkyeah, fair14:44
fungithe classic example is a username and password. the password will be encrypted, the username may be in plaintext, but they're generally paired information and so would both be part of the "secret"14:45
fungifor some publication jobs we put a url or path in the secret because those are project-specific or at least namespace-specific14:46
noonedeadpunkalso not sure how much iit sense would make to upload build collections to tarballs and publish from there... 14:47
opendevreviewDmitriy Rabotyagov proposed openstack/project-config master: Add job for publishing ansible collections  https://review.opendev.org/c/openstack/project-config/+/85066414:55
noonedeadpunksshnaidm: was you thinking about smth like that ^ + per repo having secrets/jobs like https://review.opendev.org/c/openstack/ansible-config_template/+/850666 ?15:04
noonedeadpunkI decided to push to our repo change first as sample and then can adjust a-c-o15:04
noonedeadpunkif we're on the same page15:04
sshnaidmnoonedeadpunk, looks good, jm1 can you take a look please? ^^15:06
noonedeadpunkprobably, we don't even need patch to project-config and just parent job from a-c-o, but likely it would be cleaner a bit if parent from project-config15:06
clarkbsahid isn't here anymore but we can do that.15:06
opendevreviewDmitriy Rabotyagov proposed openstack/project-config master: Add job for publishing ansible collections  https://review.opendev.org/c/openstack/project-config/+/85066415:16
sshnaidmnoonedeadpunk, yeah, having it in project-config will be more clear, so anyone can find it15:18
clarkbnoonedeadpunk: sshnaidm did that job live in anothe repo originally? if so maybe credit it so that the code origin is known15:19
noonedeadpunkclarkb: yup, it's from https://opendev.org/openstack/ansible-collections-openstack/src/branch/master/.zuul.yaml#L355-L37615:20
clarkbok can you update the change to include that info?15:20
noonedeadpunkShould I put that to commit msg or description of the job?15:21
clarkbwhenever you copy code from one place to another you should do this. Even if the code was appropriately licensed (that way we can all confirm that and if upstreams need to be updated to fix bugs that can happen too etc)15:21
clarkbI would put it in the content itself not the commit message15:21
opendevreviewDmitriy Rabotyagov proposed openstack/project-config master: Add job for publishing ansible collections  https://review.opendev.org/c/openstack/project-config/+/85066415:25
noonedeadpunkclarkb: you meant smth like that? https://review.opendev.org/c/openstack/project-config/+/850664/3/playbooks/ansible-collections/run.yml15:25
noonedeadpunkas eventually there was no license header, so it's a bit confusing for me...15:26
*** dviroel_ is now known as dviroel15:26
clarkbnoonedeadpunk: ya that works. Note the repo has a license file so I would assume that particular file falls under that license: https://opendev.org/openstack/ansible-collections-openstack/src/branch/master/COPYING15:27
noonedeadpunkyeah, fair15:27
*** rlandy is now known as rlandy|afk15:28
noonedeadpunksshnaidm: one nasty thing is that secrets name should be unique between projects?15:29
sshnaidmnoonedeadpunk, yeah, project name is part of the encryption15:29
clarkbnoonedeadpunk: look at opendev's container image build jobs and zuuls15:29
clarkbsshnaidm: I think the secret blob itself usually contains key values for that sort of differentiation15:30
clarkber sshnaidm  noonedeadpunk  ^15:30
*** ysandeep is now known as ysandeep|out15:30
noonedeadpunkso yeah, basically secret name should be different but wen passing to job should be same, ie https://review.opendev.org/c/openstack/ansible-config_template/+/850666/4/zuul.d/jobs.yaml ?15:32
clarkbhttps://opendev.org/zuul/zuul/src/branch/master/.zuul.yaml#L248-L261 and https://opendev.org/opendev/system-config/src/branch/master/zuul.d/docker-images/base.yaml#L35-L38 illustate this15:34
noonedeadpunkyeah, exactly, thabks for confirming15:35
fungiif the secret is supplied from the projects via pass-to-parent they'll need to be encrypted separately with the keys for the projects they're inside. alternatively, secrets can be shared if you put them into the trusted config repo with the job definition (you could still have multiple secrets in there if different projects needed different logins to different publication namespaces,15:45
fungifor example)15:45
clarkbya the examples I showed are for separately encrypted secrets using pass to parent. I Think that would work here15:45
fungiif you do share secrets centrally, you'll want to keep a list of allowed projects for those jobs though15:46
fungisince otherwise any project could run them and publish to the same namespace15:46
lajoskatonaclarkb, fungi: Hi, we decided finally to fix the unit tests for the timeout (after with your help we found the suspicious groups): https://review.opendev.org/c/openstack/neutron/+/85067018:08
lajoskatonaclarkb, fungi: sorry if I burned your time, my intention was only to check if you have seen any changes around infra which can be interesting to check first after no recent code changes happened around Neutron18:09
fungino need to apologize, i'm chair of the openstack testing and collaboration tools sig precisely because i care that testing works well for openstack projects! i wouldn't have helped you look into it if it wasn't something i had a vested interest in getting to the bottom of18:10
fungii'm especially happy to discover that narrowing it down to a kernel update was a worthwhile use of our time18:11
fungito be honest, it felt like a shot in the dark. it's not that often a random kernel security backport impacts performance like that18:13
fungiwe definitely did our best to rule out more likely suspects first18:14
fungito quote sherlock holmes: "Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth."18:16
lajoskatonafungi: :-)18:46
lajoskatonafungi: the kernel backport was a good tip, though we have no clear idea what was the root cause, and strange that with tempest things are working well, so that's why we said the best is to fix unit tests to avoid them to touch sysctl18:49
fungilajoskatona: one of the cve's fixed in that patch involved the kernel's pf interface, so it's a good bet that's related19:08
JayFPerformance regression in a kernel security fix is very surprising :-O. Nice find.19:28
clarkblajoskatona it may still be a good idea to look at adding global test timeouts too. I added them to a number of openstack projects way way back specifically to help make these sorts of problems easier to debug19:53
*** dasm|ruck is now known as dasm|off21:04
*** dviroel is now known as dviroel|out21:07

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!