Bug 1519835

Summary: [ceph-ansible] - RHEL - rhceph-3 cdn repos needs to be enabled instead of rhceph-2
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: Ceph-AnsibleAssignee: Sébastien Han <shan>
Status: CLOSED ERRATA QA Contact: Sidhant Agrawal <sagrawal>
Severity: medium Docs Contact:
Priority: high    
Version: 3.0CC: adeza, aschoen, asriram, ceph-eng-bugs, gmeno, hnallurv, jbrier, kdreyer, nthomas, rperiyas, sankarshan, shan, vashastr
Target Milestone: rc   
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-ansible-3.1.0-0.1.rc17.el7cp Ubuntu: ceph-ansible_3.1.0~rc17-2redhat1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-26 18:16:43 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 Vasishta 2017-12-01 14:26:40 UTC
Description of problem: 

**** Applies only for RHCEPH on RHEL ****

Currently ceph-ansible is enabling rhceph-2 repos by default which is creating confusion and might result in failure of playbook for users who are having subscription only of rhceph-3 while initializing cluster. 

This is also resulting in dry run of rolling_update (playbook completes run without any failures but cluster will not be updated).

Version-Release number of selected component (if applicable):
ceph-ansible-3.0.14-1.el7cp.noarch

How reproducible:
Always

Steps to Reproduce:
1. Follow doc to initialize a cluster / update a cluster from 2.x to 3.0
2. Run playbook.


Actual results:
Installation - Causing confusion and might result in error for new users
Rolling_update - Cluster is not geting updated

Expected results:
Installation - Must complete without any failures or confusion
Rolling_update - Cluster must get updated successfully 

Additional info:

We tried a workaround of setting ceph_rhcs_version in all.yml to 3 which worked fine.
This workaround needs to be added in both installation section (Step 5 Section 3.2) and upgrade section (subsection 'Procedure' Section 4) of Installation Guide

Comment 5 Vasishta 2017-12-04 15:39:42 UTC
Hi Erin, 

Doc change working good, Thanks.

Regards,
Vasishta

Comment 8 Sébastien Han 2018-05-04 23:40:59 UTC
I can easily bump the version to 3 for 3.1 but I guess the right fix is to detect which subscription the customer has. How can we do that?

Comment 9 Vasishta 2018-05-07 03:07:09 UTC
Hi Sebastien,

I had filed BZ with a naive idea that ceph-ansible could be able to enable right set of repos for RHCEPH 2.x so it could be done to RHCEPH 3.x customers also.

Though I couldn't come up with a apt solution to detect subscription, with my minimum knowledge I could think of asking customer to set ceph_rhcs_version with apt value based on his subscription.

Please correct me if I'm wrong, I think the current fix in PR 2563 would affect 2.x customer if we are providing latest ceph-ansible to 2.x customer if we have any further 2.x releases.

Another solution I could think of was, If a customer has only one of the RHCEPH(2.x or 3.x) subscription, we could try enabling 2.x first, if it fails, we can enable 3.x. Anyway, I can speculate the confusion that would be created if a customer has both subscription.

I request anyone in CC list to provide their views on this.

Please feel free to correct me if I'm wrong anywhere in this comment.

Regards,
Vasishta Shastry
AQE, Ceph

Comment 10 Sébastien Han 2018-05-09 17:27:28 UTC
Do you have a system on RHEL that I could play with?
I'd like to try something subscription-manager command to see how we can detect the available subscription.

Also, your comments are valid, I know the patch is not ideal and needs rework, I mostly pushed it this way so I can keep track of it.

Thanks.

Comment 11 Sébastien Han 2018-05-18 12:04:07 UTC
Thanks for providing the machine, unfortunately, I could find a proper way to auto-detect customer's subscription.

Perhaps, could we use the SKU to differentiate the subscriptions?
Right now, we don't have a way to solve this BZ.

As a workaround, the current doc to encourage people to specify their repo number via the ceph_rhcs_version variable is fine.

Ken, any idea to solve this BZ?
Thanks.

Comment 12 Ken Dreyer (Red Hat) 2018-05-23 20:57:47 UTC
The SKUs contain all supported RHCS versions. In other words, all SKUs that have the RHCS product will have both product versions available as repositories in subscription-manager:

rhel-7-server-rhceph-2-*-rpms
rhel-7-server-rhceph-3-*-rpms

Vasishta, is there any other "first step" that a customer does to choose RH Ceph Storage 2 versus 3 that we could use here?

Comment 13 Vasishta 2018-05-24 03:52:17 UTC
Hi Ken,

The first difference I could find is to enable respective (2/3) tools repo to install ceph-ansible. 

( At present both 2.x and 3.x doc contains steps to enable all the repos, I'll file a doc BZ to remove steps to enable mon/osd/tools repo on various nodes as they are redundant)

Regards,
Vasishta Shatsry
AQE, Ceph

Comment 14 Ken Dreyer (Red Hat) 2018-05-25 18:38:16 UTC
Good call Vasishta. In theory ceph-ansible could automatically detect which Yum repository is enabled on a host:

rhel-7-server-rhceph-2-tools-rpms or
rhel-7-server-rhceph-3-tools-rpms

... and then choose the product version based on that.

Comment 18 Sébastien Han 2018-08-06 13:47:49 UTC
Did you use rhcs.yml?

Comment 19 Sébastien Han 2018-08-06 13:48:51 UTC
Please ignore my previous comment.
Typically, the package will give you a all.yml file which has "ceph_rhcs_version: 3", so you should use it.

Comment 20 Sidhant Agrawal 2018-08-08 12:25:32 UTC
Version:
ceph-ansible-3.1.0-0.1.rc12.el7cp.noarch

In the latest package, the all.yml.sample file contains following line:
#ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(2) }}"

Comment 21 Sébastien Han 2018-08-08 13:53:14 UTC
Ok found the issue, PR upstream.

Comment 22 Ken Dreyer (Red Hat) 2018-08-09 21:15:26 UTC
"Resync rhcs_edits.txt" is in v3.1.0rc14 upstream.

Comment 27 Sébastien Han 2018-09-05 08:35:11 UTC
Indeed, if deploying rhcs 3 then setting ceph_rhcs_version: 3 is not necessary since it's already the default.

Comment 29 Ramakrishnan Periyasamy 2018-09-18 04:35:17 UTC
Moving this bug to verified state.

Verified in ceph-ansible version: ceph-ansible-3.1.3-1.el7cp.noarch


in all.yml: ceph_rhcs_version: 3

Playbook installed version 3 based cluster using satellite.

Comment 33 errata-xmlrpc 2018-09-26 18:16:43 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, 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-2018:2819