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:
Wrong component, ceph-metrics ansible role is not part of ceph-ansible, assigning this to Zack too.
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).
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