Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2295407

Summary: Ceph gets the eus repos enabled
Product: Red Hat OpenStack Reporter: Kenny Tordeurs <ktordeur>
Component: documentationAssignee: kgilliga
Status: CLOSED CURRENTRELEASE QA Contact: Archana Singh <arcsingh>
Severity: medium Docs Contact:
Priority: high    
Version: 17.1 (Wallaby)CC: enothen, fpantano, gfidente, jbadiapa, jelle.hoylaerts.ext, jpretori, mkatari, ramishra
Target Milestone: asyncKeywords: Reopened, Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-10 15:47:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kenny Tordeurs 2024-07-03 12:49:17 UTC
Description of problem:
The eus repositories are enabled instead of the regular repositories as we want to keep the ceph nodes on the latest and not eus.

Version-Release number of selected component (if applicable):
16.2 > 17.1

How reproducible:
100%

Steps to Reproduce:
1. # openstack overcloud upgrade run --yes --stack osp23 --limit osp...
2.
3.

Actual results:
# yum repolist

Updating Subscription Management repositories.

repo id                                                                repo name

fast-datapath-for-rhel-9-x86_64-rpms                                   Fast Datapath for RHEL 9 x86_64 (RPMs)

openstack-17.1-for-rhel-9-x86_64-rpms                                  Red Hat OpenStack Platform 17.1 for RHEL 9 x86_64 (RPMs)

rhceph-5-tools-for-rhel-9-x86_64-rpms                                  Red Hat Ceph Storage Tools 5 for RHEL 9 x86_64 (RPMs)

rhel-9-for-x86_64-appstream-eus-rpms                                   Red Hat Enterprise Linux 9 for x86_64 - AppStream - Extended Update Support (RPMs)

rhel-9-for-x86_64-baseos-eus-rpms                                      Red Hat Enterprise Linux 9 for x86_64 - BaseOS - Extended Update Support (RPMs)

rhel-9-for-x86_64-highavailability-eus-rpms                            Red Hat Enterprise Linux 9 for x86_64 - High Availability - Extended Update Support (RPMs)

Expected results:
Normal repositories not the eus 

Additional info:

Comment 1 Manoj Katari 2024-07-11 06:54:46 UTC
I don't see a bug here, it is indicated as a valid repo for appstream, baseos and highavailabilty as per chapter 1.6.2 [1] for all overcloud nodes

Also there is a Note:
"If you synchronize repositories with Red Hat Satellite, you can enable specific versions of the Red Hat Enterprise Linux repositories. However, the repository remains the same despite the version you choose. For example, you can enable the 9.2 version of the BaseOS repository, but the repository name is still rhel-9-for-x86_64-baseos-eus-rpms despite the specific version you choose."

[1] https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/framework_for_upgrades_16.2_to_17.1/index#ref_overcloud-repositories_repositories

@jbadiapa pls confirm if we can close it as 'NOTABUG' , ?

