Bug 1598185

Summary: [ceph-ansible] - RHEL and Ubuntu CDN based installation failing trying to enable/include mon repository
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: Ceph-AnsibleAssignee: Sébastien Han <shan>
Status: CLOSED ERRATA QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.0CC: aschoen, ceph-eng-bugs, gmeno, hnallurv, nthomas, sankarshan, seb, tserlin, vimishra, vpoliset
Target Milestone: z4Keywords: Regression
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-ansible-3.0.39-1.el7cp Ubuntu: ceph-ansible_3.0.39-2redhat1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-11 18:12:15 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 2018-07-04 14:45:04 UTC
Description of problem:
CDN based installation failing trying to enable mon repository

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

How reproducible:
Always (1/1)

Steps to Reproduce:
1. Follow docs to intialize RHCEPH using CDN repositories

Actual results:
TASK [ceph-common : enable red hat storage monitor repository] *****************************************
task path: /usr/share/ceph-ansible/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml:11
fatal: [-----]: FAILED! => {"msg": "The conditional check 'rhcs_mon_repo.rc != 0' failed. The error was: error while evaluating conditional (rhcs_mon_repo.rc != 0): 'dict object' has no attribute 'rc'\n\nThe error appears to have been in '/usr/share/ceph-ansible/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml': line 11, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: enable red hat storage monitor repository\n  ^ here\n"}


Expected results:
Cluster must be initialized without failures

Additional info:

Comment 6 Yaniv Kaul 2018-07-04 15:29:19 UTC
Is this a regression? Automation blocker?

Comment 7 Harish NV Rao 2018-07-04 15:38:24 UTC
It's a regression and blocks the installation of ceph from CDN.

Comment 8 Vasishta 2018-07-05 07:38:52 UTC
Hi Sebastien, 

Typo in this line -
https://github.com/ceph/ceph-ansible/blob/v3.0.38/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install_debian.yml#L9

causing failure in while executing task "ceph-common : include prerequisite_rhcs_cdn_install_debian.yml"


TASK [ceph-common : include prerequisite_rhcs_cdn_install_debian.yml] 

task path: /usr/share/ceph-ansible/roles/ceph-common/tasks/installs/debian_rhcs_repository.yml:15
fatal: [-----]: FAILED! => {"reason": "Syntax Error while loading YAML.\n\n\nThe error appears to have been in '/usr/share/ceph-ansible/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install_debian.yml': line 9, column 176, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  apt_repository:\n    repo: \"deb {{ ceph_rhcs_cdn_debian_repo }}{{ ceph_rhcs_cdn_debian_repo_version }}/{{ item.repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main\"    state: present\n

I see in master branch that this typo has been fixed, Can you please backport the fix ?

Regards,
Vasishta Shastry
QE, Ceph

Comment 16 errata-xmlrpc 2018-07-11 18:12:15 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/RHSA-2018:2177