Bug 1608863

Summary: [cephmetrics] Cephmetrics ansible playbook fails for user define cluster name
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Pratik Surve <prsurve>
Component: Ceph-MetricsAssignee: Boris Ranto <branto>
Status: CLOSED ERRATA QA Contact: Pratik Surve <prsurve>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1CC: aschoen, branto, ceph-eng-bugs, gmeno, hnallurv, kdreyer, nthomas, sankarshan, seb, tserlin
Target Milestone: rc   
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cephmetrics-2.0-4.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-26 18:23: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 Pratik Surve 2018-07-26 12:00:16 UTC
Description of problem:
Cephmetrics ansible playbook fails for user define cluster name

Version-Release number of selected component (if applicable):
cephmetrics-ansible-2.0-3.el7cp.x86_64

How reproducible:
always

Steps to Reproduce:
1.setup ceph cluster with user define cluster name
2.run cephmetrics playbook 
3.

Actual results:
TASK [ceph-mgr : Enable mgr prometheus module] ********************************************************************************************************************************************************************
task path: /usr/share/cephmetrics-ansible/roles/ceph-mgr/tasks/main.yml:27
fatal: [magna006]: FAILED! => {"changed": true, "cmd": ["ceph", "mgr", "module", "enable", "prometheus"], "delta": "0:00:00.104890", "end": "2018-07-26 11:51:17.279199", "msg": "non-zero return code", "rc": 1, "start": "2018-07-26 11:51:17.174309", "stderr": "2018-07-26 11:51:17.271191 7f3d89d45700 -1 Errors while parsing config file!\n2018-07-26 11:51:17.271196 7f3d89d45700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory\n2018-07-26 11:51:17.271197 7f3d89d45700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory\n2018-07-26 11:51:17.271197 7f3d89d45700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory\nError initializing cluster client: ObjectNotFound('error calling conf_read_file',)", "stderr_lines": ["2018-07-26 11:51:17.271191 7f3d89d45700 -1 Errors while parsing config file!", "2018-07-26 11:51:17.271196 7f3d89d45700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory", "2018-07-26 11:51:17.271197 7f3d89d45700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory", "2018-07-26 11:51:17.271197 7f3d89d45700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory", "Error initializing cluster client: ObjectNotFound('error calling conf_read_file',)"], "stdout": "", "stdout_lines": []}
fatal: [magna036]: FAILED! => {"changed": true, "cmd": ["ceph", "mgr", "module", "enable", "prometheus"], "delta": "0:00:00.101067", "end": "2018-07-26 11:51:17.278683", "msg": "non-zero return code", "rc": 1, "start": "2018-07-26 11:51:17.177616", "stderr": "2018-07-26 11:51:17.271039 7f1067320700 -1 Errors while parsing config file!\n2018-07-26 11:51:17.271043 7f1067320700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory\n2018-07-26 11:51:17.271044 7f1067320700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory\n2018-07-26 11:51:17.271044 7f1067320700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory\nError initializing cluster client: ObjectNotFound('error calling conf_read_file',)", "stderr_lines": ["2018-07-26 11:51:17.271039 7f1067320700 -1 Errors while parsing config file!", "2018-07-26 11:51:17.271043 7f1067320700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory", "2018-07-26 11:51:17.271044 7f1067320700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory", "2018-07-26 11:51:17.271044 7f1067320700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory", "Error initializing cluster client: ObjectNotFound('error calling conf_read_file',)"], "stdout": "", "stdout_lines": []}
fatal: [magna044]: FAILED! => {"changed": true, "cmd": ["ceph", "mgr", "module", "enable", "prometheus"], "delta": "0:00:00.100986", "end": "2018-07-26 11:51:17.295608", "msg": "non-zero return code", "rc": 1, "start": "2018-07-26 11:51:17.194622", "stderr": "2018-07-26 11:51:17.287709 7f7825cff700 -1 Errors while parsing config file!\n2018-07-26 11:51:17.287714 7f7825cff700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory\n2018-07-26 11:51:17.287714 7f7825cff700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory\n2018-07-26 11:51:17.287715 7f7825cff700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory\nError initializing cluster client: ObjectNotFound('error calling conf_read_file',)", "stderr_lines": ["2018-07-26 11:51:17.287709 7f7825cff700 -1 Errors while parsing config file!", "2018-07-26 11:51:17.287714 7f7825cff700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory", "2018-07-26 11:51:17.287714 7f7825cff700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory", "2018-07-26 11:51:17.287715 7f7825cff700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory", "Error initializing cluster client: ObjectNotFound('error calling conf_read_file',)"], "stdout": "", "stdout_lines": []}


Expected results:
The playbook should complete successfully without failures.

Additional info:

Comment 3 seb 2018-07-26 15:55:05 UTC
Wrong component, ceph-metrics ansible role is not part of ceph-ansible, assigning this to Zack too.

Comment 4 Boris Ranto 2018-07-27 23:52:34 UTC
This should fix the issue:

https://github.com/ceph/cephmetrics/pull/210

Please note that you will need to set the name in the group_vars/all.yml file (there is a helper for that in the all.yml.sample file).

Comment 11 errata-xmlrpc 2018-09-26 18:23: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