#4315 In clean installation topdir/repos is not created
Opened 3 months ago by tkopecek. Modified 18 days ago

...and kojid in createrepo will decide to refuse createrepo task as this directory doesn't exist. Needs confirmation.


If it is the cause, precreating that directory during hub setup would fix it.

Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue tagged with: easyfix

3 months ago

repo_init calls ensuredir, so that will create it, but that is called by the newRepo task

precreating that directory during hub setup

I'm not 100% sure what you mean here, but if you mean in server_setup() then I'd rather not. An unauthenticated call should not write to disc, even something as innocuous as ensuredir.

Options off the top of my head:

  1. add the ensuredir in the places where we're about to create the newRepo task. I.e. the newRepo call and repo_queue_task. (the distRepo call already does this for repos-dist)
  2. add a fallback mechanism on the builder directory check that will trigger the ensuredir (via a host call) if it seems to be missing and then recheck.

The first is simpler

or even

3. in newRepo handler call a new host.ensurerepodir() call or similar (maybe just repoPreInit?) before the check

The handler checks for the repos dir before calling repoInit because repoInit is kind of a heavy call that a future task run can't currently reuse.

This is the interfering check: https://pagure.io/koji/c/e169a6bf3eaa09f35ab06511ed4b7814dab725e8 So, adding ensuredir is not the best for expected case.

My point is to ensure the repos dir before that, just not on every single call. The points above are the most natural places to do that that I can think of. I'll draft a PR for what I mean

PR #4316 is the least risky + least invasive thing I can think of

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

3 months ago

Metadata Update from @tkopecek:
- Issue untagged with: testing-ready
- Issue tagged with: testing-basic

2 months ago

Metadata Update from @mfilip:
- Issue tagged with: testing-done

18 days ago

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #4316 Last updated 13 days ago