#556 Feature: volume policy support
Closed: Fixed 6 years ago Opened 6 years ago by mikem.

Koji has for many years had the ability to split its storage across multiple volumes. However, there is no automatic process for placing builds onto volumes other than the primary. To do so often requires a lot of manual work from an admin.

The idea here is for the hub to consult a volume policy at various points to determine where a build should live. This would allow admins to make rules like:

  • all kernel builds go to the volume named kstore
  • all builds built from the epel-7-build tag go to the volume named epel7
  • all builds from the osbs content generator to to the volume named osbs

The default policy would be to place all builds on the default volume.

The policy would be applied to a build at import time, or by making a hub call.

We may also add a feature to the gc to enforce the volume policy.


Work continues on my playground branch.

Handling this in a consistent way across the various import pathways has proven more challenging than I initially anticipated. It was easy to apply the change to the content generator imports, but the other, older import methods we less adaptable.

This has led me to refactor the older import pathways to go through the cg_import code. Currently done: rpm and maven. Next up, images and win builds.

On the plus side, I'm generating more unit tests as I go. Coverage is up a few points

My initial approach was too ambitious given the time constraints, so I've ended up scaling back the changes. The new work is here:

https://github.com/mikem23/koji-playground/tree/volume-policy-3

The code changes are much less invasive, though I did port most of the new unit tests over to this iteration.

Working locally here for rpm builds. I'll run some more tests tomorrow

Metadata Update from @mikem:
- Issue set to the milestone: 1.15

6 years ago

Login to comment on this ticket.

Metadata