I recently started using Koji's dist-repo command instead of mash to compose consumable package repositories. Things seem to be working well, except that I find the content eventually disappearing and the latest symlink dangling. I have a tool that I wrote where I expected I would need to purge old dist-repos so I immediately suspected a bug there but the evidence seems to show my tool not at fault. So either I am overlooking my own bug or Koji is doing more than I thought. Does the GC or any other part of Koji purge stuff under /mnt/koji/repos-dist?
dist-repo
mash
latest
/mnt/koji/repos-dist
Yes, kojira handles all created repositories, so also dist repos are purged. Default lifetime is set to one week and can be overridden by dist_repo_lifetime in kojira.conf. You can find some evidence in kojira's logs.
dist_repo_lifetime
kojira.conf
Metadata Update from @tkopecek: - Custom field Size adjusted to None
This doesn't seem right to me. If the dist repos are meant for public consumption (by dnf/yum) as I wish to do, it's not good if they completely disappear. I understand purging the older ones but purging the ones pointed to by the latest symlink seems all wrong.
Hmm, latest repo is never deleted. (I missed that part in description). Can you find any info in the logs if kojira did it?
I'm not sure how I can check this. The log clearly shows various repos-dist directories being deleted along with their numeric ID but how would I know what ID was "latest" at the time?
However, scrolling way back in my shell history, I did find this:
$ ll /mnt/koji/repos-dist/* <snip> /mnt/koji/repos-dist/f30-testing: total 0 lrwxrwxrwx. 1 apache apache 5 Jun 28 12:15 latest -> 10915
and then ...
$ grep 10915 /var/log/kojira.log* /var/log/kojira.log:2019-06-28 12:15:25,498 [INFO] koji.repo.currency: Found repo 10915, state=INIT /var/log/kojira.log:2019-06-28 12:15:40,771 [INFO] koji.repo.currency: State changed for repo 10915: INIT -> READY /var/log/kojira.log:2019-06-28 12:15:40,830 [INFO] koji.repo: Expiring repo 10915.. /var/log/kojira.log:2019-07-05 12:16:12,546 [INFO] koji.repo: Deleted repo 10915 /var/log/kojira.log:2019-07-05 12:16:12,547 [INFO] koji.repo.currency: Queuing rmtree job for /mnt/koji/repos-dist/f30-testing/10915 /var/log/kojira.log:2019-07-05 12:16:12,554 [INFO] koji.repo.currency: Started rmtree (pid 731) for /mnt/koji/repos-dist/f30-testing/10915 /var/log/kojira.log:2019-07-05 12:16:27,744 [INFO] koji.repo.currency: pid 731 (/mnt/koji/repos-dist/f30-testing/10915) exited with status 0 /var/log/kojira.log:2019-07-05 12:16:27,746 [INFO] koji.repo.currency: Completed rmtree job for /mnt/koji/repos-dist/f30-testing/10915
So yeah, I'd say Kojira is at fault here.
Just to be sure: tag f30-testing still exists?
I suspect, that only this expire: https://pagure.io/koji/blob/master/f/util/kojira#_722 can be triggered for dist-repos. If it is the problem, it is still weird, that repo was deleted almost immediately after it was created and not after dist_repo_lifetime. @mikem any idea?
Yes that tag still exists.
I suspect, that only this expire: https://pagure.io/koji/blob/master/f/util/kojira#_722 can be triggered for dist-repos. If it is the problem, it is still weird, that repo was deleted almost immediately after it was created and not after dist_repo_lifetime.
Could it be expired by being superseded? I don't recall now, but I may have triggered a newer dist-repo for the same tag very shortly after this one was created.
In such case, symlink would point to newer repo id.
@jflorian Is this actual or should I close it?
@tkopecek I think this should be closed. I'm no longer having this issue and, in fact, had forgotten about it.
Metadata Update from @tkopecek: - Issue close_status updated to: Dropped - Issue status updated to: Closed (was: Open)
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/1581
Please continue any further discussion there.