[RFE] It should be possible to set metadata_expire on on the server side

Today, metadata_expire defaults to “1” on subscription-manager repos. This leads to frequent metadata downloads, and is especially annoying in any workflow that does multiple dnf/yum operations in quick sequence. (i.e. check-updates, update, needs-restarting). Sometimes the -C option will prevent the command from working in dnf5 (which is an entirely separate issue), but makes it undesirable to set -C.

It is currently possible to override metadata_expire via subscription-manager repo-overrides; and this is the only currently supported mechanism. It would be nice to be able to set this on the foreman/katello side; activation keys currently expose the content override and this seems like it would be a good place to add this capability, and possibly others.

2 Likes

This is possible for custom repositories since Feature #36352 [RFE] Allow updating metadata_expire for custom repositories but not for Red Hat CDN ones.

Maybe @Partha_Aji or @iballou can shed some light on the details

1 Like

Looking at the docs, so it is. It’s kind of funny that I submitted this after talking to @iballou (and Sachin) about this at DevConf.US. The feature as implemented currently does cover what I want and need it to cover.

1 Like

Hi Martin, This completely skipped my mind when chatting with you earlier. It’s good we have a solution implemented for custom repositories already. :slight_smile:

2 Likes

This feature really did sneak in as I remember, it was developed and merged within a couple days I think.

What’s even stranger is that I remember seeing a thread where someone was asking to extend the content_override stuff on activation keys (which seemed like the logical place to put this), and basically getting a hard no because of the UX and other stuff that would be needed to plumb it that way. I also remember this being an irritation long ago when I was at a customer, so I didn’t think to look at the repository API itself to see if it had changed.

Regardless, I’m thrilled that it’s an option now. Thanks again!

1 Like