Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use Jira Cloud for all bug tracking management.

Bug 1497198

Summary: cephmetrics-ansible ceph-grafana PyYAML
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Lubos Trilety <ltrilety>
Component: Ceph-MetricsAssignee: Zack Cerza <zcerza>
Status: CLOSED ERRATA QA Contact: Lubos Trilety <ltrilety>
Severity: urgent Docs Contact:
Priority: high    
Version: 3.0CC: anharris, bancinco, branto, ceph-eng-bugs, kdreyer, ltrilety, zcerza
Target Milestone: rc   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cephmetrics-1.0-4.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-05 23:46:00 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 Lubos Trilety 2017-09-29 12:58:37 UTC
Description of problem:
cephmetrics-ansible playbook.yml needs package pyYAML to be installed for task 'TASK [ceph-grafana : Push dashboards to Grafana]', however the playbook never checks if it is so and install the package if required.


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

How reproducible:
100%

Steps to Reproduce:
1. Don't install PyYAML on ceph-grafana machine, if it's already installed remove it from the machine
2. Run cepmetrics-ansible playbook playbook.yml
3.

Actual results:
The playbook fails on task 'TASK [ceph-grafana : Push dashboards to Grafana]' with following error:
"ImportError: No module named yaml"


Expected results:
Playbook installs PyYAML on the machine before the task 'TASK [ceph-grafana : Push dashboards to Grafana]' is run.

Additional info:

Comment 1 Lubos Trilety 2017-10-04 13:34:16 UTC
*** Bug 1497199 has been marked as a duplicate of this bug. ***

Comment 2 Zack Cerza 2017-10-04 21:40:54 UTC
Confused about this:

$ rpm -q ansible
ansible-2.2.3.0-1.el7.noarch
$ rpm -q --requires ansible | grep -i yaml
PyYAML

Comment 3 Lubos Trilety 2017-10-05 06:24:04 UTC
(In reply to Zack Cerza from comment #2)
> Confused about this:
> 
> $ rpm -q ansible
> ansible-2.2.3.0-1.el7.noarch
> $ rpm -q --requires ansible | grep -i yaml
> PyYAML

On ceph-grafana machine doesn't have to be ansible package, so it doesn't matter that ansible package requires PyYAML.

Comment 4 Zack Cerza 2017-10-10 22:18:47 UTC
I guess we should make cephmetrics-grafana depend on PyYAML then

Comment 5 Lubos Trilety 2017-10-11 09:02:34 UTC
(In reply to Lubos Trilety from comment #3)
> (In reply to Zack Cerza from comment #2)
> > Confused about this:
> > 
> > $ rpm -q ansible
> > ansible-2.2.3.0-1.el7.noarch
> > $ rpm -q --requires ansible | grep -i yaml
> > PyYAML
> 
> On ceph-grafana machine doesn't have to be ansible package, so it doesn't
> matter that ansible package requires PyYAML.

I am sorry, I check grafana machine and ansible is installed there after all. And because I am not aware of installing it manually, it has to be installed during cephmetrics installation.
However I am not sure exactly when the package was installed and I am pretty sure that I hit the issue of the installation complaining about missing PyYAML. Moreover it's not just me who have the same problem. Anyway maybe some reorganizing of the playbook could be enough.

Comment 6 Zack Cerza 2017-10-11 16:35:56 UTC
PR filed: https://github.com/ceph/cephmetrics/pull/143

Comment 7 Zack Cerza 2017-10-11 19:44:32 UTC
PR is merged

Comment 10 Lubos Trilety 2017-10-24 09:55:04 UTC
Tested on:
cephmetrics-ansible-1.0-6.el7cp.x86_64

Installation run successfully.

Comment 13 errata-xmlrpc 2017-12-05 23:46:00 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-2017:3387