Thursday, 2022-03-17

@tony-ang:matrix.org002:13
i'm newbe in zuul-ci & installing and configuring zuul-ci according to the document below.
https://zuul-ci.org/docs/zuul/latest/tutorials/quick-start.html
However, the documentation is not integrated with gitlab and it is difficult to configure properly.
Is there anyone who has integrated zuul-ci and gitlab to install and configure it with test?
@mnaser:matrix.orgBefore I dig too deep, it seems like getting the commit message inside Zuul is not something that is natively available in the list of vars, right?02:29
https://0034caf17e384f8e6dbd-bb6e0ede9bf725bf4119cf3bb77d65f6.ssl.cf2.rackcdn.com/834082/2/gate/ansible-collection-atmosphere-tox-build/e92989f/zuul-info/inventory.yaml
@tristanc_:matrix.orgmnaser: what about zuul.message? it should be the commit message base64 encoded02:33
@mnaser:matrix.orgoh you're right, i didnt catch that one02:33
@mnaser:matrix.orgah, i found the wrong/old documents on google :(02:33
@iwienand:matrix.orgcorvus: a couple of little ones that came out of the zuul-registry work https://review.opendev.org/q/topic:zr-collect-logs02:41
@jim:acmegating.comTony Ang: it's true the quickstart doesn't talk about how to set up gitlab.  after you use it to get zuul up and running with gerrit and you understand the basics, you may be able to look at the gitlab documentation to add a new gitlab connection to the system: https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html02:52
@jim:acmegating.commnaser: https://zuul-ci.org/docs/zuul/latest/job-content.html#var-zuul.message has an example02:52
@mnaser:matrix.org> <@jim:acmegating.com> mnaser: https://zuul-ci.org/docs/zuul/latest/job-content.html#var-zuul.message has an example02:53
Yup, worked that one out, but now I am trying to find a nice way of getting the files of the most recent commit in a node-less job :)
@mnaser:matrix.orghttps://review.opendev.org/c/vexxhost/ansible-collection-atmosphere/+/834092 -- I'm thinking of using get_uri to make an API call to Gerrit or something along those lines02:53
@jim:acmegating.commnaser: or maybe see if you can do that in a trusted playbook so you can run git (may be possible if you generalize it sufficiently)02:55
@mnaser:matrix.orgyeah, I'm trying to avoid anything trusted for this -- it might be opendev-specific but Looks like https://opendev.org/api/v1/repos/vexxhost/ansible-collection-atmosphere/git/commits/32e6aec07058cb0246ea856aaffe5bf675091df6 could be a thing  seems like a thing02:55
@mnaser:matrix.orgperhaps making a role which can get commit info for $PLATFORM (i.e. github, gitea, etc)02:56
@mnaser:matrix.orgoooor it looks like the commit ID seen inside zuul isnt the same that is inside gerrit (and that's replicated)02:58
@jim:acmegating.comcorrect, it may be different; you'd have to look it up by change i think02:59
@mnaser:matrix.orglooks like i can do this: https://opendev.org/api/v1/repos/vexxhost/ansible-collection-atmosphere/git/refs/changes%2F92%2F834092%2F2 then get the ref from there02:59
@jim:acmegating.comi'm being summoned afk; good luck :)03:00
@mnaser:matrix.org:)03:00
-@gerrit:opendev.org- Zuul merged on behalf of Ian Wienand: [zuul/zuul-registry] 831846: testing: add DEBUG flag to testing container https://review.opendev.org/c/zuul/zuul-registry/+/83184603:09
-@gerrit:opendev.org- Zuul merged on behalf of Ian Wienand: [zuul/zuul-jobs] 829853: encrypt-file: always import expiring keys https://review.opendev.org/c/zuul/zuul-jobs/+/82985303:16
@tony-ang:matrix.org> <@jim:acmegating.com> Tony Ang: it's true the quickstart doesn't talk about how to set up gitlab.  after you use it to get zuul up and running with gerrit and you understand the basics, you may be able to look at the gitlab documentation to add a new gitlab connection to the system: https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html03:19
Thanks for replying. I'll take a look at that document and set it up.
@tony-ang:matrix.orgThe part that I do not understand is:05:00
(The supported options in zuul.conf connections are:)
to set gitlab integration :
<gitlab connection>
<gitlab connection>.driver(required)
gitlab
to set trigger : pipeline.trigger.<gitlab source>
to set Webhook : http://<zuul-web>/api/connection/<connection-name>/payload.
what is <gitlab connection>, <gitlab source> & <connection-name> here?
Any hints? (Can I put in any name or be chosen freely??)
like this in zuul.conf?? (I don't know how to set it in the zuul.conf.)
<gitlab connection>
driver: gitlab
api_token_name: GITLAB_PAT
<pipeline>
trigger
<gitlab source>
@sean-k-mooney:matrix.orgyou are not the only one the way that the docs use placeholders conuse many that first wee it05:02
@sean-k-mooney:matrix.orghere is the gerrit conenction from the example https://opendev.org/zuul/zuul/src/branch/master/doc/source/examples/etc_zuul/zuul.conf#L1305:07
@sean-k-mooney:matrix.orgin this case <gerrit connection> is gerrit05:07
@sean-k-mooney:matrix.orgso fro the gitlab connection you would typically write05:08
@sean-k-mooney:matrix.org[connection “gitlab”]05:09
@sean-k-mooney:matrix.org  driver: gitlab05:09
@sean-k-mooney:matrix.org05:09
@sean-k-mooney:matrix.orgthe value in “” is the name you willl used to refer to it in your tenant file05:10
@sean-k-mooney:matrix.orgso you can set it to anything that meakse sense to you such as a team name or company name05:11
@sean-k-mooney:matrix.orgits just the name that logically mapps to the connection that will be used for the tenant file05:11
@sean-k-mooney:matrix.organd in the zuul jobs if you fully qualify a repo with its connection name05:12
@sean-k-mooney:matrix.orggitlab source i belive matches whatever name you put in “”05:15
@sean-k-mooney:matrix.orgso gitlab in ths case05:16
@sean-k-mooney:matrix.orgin the example https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#reference-pipelines-configuration they are assuming the connection is called gitlab.com05:17
@sean-k-mooney:matrix.orgit would be better if they provided an example of the zuul.conf for each driver05:17
@sean-k-mooney:matrix.orgas i agree teh docs are not the simplest to parse 05:17
@tony-ang:matrix.org05:50
Thank you so much for the detailed explanation.
I will set it up and test it.
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 832757: debug test for bundle id https://review.opendev.org/c/zuul/zuul/+/83275707:14
-@gerrit:opendev.org- Benjamin Schanzel proposed: [zuul/nodepool] 834109: Pass requestor data to Nodes https://review.opendev.org/c/zuul/nodepool/+/83410907:56
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 832757: debug test for bundle id https://review.opendev.org/c/zuul/zuul/+/83275708:03
-@gerrit:opendev.org- Benjamin Schanzel proposed: [zuul/zuul] 829867: Report gross/total tenant resource usage stats https://review.opendev.org/c/zuul/zuul/+/82986708:10
-@gerrit:opendev.org- Benjamin Schanzel proposed: [zuul/zuul] 829867: Report gross/total tenant resource usage stats https://review.opendev.org/c/zuul/zuul/+/82986708:14
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 830628: Items in extra paths should be loaded in dependent changes https://review.opendev.org/c/zuul/zuul/+/83062808:19
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 832757: debug test for bundle id https://review.opendev.org/c/zuul/zuul/+/83275708:26
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 831925: Inject bundle id to inventroy zuul.items https://review.opendev.org/c/zuul/zuul/+/83192509:03
@q:fricklercloud.dehmm, running "zuul delete-state" in a docker-compose based aio environment turns out to be non-trivial09:36
@q:fricklercloud.dealso the zuul-client container seems to be pretty old and doesn't know about that command09:37
@q:fricklercloud.deBug-Report: When I'm on e.g. https://zuul.opendev.org/t/opendev/builds?project=opendev%2Fbase-jobs and click "Remove all filters", I get "something went wrong" at the URL https://zuul.opendev.org/t/opendev/builds?skip=0 , after a reload all is fine again09:52
@q:fricklercloud.desame thing for other filters. removing the filter by clicking on the "x" next to it works fine however09:53
-@gerrit:opendev.org- Dr. Jens Harbott proposed on behalf of Ian Wienand: [zuul/nodepool] 826541: [WIP] Revert "Remove openstacksdk from siblings job" https://review.opendev.org/c/zuul/nodepool/+/82654111:13
-@gerrit:opendev.org- Dr. Jens Harbott proposed: [zuul/nodepool] 834152: Fix flavor handling for openstacksdk 1.0 https://review.opendev.org/c/zuul/nodepool/+/83415211:13
-@gerrit:opendev.org- Dr. Jens Harbott proposed on behalf of Ian Wienand: [zuul/nodepool] 826541: Revert "Remove openstacksdk from siblings job" https://review.opendev.org/c/zuul/nodepool/+/82654111:28
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 831925: Inject bundle id to inventroy zuul.items https://review.opendev.org/c/zuul/zuul/+/83192512:39
-@gerrit:opendev.org- Dong Zhang proposed: [zuul/zuul] 833794: Log debug messages when remote ref is missing https://review.opendev.org/c/zuul/zuul/+/83379413:07
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/nodepool] 834170: Prioritize requests with labels that can be served https://review.opendev.org/c/zuul/nodepool/+/83417013:29
@jim:acmegating.comq: delete-state is provided by the scheduler, not zuul-client.  you can run it in docker-compose with "docker-compose exec".13:40
-@gerrit:opendev.org- Benjamin Schanzel proposed: [zuul/zuul] 829867: Report gross/total tenant resource usage stats https://review.opendev.org/c/zuul/zuul/+/82986713:51
-@gerrit:opendev.org- Simon Westphahl proposed: [zuul/nodepool] 834170: Prioritize requests with labels that can be served https://review.opendev.org/c/zuul/nodepool/+/83417014:47
@q:fricklercloud.de> <@jim:acmegating.com> q: delete-state is provided by the scheduler, not zuul-client.  you can run it in docker-compose with "docker-compose exec".15:09
so the documentation should be more clear then about the difference between the "zuul" client in the zuul_scheduled container and the "zuul-client" client.
also, "docker-compose exec" doesn't work if I stop the zuul_* containers beforehand, as I'm supposed to do by the documentation for the delete-state command
I finally managed to get it working by running another copy of the zuul_scheduler container, manually mounting all the needed volumes and setting the correct network and overriding /etc/hosts in order to be able to resolve the zookeeper container hostname
@jim:acmegating.comq: then you want `docker-compose run`15:24
@jim:acmegating.comq: heres' the command from the history on zuul02.opendev.org: `docker-compose run --rm scheduler zuul delete-state`15:24
@jim:acmegating.comq: here's the documentation for the delete-state "zuul" client command: https://zuul-ci.org/docs/zuul/latest/client.html#delete-state  maybe you want to add a note to the top of that file reminding folks that it's different than the zuul-client package?15:26
@clarkb:matrix.orgcorvus: I'm pulling up the gitlab timer changes now15:36
@clarkb:matrix.orgcorvus: question on https://review.opendev.org/c/zuul/zuul/+/83391815:51
@jim:acmegating.comClark: replied15:59
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul-jobs] 834194: Fix encrypt files stat validation https://review.opendev.org/c/zuul/zuul-jobs/+/83419416:12
-@gerrit:opendev.org- Jeremy Stanley https://matrix.to/#/@fungicide:matrix.org proposed: [zuul/zuul-jobs] 834196: encrypt-file: roll back extended file stat https://review.opendev.org/c/zuul/zuul-jobs/+/83419616:17
-@gerrit:opendev.org- Jeremy Stanley https://matrix.to/#/@fungicide:matrix.org proposed: [zuul/zuul-jobs] 834197: Revert "encrypt-file: roll back extended file stat" https://review.opendev.org/c/zuul/zuul-jobs/+/83419716:22
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul-jobs] 834194: Fix encrypt files stat validation https://review.opendev.org/c/zuul/zuul-jobs/+/83419416:24
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 834198: Add spec for removing restricted Ansible https://review.opendev.org/c/zuul/zuul/+/83419816:29
@jim:acmegating.comzuul-maint: ^ we've discussed this off and on before; i think now is a good time to make a decision on that one way or the other; please let me know your thoughts.16:30
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 834198: Add spec for removing restricted Ansible https://review.opendev.org/c/zuul/zuul/+/83419816:33
-@gerrit:opendev.org- James E. Blair https://matrix.to/#/@jim:acmegating.com proposed: [zuul/zuul] 834198: Add spec for removing restricted Ansible https://review.opendev.org/c/zuul/zuul/+/83419816:36
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul-jobs] 834194: Fix encrypt files stat validation https://review.opendev.org/c/zuul/zuul-jobs/+/83419416:56
-@gerrit:opendev.org- Zuul merged on behalf of James E. Blair https://matrix.to/#/@jim:acmegating.com: [zuul/zuul] 833183: Log errors in timer trigger https://review.opendev.org/c/zuul/zuul/+/83318316:58
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul-jobs] 834194: Fix encrypt files stat validation https://review.opendev.org/c/zuul/zuul-jobs/+/83419416:59
-@gerrit:opendev.org- Zuul merged on behalf of James E. Blair https://matrix.to/#/@jim:acmegating.com: [zuul/zuul] 833184: Continue generating timer events on error https://review.opendev.org/c/zuul/zuul/+/83318417:01
-@gerrit:opendev.org- Artem Goncharov proposed on behalf of Dr. Jens Harbott: [zuul/nodepool] 834152: Fix flavor handling for openstacksdk 1.0 https://review.opendev.org/c/zuul/nodepool/+/83415217:08
-@gerrit:opendev.org- Zuul merged on behalf of James E. Blair https://matrix.to/#/@jim:acmegating.com: [zuul/zuul] 833918: Fix gitlab timer events https://review.opendev.org/c/zuul/zuul/+/83391817:15
-@gerrit:opendev.org- Zuul merged on behalf of James E. Blair https://matrix.to/#/@jim:acmegating.com:17:42
- [zuul/nodepool] 830527: Add additional tests to the aws driver https://review.opendev.org/c/zuul/nodepool/+/830527
- [zuul/nodepool] 834057: Remove unused AWS implementation https://review.opendev.org/c/zuul/nodepool/+/834057
@tristanc_:matrix.orgdmsimard: here is a spec to support recent ansible version: https://review.opendev.org/c/zuul/zuul/+/834198 . Didn't you mention a mechanism to run different version, is it execution environment?17:43
@dmsimard:matrix.orgExecution environments are really just container images with particular versions of ansible-core, ansible-runner as well as appropriate or necessary ansible collections -- AWX uses them to run jobs in k8s pods nowadays17:46
@dmsimard:matrix.orgI'll have a read on the spec and see if I can provide any insight17:46
@dmsimard:matrix.orgThere's an ansible-builder tool to help build them if you want (it even uses bindep!), I have a fairly simple example here: https://github.com/ansible-community/images/tree/main/execution-environments17:48
@clarkb:matrix.orgIs anyone able to review https://review.opendev.org/c/zuul/zuul-jobs/+/834196 ? that is affecting opendev's ability to update our gitea deployment right now17:53
-@gerrit:opendev.org- Clark Boylan proposed: [zuul/zuul-jobs] 834194: Fix encrypt files stat validation https://review.opendev.org/c/zuul/zuul-jobs/+/83419417:56
@clarkb:matrix.orgtristanC: thanks!18:04
-@gerrit:opendev.org- Zuul merged on behalf of Jeremy Stanley https://matrix.to/#/@fungicide:matrix.org: [zuul/zuul-jobs] 834196: encrypt-file: roll back extended file stat https://review.opendev.org/c/zuul/zuul-jobs/+/83419618:06
@dmsimard:matrix.orgtristanC: added a few comments, thanks for pointing it out to me :)18:14
@jim:acmegating.comdmsimard: thanks!18:17
@dmsimard:matrix.orghappy to help, I happen to be the one doing the releases of the 'ansible' package nowadays so feel free to reach out if you have any questions18:18
@fungicide:matrix.orgdmsimard: one thing which could be helpful is suggestions for any ways you're aware of to make it safer to run untrusted ansible playbooks beyond basic containerization functionality like process namespacing et cetera. has there been any progress in recent ansible releases toward new ways to control risks in that use case?18:39
@fungicide:matrix.orglooking for ways to avoid putting all our executor security eggs in the kernel/container basket basically (which is effectively the situation we're in at the moment)18:40
@dmsimard:matrix.org@fungi Yes, I remember asking about this myself many years ago already... I don't have a good answer at this time but I know who  I can ask so let me get back to you on that.18:58
@dmsimard:matrix.orgBroadly speaking, I know that AWX has dropped bwrap in favor of execution environments (containers) in k8s pods (which also makes k8s a hard requirement) though I am unfamiliar with the security pros and cons of doing it that way or whether there are expectations about single vs multiple tenancy18:59
@dmsimard:matrix.org * fungi: Yes, I remember asking about this myself many years ago already... I don't have a good answer at this time but I know who  I can ask so let me get back to you on that.19:00
@fungicide:matrix.orgthanks, that's definitely interesting. if you have any details on how containers in kubernetes are inherently more secure than containers outside kubernetes, that would be good to know19:02
@dmsimard:matrix.orgI don't know about that but I meant to talk about the container/execution environment approach vs bubblewrap19:03
@fungicide:matrix.orgyep, thanks, i definitely appreciate the details!19:04
@fungicide:matrix.orgwhatever you find out would be of interest19:04
@fungicide:matrix.orgdmsimard: from a purely technical implementation perspective, i'm also curious how you solve the executor git efficiency problem if workspaces can no longer share a common cache (or do you have a cache, and how do you expose that to them?)19:21
@jim:acmegating.comwell, i don't think awx is a 1:1 match for zuul functionality19:23
@jim:acmegating.comie, i'm not quite sure it has the same focus on git repos19:23
@fungicide:matrix.orgoh, i probably misunderstood, i thought he meant awx's use of zuul19:24
@jim:acmegating.comah, i read that as comparing notes on the parts that are similar: ie, "a thing that runs ansible playbooks for people"19:24
@jim:acmegating.combut one perspective for zuul: a hypothetical COE executor engine shifts the risk from the executor to the k8s cluster.  so one would be less concerned with the executor being compromised, but the k8s cluster could be.  that would shift the potential exposure from all zuul secrets to the zuul secrets which happened to be used on that k8s cluster during the exposure period.19:25
@fungicide:matrix.orgabsolutely, it would effectively move the ephemeral build containers to a separate system, but raises obvious efficiency challenges in the process19:29
@fungicide:matrix.org(locality of cache, et cetera)19:30
@fungicide:matrix.orgbeing able to rely on git's hardlink-based cloning within the same filesystem is a huge performance boost19:31
@dmsimard:matrix.orgawx does have the concept of "projects" which are git repos that can be retrieved before a job runs or fetched on a regular basis (i.e, cron) but I'm not knowledgeable enough about awx to khow they eventually make it into the container20:25
@dmsimard:matrix.org * awx does have the concept of "projects" which are git repos that can be retrieved before a job runs or fetched on a regular basis (i.e, cron) but I'm not knowledgeable enough about awx to know how they eventually make it into the container20:26
@dmsimard:matrix.org> <@dmsimard:matrix.org> fungi: Yes, I remember asking about this myself many years ago already... I don't have a good answer at this time but I know who  I can ask so let me get back to you on that.20:47
I asked around and it doesn't look like there's a feature around allowing (or preventing) particular modules or plugins to run although something that I am told could be interesting to look into is to leverage [ansible-runner](https://ansible-runner.readthedocs.io/en/stable/index.html) which may provide more flexibility than shelling out to the ansible-playbook CLI
@dmsimard:matrix.orgIn terms of security, execution environments aren't perfect (given containers, container runtimes and platforms have their own vulnerabilities..) though one thing to consider is that the attack surface can be smaller if you only install what you need in them (vs the entire ansible kitchen sink)20:51
@shrews:matrix.orgfwiw, I don’t ever see that being a feature in runner20:52
@dmsimard:matrix.orgyeah, I don't know how it would even work in practice :/20:52
@dmsimard:matrix.orga few years ago I remember asking about an ansible configuration that'd be like a whitelist/blacklist of modules20:53
@dmsimard:matrix.orgawx has something kind of like that, I think for adhoc commands ? but it's enforced by awx, not ansible20:54
@clarkb:matrix.org> <@shrews:matrix.org> fwiw, I don’t ever see that being a feature in runner20:54
that == restricted access/runtime?
@shrews:matrix.orgmodule/plugin allowed list20:57
@clarkb:matrix.orggot it20:57
-@gerrit:opendev.org- Zuul merged on behalf of Clark Boylan: [zuul/zuul-jobs] 834194: Fix encrypt files stat validation https://review.opendev.org/c/zuul/zuul-jobs/+/83419421:10

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