Excluding php updates in foreman

I have remi php repositories in my repository but I get update information as in the attached photo


of course when I do dnf update I don’t have any update.

in module stream i have enable only remi php repo

Somebody have similar problem?

This is similar is possible to fix wihout recreated repo?

I recreate the whole PHP “Product” and still the same problem.

I also have a problem with newer versions of PHP

Hey @WerVa, can you tell us:

  • What version of Katello you’re on
  • The EL flavor and version that your client running
  • The remi PHP repository link that you’re syncing from

We need to determine if Katello is calculating something wrong or if the remi php repo is doing something with its modular metadata incorrectly.

Also I edited your post to have the Katello support label. I usually miss Katello questions that don’t have that label on them.

Thanks @iballou

Information:

Katello: 4.11.0
Server: Rocky Linux 8.8
Client: Rocky Linux 9.3

Remi-main: Index of /enterprise/9/remi/x86_64
Remi-modular: Index of /enterprise/9/modular/x86_64

1 Like

Great, we can try to reproduce the issue with this information now.

I believe I’ve found the issue.

For applicability to work, Katello needs to match the modular content that comes from subscription-manager and the content that comes from Pulp. For example, the module stream remi-7.4.

I noticed this oddity in the Katello DB:

::Katello::ModuleStream.where(stream: "remi-7.4")
=> #<ActiveRecord::Relation [#<Katello::ModuleStream id: 973, name: "php", pulp_id: "/pulp/api/v3/content/rpm/modulemds/018e0ac8-a1a0-7...", version: "20240229081107", context: "0", stream: "remi-7.4", arch: "x86_64", created_at: "2024-03-04 18:45:27.899328000 +0000", updated_at: "2024-03-04 18:45:27.899334000 +0000", description: "Alternative php 7.4 module. The remi-7.4 stream pr...", summary: nil, migrated_pulp3_href: nil>]>

vs

::Katello::AvailableModuleStream.all.where(stream: "remi-7.4").first
=> #<Katello::AvailableModuleStream id: 4, name: "php", stream: "remi-7.4", context: "00000000", profiles: nil>

Notice the difference in context : context: "0" vs context: "00000000".

In the remi modular metadata, I found:

---
document: modulemd
version: 2
data:
  name: php
  stream: remi-7.4
  version: 20231114145832
  context: 00000000
  arch: x86_64
  summary: PHP scripting language

So, I think Pulp is chopping down the context during syncing.

This causes Katello to think the system’s installed remi RPMs are not part of any module stream when they really are.

I proved this via the foreman console by doing:

::Katello::ModuleStream.where(stream: "remi-7.4").first.update(context: "00000000")

After recalculating applicability with that DB hack, the wrong upgrade notifications disappeared.

I’ll make a Pulp issue.

1 Like

Pulp issue to watch: "00000000" modular context chomped to "0" · Issue #3454 · pulp/pulp_rpm · GitHub

1 Like

Thank you so much for checking this! This will help me a lot.

1 Like