Wednesday, 2024-10-30

opendevreviewDmitriy Rabotyagov proposed openstack/diskimage-builder master: Add Fedora 40 to the CI tests  https://review.opendev.org/c/openstack/diskimage-builder/+/93366409:44
shermanmI'm having some trouble getting the 'source-repositories' element working for me, in that even after I create a `source-repository-my-package-name` file, it never seems to actually download + cache the repo targeted by that file21:40
shermanmso I feel like I'm doing something incorrectly21:40
shermanmin the logs, I do see this line: "Getting /cache/source-repositories/repositories_flock: Wed Oct 30 21:39:23 UTC 2024 for /cache/dib_build.KvfB6z3L/hooks/source-repository-my-package-name"21:41
shermanmbut then "dib-run-parts 98-source-repositories completed" immediately after21:41
clarkbI'm trying to dig up our use of that to build the ci images for opendev but I think everything may be programmatically generated which may be more complicated than its worth but still looking21:41
shermanmI basically copied the invocation out of the ironic-python-agent-ramdisk21:42
clarkbhttps://opendev.org/openstack/project-config/src/branch/master/nodepool/elements/cache-devstack is where we cache a bunch of files not git repos21:42
clarkband that depends on the element where we cache git repos which is generated programmatically but that depends on the source-repositories element: https://opendev.org/openstack/project-config/src/branch/master/nodepool/elements/openstack-repos21:43
shermanmso, I coped this file, and made sure to also include a dependency on the source-repositories element: https://opendev.org/openstack/ironic-python-agent-builder/src/branch/master/dib/ironic-python-agent-ramdisk/source-repository-ironic-python-agent21:45
clarkbare you runnin with -x set to trace the execution? if not there may be additional output when doing so that points to what is going on. You can also stick a `bash` line inside of the script that is running )in this case 98-source-repositories) to effectively create a breakpoint there that drops you into a bash shell to debug21:46
clarkbthat would allow you to say inspect the contents of the file to ensure they got copied as you expected21:46
shermanmI think I found the issue, I wasn't setting a git ref or branch, and my repo has a default branch of `main`, not `master`22:47
shermanmbut I'm still not sure why the element was continuing even though it failed to fetch the reference22:48
clarkbI would expect running under -x to provide some clues to that23:13
shermanmunfortunately even with -x, or -x -x,  I'm not getting any  log output from inside "while read line; do" https://opendev.org/openstack/diskimage-builder/src/commit/02a3c8755960f0e1851da5ec0f8d4b66aee06494/diskimage_builder/elements/source-repositories/extra-data.d/98-source-repositories#L4523:50
clarkbnot even the progress counter on line 55?23:52
shermanmnope, not for any of the sources, including the ones that work23:52
clarkbbelow the counter it tries to match lines against a regex which I think may fail in your case since you were missing required info23:53
clarkbbut that last item is optional so even then it should progress past that conditional23:53
clarkband I know it works for us you can see that here: https://nb01.opendev.org/rockylinux-9-c34cd24105754c2bb90c8623f807f7d4.log search for "Updating cache of"23:54
shermanmI'm sure there's something really silly i'm missing tbh, but that log's helpful as an example of what the output "should" look like23:56
shermanmthanks for the tips!23:56

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