Bug 1731919

Summary: [cephmetrics-ansible] - containerized cluster - playbook fails at formulating container name
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: Ceph-MetricsAssignee: Zack Cerza <zcerza>
Status: CLOSED ERRATA QA Contact: Uday kurundwade <ukurundw>
Severity: high Docs Contact: Erin Donnelly <edonnell>
Priority: medium    
Version: 3.3CC: aschoen, assingh, branto, ceph-eng-bugs, edonnell, elicohen, flucifre, gael_rehault, gmeno, gprocunier, gsitlani, hgurav, kholtz, nthomas, tchandra, tpetr, tserlin, ukurundw
Target Milestone: z1   
Target Release: 3.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cephmetrics-2.0.8-1.el7cp Doc Type: Bug Fix
Doc Text:
.The dashboard can now be configured in a containerized cluster Previously, in a containerized Ceph environment, the {product} dashboard failed because the `cephmetric-ansible` playbook failed to populate the container name. With this update, the playbook populates the container name, and the dashboard can be configured as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 13:29:03 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: 1726135    
Attachments:
Description Flags
File contains playbook log, inventory file none

Description Vasishta 2019-07-22 12:00:37 UTC
Created attachment 1592578 [details]
File contains playbook log, inventory file

Description of problem:
While configuring dashboard for containerized RHCS, playbook.yml failed at task "Prefix the mgr command with a docker command" 

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

How reproducible:
Always(1/1)

Steps to Reproduce:
1. Follow doc to configuring dashboard for containerized RHCEPH
2. obsering while running playbook.yml

Actual results:
fatal: [magna094]: FAILED! => {"msg": "The conditional check 'container_name' failed. The error was: error while evaluating conditional (container_name): Unable to look up a name or access an attribute in template string ({% if ceph-mgr-magna094 %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': unsupported operand type(s) for -: 'StrictUndefined' and 'StrictUndefined'\n\nThe error appears to have been in '/usr/share/cephmetrics-ansible/roles/ceph-mgr/tasks/main.yml': line 26, 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: Prefix the mgr command with a docker command\n  ^ here\n"}

Expected results:
Dashboard must get configured

Additional info:

Comment 1 Giridhar Ramaraju 2019-08-05 13:06:13 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 2 Giridhar Ramaraju 2019-08-05 13:08:55 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 6 Gael Rehault 2019-08-26 21:47:40 UTC
Also seeing this with cephmetrics-ansible-2.0.6-1.el7cp.x86_64

Comment 7 Federico Lucifredi 2019-08-27 22:16:08 UTC
PM priority for first Z.

Comment 11 Greg Procunier 2019-09-14 02:56:23 UTC
In /usr/share/cephmetrics-ansible/roles/ceph-mgr/tasks/main.yml

--- /dev/null   2019-09-13 22:54:02.546515868 -0400
+++ main.yml    2019-09-13 19:24:46.103138556 -0400
@@ -26,7 +26,7 @@
 - name: Prefix the mgr command with a docker command
   set_fact:
     mgr_prefix: "docker exec {{ container_name }}"
-  when: container_name
+  when: container_name is defined
 
 - name: Enable mgr prometheus module
   command: "{{ mgr_prefix|default('') }} ceph --cluster {{ cluster_name }} mgr module enable prometheus"

Comment 14 Uday kurundwade 2019-09-20 08:52:03 UTC
Hi,

In cephmetrics-ansible-2.0.8-1.el7cp.x86_64, I can able to deploy dashboard in container environment.

Moving BZ to verified state.

Thanks

Comment 18 errata-xmlrpc 2019-10-22 13:29:03 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-2019:3173