Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-39507

Subscription-manager in container mode ignores content overrides

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • subscription-manager
    • None
    • None
    • rhel-sst-csi-client-tools
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      A RHEL8 system is registered to a Satellite server that has Simple Content Access enabled. The RHEL8 content host has custom repositories disabled via the repository sets. Yet, a RHEL8 container running on this content host does not honor the disabled repository sets, and instead the custom repositories are showing as enabled.

      Further, the /run/secrets/redhat.repo file on the container matches the /etc/yum.repos.d/redhat.repo file of the host exactly (all the custom repositories are disabled). But the /etc/yum.repos.d/redhat.repo file on the container has the custom repositories enabled.

      When Simple Content Access is disabled, the RHEL8 container honors the same repository set for custom repositories as the RHEL8 content host it is running on. That is, when the content host has the custom repositories disabled via repository sets from Satellite, the RHEL8 container also has these custom repositories disabled.

      Version-Release number of selected component (if applicable):
      Satellite 6.13

      How reproducible:
      always

      Steps to Reproduce:
      1. Satellite with SCA enabled.
      2. Create custom repositories.
      3. Disable custom repositories for a RHEL8 content host via repository sets.
      4. Create a RHEL8 container on the content host, run the "exec" docker/podman command with interactive shell and observe that "yum repolist" shows the custom repositories are enabled.

      Actual results:
      RHEL8 container has custom repositories enabled.

      Expected results:
      RHEL8 container should match the host it is running on, and custom repositories should be disabled if the repository set of the content host has the custom repositories disabled.

      Additional info:

      From RHEL8 content host:

      ~~~
      $ yum repolist
      Updating Subscription Management repositories.
      repo id repo name
      rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
      rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
      ~~~

      From RHEL8 container running on content host:

      ~~~
      sh-4.4# yum repolist
      Updating Subscription Management repositories.
      Unable to read consumer identity
      subscription-manager is operating in container mode.

      This system is not registered with an entitlement server. You can use subscription-manager to register.

      repo id repo name
      Satellite-Organization_custom-product_custom-repo custom-repo
      rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
      rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
      ubi-8-appstream-rpms Red Hat Universal Base Image 8 (RPMs) - AppStream
      ubi-8-baseos-rpms Red Hat Universal Base Image 8 (RPMs) - BaseOS
      ubi-8-codeready-builder-rpms Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder
      ~~~

              jira-bugzilla-migration RH Bugzilla Integration
              jira-bugzilla-migration RH Bugzilla Integration
              CSI Client Tools Bugs Bot CSI Client Tools Bugs Bot
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: