Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 2116825

Summary: [Cephadm] cephadm-preflight playbook is failing while upgrading Ceph cluster from Ceph 5.2 to Ceph 6.0
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Manisha Saini <msaini>
Component: CephadmAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED ERRATA QA Contact: Manisha Saini <msaini>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0CC: cephqe-warriors, ekristov, gabrioux, kdreyer, vdas
Target Milestone: ---Keywords: TestBlocker
Target Release: 6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cephadm-ansible-2.6.0-1.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-20 18:57:23 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 Manisha Saini 2022-08-09 11:37:24 UTC
Description of problem:
======================

While upgrading CEPH 5.2 to CEPH 6.0, cephadm-preflight.yml  playbook is failing
-
ansible-playbook -i /etc/ansible/hosts /usr/share/cephadm-ansible/cephadm-preflight.yml --extra-vars "ceph_origin=rhcs upgrade_ceph_packages=true"


It is failing as it is trying to enable rhceph-5-tools-for-rhel-8-x86_64-rpms which is not supported on RHEL 9 platform.

I see the RHEL 8 repo is hard-coded in playbook 

=============
name: rhcs related tasks
      when:
ceph_origin == 'rhcs'
      block:
        - name:
enable red hat storage tools repository
         
rhsm_repository:

            name: "rhceph-{{ ceph_rhcs_version
}}-tools-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms"

===============

[cephuser@ceph-mani-el8awi-node1-installer ~]$ ansible-playbook -i /etc/ansible/hosts /usr/share/cephadm-ansible/cephadm-preflight.yml --extra-vars "ceph_origin=rhcs upgrade_ceph_packages=true"
 
PLAY [all] ***********************************************************************************************************************************************************************************************************************************
 
TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************************************
ok: [ceph-mani-el8awi-node4]
ok: [ceph-mani-el8awi-node2]
ok: [ceph-mani-el8awi-node3]
ok: [ceph-mani-el8awi-node1-installer]
 
TASK [fail when ceph_origin is custom with no repository defined] ****************************************************************************************************************************************************************************
skipping: [ceph-mani-el8awi-node2]
skipping: [ceph-mani-el8awi-node3]
skipping: [ceph-mani-el8awi-node1-installer]
skipping: [ceph-mani-el8awi-node4]
 
TASK [enable red hat storage tools repository] ***********************************************************************************************************************************************************************************************
fatal: [ceph-mani-el8awi-node4]: FAILED! => {"changed": false, "msg": "rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID", "results": ["rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID"]}
fatal: [ceph-mani-el8awi-node3]: FAILED! => {"changed": false, "msg": "rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID", "results": ["rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID"]}
fatal: [ceph-mani-el8awi-node2]: FAILED! => {"changed": false, "msg": "rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID", "results": ["rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID"]}
fatal: [ceph-mani-el8awi-node1-installer]: FAILED! => {"changed": false, "msg": "rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID", "results": ["rhceph-5-tools-for-rhel-8-x86_64-rpms is not a valid repository ID"]}
 
PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
ceph-mani-el8awi-node1-installer : ok=1    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0  
ceph-mani-el8awi-node2     : ok=1    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0  
ceph-mani-el8awi-node3     : ok=1    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0  
ceph-mani-el8awi-node4     : ok=1    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0


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


How reproducible:
================
1/1


Steps to Reproduce:
====================
1. Install Ceph 5.2 on RHEL 8.6
2. Upgrade RHEL from RHEL 8.6 to RHEL 9
3. Upgrade Ceph from Ceph 5.2 to Ceph 6.0 using cephadm

   a) Update the cephadm and cephadm-ansible package:
   b) Navigate to the /usr/share/cephadm-ansible/ directory:
   c) Run the preflight playbook with the upgrade_ceph_packages parameter set to true on the bootstrapped host in the storage cluster:


[cephuser@ceph-mani-el8awi-node1-installer ~]$ ansible-playbook -i /etc/ansible/hosts /usr/share/cephadm-ansible/cephadm-preflight.yml --extra-vars "ceph_origin=rhcs upgrade_ceph_packages=true"




Actual results:
-------------------
cephadm-preflight.yml playbook is failing


Expected results:
----------------
cephadm-preflight.yml playbook should pass


Additional info:

Comment 22 errata-xmlrpc 2023-03-20 18:57:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 6.0 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:1360