@mnaser:matrix.org | I can’t seem to figure out a neat/clean way of having Zuul run one-off jobs. In my case, I need to build images for the Cluster API (basically equivalent of DIB) in a job, but only do so when Kubernetes releases a new tag .. | 03:08 |
---|---|---|
@mnaser:matrix.org | Now that I’m thinking of it, I guess what I can do is create a pipeline that builds and tests tags and then manually enqueue with Zuul admin if I need the one off… | 03:08 |
@mnaser:matrix.org | Just going to be tough to figure out how to listen to a GitHub repo that the app isn’t installed on :/ | 03:09 |
@clarkb:matrix.org | > <@mnaser:matrix.org> Just going to be tough to figure out how to listen to a GitHub repo that the app isn’t installed on :/ | 03:11 |
This works you just have to be careful of API limits. | ||
@mnaser:matrix.org | My main issue is that it takes around 30 minutes to build the image, and I’d rather use a pre built one rather than build on every run | 03:11 |
@clarkb:matrix.org | And for building images opendev just pushes a commit that modifies a comment in a dockerfile if necessary to force rebuilds | 03:11 |
@clarkb:matrix.org | We also use pre built images all over the place | 03:12 |
@mnaser:matrix.org | This is a qcow2 image fwiw | 03:12 |
@clarkb:matrix.org | Ah ok. Though I think the same general rules apply you may just have to do the byte shuffling more explicitly since those don't fall into registries with various clients for pushing and pulling | 03:13 |
@clarkb:matrix.org | If image specification has changed or upstream pushes a tag do a new build else fetch from the cold storage location | 03:13 |
@mnaser:matrix.org | I think provides and requires would | 03:15 |
Be nice here but I don’t think I can do an optional required | ||
@mnaser:matrix.org | Requires** | 03:15 |
@mnaser:matrix.org | (Because I would like to build in a seperate job in parallel while devstack goes up for example) | 03:16 |
@mnaser:matrix.org | I’ll have to mull over this more | 03:16 |
@clarkb:matrix.org | You'd do an optional requres and the only incur the wait for build if you need to build. Otherwise fetch | 03:22 |
@clarkb:matrix.org | It really is almost identical to the container image build setup but with different build and fetch tools. The logical configuration should be very similar | 03:24 |
@mnaser:matrix.org | > <@clarkb:matrix.org> You'd do an optional requres and the only incur the wait for build if you need to build. Otherwise fetch | 03:29 |
Requires can be optional? I searched through the docs and couldn’t find optional requires there. | ||
@clarkb:matrix.org | Pretty sure that is how we do our container images. It's an optional dep which means if the job enqueues to build the image we wait. Otherwise we fetch the latest version from docker hub | 03:42 |
@clarkb:matrix.org | https://opendev.org/opendev/system-config/src/branch/master/zuul.d/project.yaml#L54 for example | 03:46 |
@mnaser:matrix.org | ahhh, soft and dependencies is what I’m seeking | 03:47 |
@mnaser:matrix.org | I always wasn’t sure what the difference of dependencies and provides/requires | 03:47 |
@jim:acmegating.com | dependencies are within the same buildset; provides/requires are across buildsets | 03:49 |
@mnaser:matrix.org | > <@jim:acmegating.com> dependencies are within the same buildset; provides/requires are across buildsets | 04:03 |
oh well that’s easy then. I think the only minor annoyance is I assume dependencies will mean the child job won’t start until it’s ready so I can’t build my image in parallel and then wait for the image | ||
@mnaser:matrix.org | But I’ll survive I think :) | 04:04 |
@agireesh:matrix.org | our ZUUL CI job is failing while running "prepare-workspace-git" role, I found that we made some changes in this role | 16:45 |
Here is the failure logs | ||
@agireesh:matrix.org | TASK [prepare-workspace-git : Don't filter zuul projects if flag is false] | 16:45 |
2024-03-29 03:01:42.849070 | controller | ok | ||
2024-03-29 03:01:42.963578 | | ||
2024-03-29 03:01:42.963772 | LOOP [prepare-workspace-git : Set initial repo states in workspace] | ||
2024-03-29 03:01:43.732771 | controller | ERROR | ||
2024-03-29 03:01:43.733197 | controller | { | ||
2024-03-29 03:01:43.733289 | controller | "msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'src_dir'\n\nThe error appears to be in '/var/lib/zuul/builds/07dadfe9c765420dbaee789dfb65a71e/trusted/project_1/opendev.org/zuul/zuul-jobs/roles/prepare-workspace-git/tasks/main.yaml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# task startup time we incur.\n- name: Set initial repo states in workspace\n ^ here\n" | ||
2024-03-29 03:01:43.733385 | controller | } | ||
@agireesh:matrix.org | you can find the complete log here, https://netappopenstacklogserver.s3-us-west-1.amazonaws.com/logs/59/912059/6/upstream-check/manila-tempest-plugin-ontap-no-dhss-rest/07dadfe/job-output.txt | 16:46 |
@agireesh:matrix.org | can some help me to find the root cause the issue, it was passing before 20 March 2024 | 16:47 |
@clarkb:matrix.org | agireesh: you've made local changes to the role and are not using the upstream version? | 16:58 |
@agireesh:matrix.org | no, we didn't make any changes locally, we are using upstream | 17:08 |
@clarkb:matrix.org | ok just trying to udnerstand what you meant by `I found that we made some changes in this role` | 17:09 |
@agireesh:matrix.org | I mean someone from community made the changes in this role due to that I think it is breaking our zuul | 17:10 |
@agireesh:matrix.org | commit 8374db870b5e8513429fca51c517dc5bd1c5122c | 17:12 |
Merge: 703d0b1a 5eca8fed | ||
Author: Zuul <zuul@review.opendev.org> | ||
Date: Tue Mar 19 14:59:28 2024 +0000 | ||
Merge "prepare-workspace-git: Add ability to define synced pojects" | ||
I think due to this change | ||
@clarkb:matrix.org | agireesh: that change should be a noop unless you update your configs, but yes it did modify that role (but not the task that is failing) | 17:13 |
@clarkb:matrix.org | in your zuul job inventory you should see the definitions for all the zuul variables which that role operates on. You can then cross check the values for src_dir content | 17:14 |
@agireesh:matrix.org | Clark: is it possible to connect through zoom to debug this issue, I am also new in zuul and ansible | 17:17 |
@clarkb:matrix.org | agireesh: unfortunately I've got a fairly urgent issue I'm currently working on so I can't do that right now | 17:19 |
@clarkb:matrix.org | I think corvus business may do things like that but he may not be around today (it is a holiday for many) | 17:19 |
@agireesh:matrix.org | ohh, sorry, then will try to connect with you on Monday | 17:20 |
@agireesh:matrix.org | anyway, thanks for looking into this, i will also try to check what is the issue here, will connect on Monday if you are available | 17:22 |
@mnaser:matrix.org | What’s the best way to troubleshoot playbooks that aren’t running? For some reason, my base job playbooks are for some reason not running :/ | 18:52 |
@mnaser:matrix.org | They just seem to be doing nothing and jumping straight to RESULT_NORMAL | 18:52 |
@clarkb:matrix.org | I would look in your inventory for the job inheritance path and start there to figure out how the job is constructed | 18:52 |
@clarkb:matrix.org | Playbooks not running likely means you didn't inherit things the way you expected to | 18:53 |
@mnaser:matrix.org | What’s wild is I literally did nothing than switch off of upload logs but I’ll get looking.. | 18:53 |
@mnaser:matrix.org | Like it’s actually all there.. even the job and playbook is there. I guess time to try and revert whatever changes I’ve done | 18:54 |
@mnaser:matrix.org | https://paste.opendev.org/show/bqRYITJfw7RftCUo4nga/ | 19:02 |
@mnaser:matrix.org | Nothing in the end results and nothing in the status reported on github and nothing in the zuul logs :\ | 19:03 |
@mnaser:matrix.org | pre.yaml is pretty straightforward too https://paste.opendev.org/show/bXy5CdlMfnMAGtcFMuCx/ | 19:04 |
@clarkb:matrix.org | Maybe enable debug logs on the executor and trace the Ansible run? Sorry I'm only barely able to follow this right noe | 19:09 |
@mnaser:matrix.org | Ah no worries, that's a good lead, that's what I'll do | 19:10 |
@mnaser:matrix.org | balls. `/srv/static/logs` mount was missing on the docker container: `bwrap: Can't find source path /srv/static/logs: No such file or directory` | 19:14 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!