Comment 2 Kenny Tordeurs 2024-07-11 07:13:20 UTC
(In reply to Manoj Katari from comment #1)

This will lock you in with RHEL 9.2 while you can update to the latest version, please refer to the ceph docs:

https://docs.redhat.com/en/documentation/red_hat_ceph_storage/7/html-single/installation_guide/index#registering-the-red-hat-ceph-storage-nodes-to-the-cdn-and-attaching-subscriptions_install

~~~
Red Hat Enterprise Linux 9
subscription-manager repos --disable=*
subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms
subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms
~~~

Comment 3 Jelle Hoylaerts 2024-07-11 08:18:57 UTC
Even in the OSP upgrade guide per chapter 1.6.2 [1] if you look to the Ceph specific repo's that are supposed to be enabled, only non EUS repos are mentioned.
[1] https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/framework_for_upgrades_16.2_to_17.1/index#ref_overcloud-repositories_repositories

Comment 4 Juan Badia Payno 2024-07-11 08:25:35 UTC
As far as I know the RHEL version for openstack 17.1 is RHEL-9.2, so we expect all the nodes to get locked to RHEL-9.2.
The multi-rhel means that the Compute nodes can stay longer in RHEL-8.4 but when the OS is upgraded it goes to RHEL-9.2.

So in my opinion, this is not a bug.

Comment 6 Juan Badia Payno 2024-07-22 07:12:36 UTC
As my comment is older than a week and there is no more questions or doubts, I closed this bz as not a bug. 
Feel free to reopen it to keep the conversation on or if something is not accurate.

Comment 8 Jesse Pretorius 2024-09-18 12:53:17 UTC
As per https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/framework_for_upgrades_16.2_to_17.1/index#ref_overcloud-repositories_repositories

In the section 'Ceph Storage node repositories'

The Ceph Storage hosts should NOT be pinned to an EUS stream. Their repository configuration must be implemented as part of their role configuration. In Satellite this may need to be implemented as a different content view. That part I cannot speak to.

Comment 9 Kenny Tordeurs 2024-09-18 13:00:40 UTC
(In reply to Jesse Pretorius from comment #8)
> As per
> https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/
> html-single/framework_for_upgrades_16.2_to_17.1/index#ref_overcloud-
> repositories_repositories
> 
> In the section 'Ceph Storage node repositories'
> 
> The Ceph Storage hosts should NOT be pinned to an EUS stream. Their
> repository configuration must be implemented as part of their role
> configuration. In Satellite this may need to be implemented as a different
> content view. That part I cannot speak to.

Thanks for confirming, in the content view in Satellite this is correctly set but it's the lock that's set by the upgrade that causes this issue.

~~~
Juan Badia Payno  2024-07-11 10:25:35 CEST
As far as I know the RHEL version for openstack 17.1 is RHEL-9.2, so we expect all the nodes to get locked to RHEL-9.2.
The multi-rhel means that the Compute nodes can stay longer in RHEL-8.4 but when the OS is upgraded it goes to RHEL-9.2.

So in my opinion, this is not a bug.
~~~

Comment 10 Eric Nothen 2024-09-18 13:55:41 UTC
Kenny,

If you want the ceph nodes to have different (non-EUS) repositories, you have to specify that on your RhsmVars. Example taken from [0]:

~~~
parameter_defaults:
  ControllerParameters:
    RhsmVars:
      rhsm_repos:
        - rhel-9-for-x86_64-baseos-eus-rpms
        - rhel-9-for-x86_64-appstream-eus-rpms
        - rhel-9-for-x86_64-highavailability-eus-rpms
        - openstack-17.1-for-rhel-9-x86_64-rpms
        - fast-datapath-for-rhel-9-x86_64-rpms
        - rhceph-6-tools-for-rhel-9-x86_64-rpms
      rhsm_username: "myusername"
      rhsm_password: "p@55w0rd!"
      rhsm_org_id: "1234567"
      rhsm_pool_ids: "55d251f1490556f3e75aa37e89e10ce5"
      rhsm_method: "portal"
      rhsm_release: 9.2
  ComputeParameters:
    RhsmVars:
      rhsm_repos:
        - rhel-9-for-x86_64-baseos-eus-rpms
        - rhel-9-for-x86_64-appstream-eus-rpms
        - rhel-9-for-x86_64-highavailability-eus-rpms
        - openstack-17.1-for-rhel-9-x86_64-rpms
        - rhceph-6-tools-for-rhel-9-x86_64-rpms
        - fast-datapath-for-rhel-9-x86_64-rpms
      rhsm_username: "myusername"
      rhsm_password: "p@55w0rd!"
      rhsm_org_id: "1234567"
      rhsm_pool_ids: "55d251f1490556f3e75aa37e89e10ce5"
      rhsm_method: "portal"
      rhsm_release: 9.2
  CephStorageParameters:
    RhsmVars:
      rhsm_repos:
        - rhel-9-for-x86_64-baseos-rpms
        - rhel-9-for-x86_64-appstream-rpms
        - rhel-9-for-x86_64-highavailability-rpms
        - openstack-17.1-deployment-tools-for-rhel-9-x86_64-rpms
      rhsm_username: "myusername"
      rhsm_password: "p@55w0rd!"
      rhsm_org_id: "1234567"
      rhsm_pool_ids: "68790a7aa2dc9dc50a9bc39fabc55e0d"
      rhsm_method: "portal"
      rhsm_release: 9.2
~~~

[0] https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/customizing_your_red_hat_openstack_platform_deployment/index#assembly_configuring-and-managing-RHOSP-with-Ansible

Comment 11 Eric Nothen 2024-09-20 08:34:10 UTC
(In reply to Kenny Tordeurs from comment #9)

> Thanks for confirming, in the content view in Satellite this is correctly
> set but it's the lock that's set by the upgrade that causes this issue.
> 

I don't think the lock is defined by the upgrade. The lock on subscription-manager is either set by the repositories you enable if you use RhsmVars.enabled_repositories, or by the activation key created at satellite if you are using RhsmVars.rhsm_activation_key.

FWIW, this is what I use during FFU with multi-rhel:

~~~
resource_registry:
  OS::TripleO::Services::Rhsm: /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-ansible.yaml
parameter_defaults:
  RhsmVars:
    rhsm_activation_key: "ak-rhosp171-rhel9"
    rhsm_method: "satellite"
    rhsm_org_id: "Keller"
    rhsm_server_hostname: "satellite.keller.lab"
    rhsm_baseurl: "https://satellite.keller.lab/pulp/repos"

  ComputeRHEL8Parameters:
    RhsmVars:
      rhsm_activation_key: "ak-rhosp171-rhel8"
      rhsm_method: "satellite"
      rhsm_org_id: "Keller"
      rhsm_server_hostname: "satellite.keller.lab"
      rhsm_baseurl: "https://satellite.keller.lab/pulp/repos"
~~~

Roles Controller and Compute (both running rhel 9.2 EUS) use the default RhsmVars block on top. The computes that I don't upgrade, I move them to a ComputeRHEL8 role, and so for them the ComputeRHEL8Parameters block applies. I don't have Ceph in that particular environment, but if I had I would add a block like this, in which a different activation key defines the appropriate repositories and release version just for the CephStorage role:

~~~
  CephStorageParameters:
    RhsmVars:
      rhsm_activation_key: "<some Ceph specific AK>"
      rhsm_method: "satellite"
      rhsm_org_id: "Keller"
      rhsm_server_hostname: "satellite.keller.lab"
      rhsm_baseurl: "https://satellite.keller.lab/pulp/repos"
~~~

Comment 12 Eric Nothen 2024-09-20 08:35:42 UTC
Or otherwise explicitly set by RhsmVars.rhsm_release, of course.

Comment 13 Kenny Tordeurs 2024-09-24 07:48:19 UTC
(In reply to Eric Nothen from comment #11)
> (In reply to Kenny Tordeurs from comment #9)
> 
> > Thanks for confirming, in the content view in Satellite this is correctly
> > set but it's the lock that's set by the upgrade that causes this issue.
> > 
> 
> I don't think the lock is defined by the upgrade. The lock on
> subscription-manager is either set by the repositories you enable if you use
> RhsmVars.enabled_repositories, or by the activation key created at satellite
> if you are using RhsmVars.rhsm_activation_key.
> 
> FWIW, this is what I use during FFU with multi-rhel:
> 
> ~~~
> resource_registry:
>   OS::TripleO::Services::Rhsm:
> /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-
> ansible.yaml
> parameter_defaults:
>   RhsmVars:
>     rhsm_activation_key: "ak-rhosp171-rhel9"
>     rhsm_method: "satellite"
>     rhsm_org_id: "Keller"
>     rhsm_server_hostname: "satellite.keller.lab"
>     rhsm_baseurl: "https://satellite.keller.lab/pulp/repos"
> 
>   ComputeRHEL8Parameters:
>     RhsmVars:
>       rhsm_activation_key: "ak-rhosp171-rhel8"
>       rhsm_method: "satellite"
>       rhsm_org_id: "Keller"
>       rhsm_server_hostname: "satellite.keller.lab"
>       rhsm_baseurl: "https://satellite.keller.lab/pulp/repos"
> ~~~
> 
> Roles Controller and Compute (both running rhel 9.2 EUS) use the default
> RhsmVars block on top. The computes that I don't upgrade, I move them to a
> ComputeRHEL8 role, and so for them the ComputeRHEL8Parameters block applies.
> I don't have Ceph in that particular environment, but if I had I would add a
> block like this, in which a different activation key defines the appropriate
> repositories and release version just for the CephStorage role:
> 
> ~~~
>   CephStorageParameters:
>     RhsmVars:
>       rhsm_activation_key: "<some Ceph specific AK>"
>       rhsm_method: "satellite"
>       rhsm_org_id: "Keller"
>       rhsm_server_hostname: "satellite.keller.lab"
>       rhsm_baseurl: "https://satellite.keller.lab/pulp/repos"
> ~~~

Is it possible this code block isn't used when it's doing the leapp upgrade parts as that's where it goes wrong?

For leapp you have these code blocks about the releases and repos:
~~~
LeappRepoInitCommand: |
    subscription-manager repos --disable=*
    subscription-manager repos --enable rhel-8-for-x86_64-baseos-tus-rpms --enable rhel-8-for-x86_64-appstream-tus-rpms --enable openstack-17.1-for-rhel-8-x86_64-rpms
    subscription-manager release --set=8.4
  UpgradeLeappCommandOptions: "--enablerepo=rhel-9-for-x86_64-baseos-eus-rpms --enablerepo=rhel-9-for-x86_64-appstream-eus-rpms --enablerepo=rhel-9-for-x86_64-highavailability-eus-rpms --enablerepo=openstack-17.1-for-rhel-9-x86_64-rpms --enablerepo=fast-datapath-for-rhel-9-x86_64-rpms 
  CephLeappRepoInitCommand: |
    subscription-manager repos --disable=*
    subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms --enable rhel-8-for-x86_64-appstream-rpms --enable openstack-17.1-for-rhel-8-x86_64-rpms 
    subscription-manager release --set=8
  LeappInitCommand: |
    subscription-manager repos --disable=*
    subscription-manager release --unset
    subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
    leapp answer --add --section check_vdo.confirm=True
    leapp answer --add --section check_vdo.no_vdo_devices=True
~~~

And this block:
~~~
UpgradeInitCommand: |
    sudo subscription-manager repos --disable=*
      if $( grep -q  9.2  /etc/os-release )
      then
        sudo subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms 
        sudo podman ps | grep -q ceph && subscription-manager repos --enable=rhceph-5-tools-for-rhel-9-x86_64-rpms
        sudo subscription-manager release --set=9.2
      else
        sudo subscription-manager repos --enable=rhel-8-for-x86_64-baseos-tus-rpms --enable=rhel-8-for-x86_64-appstream-tus-rpms --enable=rhel-8-for-x86_64-highavailability-tus-rpms --enable=openstack-17.1-for-rhel-8-x86_64-rpms --enable=fast-datapath-for-rhel-8-x86_64-rpms 
        sudo podman ps | grep -q ceph && subscription-manager repos --enable=rhceph-5-tools-for-rhel-8-x86_64-rpms
        sudo subscription-manager release --set=8.4
      fi
~~~

Comment 14 Giulio Fidente 2024-11-22 18:16:18 UTC
(In reply to Kenny Tordeurs from comment #13)
> Is it possible this code block isn't used when it's doing the leapp upgrade
> parts as that's where it goes wrong?

thanks Kenny I think your comment #13 might be pointing to the isse; the if/else condition in UpgradeInitCommand is probably overriding with the EUS repos the list from CephLeappRepoInitCommand parameter

Juan, can you ack/nack the above? Is that actually the case?

Comment 15 Juan Badia Payno 2024-11-25 06:12:23 UTC
Yes, this will override the repositories.
The UpgradeInitCommand is executed on the overcloud upgrade run and it switches the repositories.

Comment 19 Juan Badia Payno 2024-12-11 08:50:24 UTC
      - ***UpgradeInitCommand***: Command to initialize the upgrade process     << This is on the openstack overcloud upgrade
      - ***LeappRepoInitCommand***: Command to switch repos and install Leapp  << This is the on the openstack system upgrade
      - ***LeappInitCommand***: Command to get Leapp working                    << This is the on the openstack system upgrade
      - ***UpgradeLeappCommandOptions***: In case or using UpgradeLeappDevelSkip with LEAPP_NO_RHSM=1 user can specify --enablerepo <repo1> --enablerepo <repo2> options for leapp to use these repositories for the upgrade process. << This is the on the openstack system upgrade
      
    ```
    ~~~
     
    The paramater UpgradeInitCommand, LeappRepoInitCommand, UpgradeLeappCommandOptions and LeappInitCommand are used for all the Roles
    The parameters CephStorageUpgradeInitCommand, CephStorageLeappRepoInitCommand, CephStorageUpgradeLeappCommandOptions and CephStorageLeappInitCommand are used in CephStorage role. If the {SPECIFICROLE}{PARAMETER} does not exit the {PARAMETER} value is used.
     
        Default values:
          UpgradeInitCommand: ''
          LeappRepoInitCommand: ''
          LeappInitCommand: ''
          UpgradeLeappCommandOptions: ''
     
    Keep in mind,as an example, If the UpgradeInitCommand is configured but we do not want to use it on CephStorage, we need to set the CephStorageUpgradeInitCommand: ''

    ********
    **NOTE** Not sure about the ceph repositories on RHEL8, also removed the hihgavailability repos on cephstorage repos. I used the repositories and stages that had been already suggested
    ********

    Add this block in upgrades-environment.yaml:
    ~~~
    UpgradeInitCommand: |
        sudo subscription-manager repos --disable=*
          if $( grep -q  9.2  /etc/os-release )
          then
            sudo subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
            sudo podman ps | grep -q ceph && subscription-manager repos --enable=rhceph-5-tools-for-rhel-9-x86_64-rpms
            sudo subscription-manager release --set=9.2
          else
            sudo subscription-manager repos --enable=rhel-8-for-x86_64-baseos-tus-rpms --enable=rhel-8-for-x86_64-appstream-tus-rpms --enable=rhel-8-for-x86_64-highavailability-tus-rpms --enable=openstack-17.1-for-rhel-8-x86_64-rpms --enable=fast-datapath-for-rhel-8-x86_64-rpms
            sudo podman ps | grep -q ceph && subscription-manager repos --enable=rhceph-5-tools-for-rhel-8-x86_64-rpms
            sudo subscription-manager release --set=8.4
          fi
     
          if $(sudo podman ps | grep -q ceph )
          then
            sudo dnf -y install cephadm
          fi
    #Added specific CephStorage paramater if its needed
    CephStorageUpgradeInitCommand: |
        sudo subscription-manager repos --disable=*
          if $( grep -q  9.2  /etc/os-release )
          then
            sudo subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms --enable=rhel-9-for-x86_64-appstream-rpms --enable=openstack-17.1-deployment-tools-for-rhel-9-x86_64-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
            sudo podman ps | grep -q ceph && subscription-manager repos --enable=rhceph-5-tools-for-rhel-9-x86_64-rpms
            sudo subscription-manager release --set=9.2
          else
            sudo subscription-manager repos --enable=rhel-8-for-x86_64-baseos-tus-rpms --enable=rhel-8-for-x86_64-appstream-tus-rpms --enable=rhel-8-for-x86_64-highavailability-tus-rpms --enable=openstack-17.1-for-rhel-8-x86_64-rpms --enable=fast-datapath-for-rhel-8-x86_64-rpms
            sudo podman ps | grep -q ceph && subscription-manager repos --enable=rhceph-5-tools-for-rhel-8-x86_64-rpms
            sudo subscription-manager release --set=8.4
          fi
     
          if $(sudo podman ps | grep -q ceph )
          then
            sudo dnf -y install cephadm
          fi
    ~~~
     
    Add these in the system-upgrade.yaml
    ~~~
      LeappRepoInitCommand: |
        subscription-manager repos --disable=*
        subscription-manager repos --enable rhel-8-for-x86_64-baseos-tus-rpms --enable rhel-8-for-x86_64-appstream-tus-rpms --enable openstack-17.1-for-rhel-8-x86_64-rpms
        subscription-manager release --set=8.4
        
      UpgradeLeappCommandOptions: "--enablerepo=rhel-9-for-x86_64-baseos-eus-rpms --enablerepo=rhel-9-for-x86_64-appstream-eus-rpms --enablerepo=rhel-9-for-x86_64-highavailability-eus-rpms --enablerepo=openstack-17.1-for-rhel-9-x86_64-rpms --enablerepo=fast-datapath-for-rhel-9-x86_64-rpms 
        
      #Added specific CephStorage paramater if its needed
      CephStorageUpgradeLeappCommandOptions: "--enablerepo=rhel-9-for-x86_64-baseos-rpms --enablerepo=rhel-9-for-x86_64-appstream-rpms --enablerepo=openstack-17.1-for-rhel-9-x86_64-rpms --enablerepo=fast-datapath-for-rhel-9-x86_64-rpms 
      LeappInitCommand: |
        subscription-manager repos --disable=*
        subscription-manager release --unset
        subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
        leapp answer --add --section check_vdo.confirm=True
        leapp answer --add --section check_vdo.no_vdo_devices=True
        
      #Added specific CephStorage paramater if its needed
      CephStorageLeappInitCommand: |
        subscription-manager repos --disable=*
        subscription-manager release --unset
        subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms --enable=rhel-9-for-x86_64-appstream-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
        leapp answer --add --section check_vdo.confirm=True
        leapp answer --add --section check_vdo.no_vdo_devices=True
    ~~~