Bug 1759917

Summary: External ceph attempts to setup a dashboard(grafana) and fails
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Attila Fazekas <afazekas>
Component: Ceph-AnsibleAssignee: Dimitri Savineau <dsavinea>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: urgent Docs Contact:
Priority: high    
Version: 4.0CC: aschoen, ceph-eng-bugs, ceph-qe-bugs, dsavinea, fpantano, gabrioux, gfidente, gmeno, nthomas, shdunne, tchandra, tserlin, ykaul, yrabl
Target Milestone: rc   
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-4.0.2-1.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-31 12:47:11 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:
Bug Depends On:    
Bug Blocks: 1594251    
Attachments:
Description Flags
ceph_ansible_run_log.tar
none
inventory.yml none

Description Attila Fazekas 2019-10-09 12:15:46 UTC
The usual external ceph config, started to attempt touching(setting up) 
ceph dashboard.

The External ceph-mon addresses was given, via tripleo templates,
however I have doubts about we need to setup a dashboard in case of an externally managed ceph.

        "TASK [Gathering Facts] *********************************************************",
        "task path: /usr/share/ceph-ansible/infrastructure-playbooks/dashboard.yml:2",
        "Tuesday 08 October 2019  20:13:03 +0000 (0:00:00.369)       0:02:50.993 ******* ",
        "skipping: [undercloud] => changed=false ",
        "TASK [set ceph node exporter install 'In Progress'] ****************************",
        "task path: /usr/share/ceph-ansible/infrastructure-playbooks/dashboard.yml:5",
        "Tuesday 08 October 2019  20:13:04 +0000 (0:00:00.344)       0:02:51.338 ******* ",
        "Tuesday 08 October 2019  20:13:04 +0000 (0:00:00.072)       0:02:51.411 ******* ",
        "Tuesday 08 October 2019  20:13:04 +0000 (0:00:00.351)       0:02:51.763 ******* ",
        "TASK [ceph-node-exporter : include setup_container.yml] ************************",
        "task path: /usr/share/ceph-ansible/roles/ceph-node-exporter/tasks/main.yml:2",
        "Tuesday 08 October 2019  20:13:05 +0000 (0:00:00.376)       0:02:52.139 ******* ",
        "TASK [set ceph node exporter install 'Complete'] *******************************",
        "task path: /usr/share/ceph-ansible/infrastructure-playbooks/dashboard.yml:27",
        "Tuesday 08 October 2019  20:13:05 +0000 (0:00:00.372)       0:02:52.512 ******* ",
        "PLAY [grafana-server] **********************************************************",
        "ERROR! The field 'hosts' has an invalid value, which includes an undefined variable. The error was: 'dict object' has no attribute 'mons'",
        "The error appears to be in '/usr/share/ceph-ansible/infrastructure-playbooks/dashboard.yml': line 70, column 3, but may",
        "be elsewhere in the file depending on the exact syntax problem.",
        "The offending line appears to be:",
        "- hosts: \"{{ groups[mgr_group_name] | default(groups[mon_group_name]) }}\"",
        "  ^ here",
        "We could be wrong, but this one looks like it might be an issue with",
        "missing quotes. Always quote template expression brackets when they",
        "start a value. For instance:",
        "    with_items:",
        "      - {{ foo }}",
        "Should be written as:",
        "      - \"{{ foo }}\""
    ]
}
 

Not working version:
ceph-ansible.noarch                           4.0.0-0.1.rc16.el8cp                               @rhelosp-ceph-4-tools    

openstack-tripleo-common.noarch               11.2.1-0.20191004164247.23614b4.el8ost             @rhelosp-16.0            

Working version:
ceph-ansible.noarch                           4.0.0-0.1.rc9.el8cp                                @rhelosp-ceph-4-tools  
             
openstack-tripleo-common.noarch               11.2.1-0.20190927173440.713d34f.el8ost             @rhelosp-16.0                       


Did not find any template changes recommendation in the tripleo docs/examples .

Comment 2 Giulio Fidente 2019-10-09 12:29:18 UTC
this happens despite dashboard_enabled set to false in group_vars/all.yml

Comment 3 Giulio Fidente 2019-10-09 12:56:48 UTC
Created attachment 1623809 [details]
ceph_ansible_run_log.tar

Comment 4 Giulio Fidente 2019-10-09 12:57:31 UTC
Created attachment 1623810 [details]
inventory.yml

Comment 5 Giulio Fidente 2019-10-09 12:58:54 UTC
Comment on attachment 1623809 [details]
ceph_ansible_run_log.tar

the .tar attachment includes group_vars as well

Comment 10 Yogev Rabl 2019-11-21 16:43:03 UTC
verified on ceph-ansible-4.0.4-1.el8cp.noarch

Comment 12 errata-xmlrpc 2020-01-31 12:47:11 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-2020:0312