Bug 1540260 - ovirt metrics enabled gluster deployment playbooks
Summary: ovirt metrics enabled gluster deployment playbooks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-metrics
Classification: oVirt
Component: Generic
Version: unspecified
Hardware: All
OS: All
urgent
urgent
Target Milestone: ovirt-4.2.2
: ---
Assignee: Shirly Radco
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks: 1540261
TreeView+ depends on / blocked
 
Reported: 2018-01-30 16:03 UTC by Lukas Svaty
Modified: 2018-03-29 11:17 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-metrics-1.1.3.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-29 11:17:12 UTC
oVirt Team: Metrics
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 88323 0 'None' MERGED gluster: Fixed check for bool ansible variables 2020-02-07 21:35:31 UTC
oVirt gerrit 88437 0 'None' ABANDONED ansible: update ovirt metrics config.yml 2020-02-07 21:35:31 UTC
oVirt gerrit 88455 0 'None' MERGED gluster: Fixed check for bool ansible variables 2020-02-07 21:35:31 UTC

Description Lukas Svaty 2018-01-30 16:03:26 UTC
Description of problem:
if config.yaml of ovirt-metrics is present on host deployment gluster playbooks are being run. I suspect we are changing types of hosts facts from bool to str, thus when condition on gluster roles passes as true with string "false"

Version-Release number of selected component (if applicable):
ovirt-engine-metrics-1.1.2.2-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Set up metrics (config.yml)
2. Create cluster with Gluster service disabled
3. Add host to this cluster

Actual results:
Host deployment fails becuase of missing repositories for gluster on hosts. Host gluster ansible playbooks are being triggered.

Expected results:
Metrics should not affect host facts for other playbooks.

Additional info:
this can be checked in ovirt-engine/playbooks/ovirt-host-deploy.yml
line7:      
when: host_deploy_virt_enabled and host_deploy_gluster_enabled

while retyping the variable to bool works

when: host_deploy_virt_enabled |bool and host_deploy_gluster_enabled | bool passes the var correctly

This is a dirty fix though and we need to ensure oVirt-metrics playbooks are not modifying type of host facts.

Comment 1 Shirly Radco 2018-02-27 16:39:09 UTC
Please attach the ovirt-host-deploy-ansible log file.

Comment 2 Lukas Svaty 2018-02-28 11:20:51 UTC
Shirly can you please specify what are you looking for in deploy log? I believe there is no additional information there. I would recommend trying to reproduce this.

Running deployment playbook:
2018-02-28 12:10:53,251+01 INFO  [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (EE-ManagedThreadFactory-engine-Thread-14) [1ba50bd6] Executing Ansible command:  [/usr/bin/ansible-playbook, -v, --private-key=/etc/pki/ovirt-engine/keys/engine_id_rsa, --inventory=/tmp/ansible-inventory2784335582542152903, --extra-vars=host_deploy_cluster_version=4.1, --extra-vars=host_deploy_cluster_name=CL41, --extra-vars=host_deploy_gluster_enabled=false, --extra-vars=host_deploy_virt_enabled=true, --extra-vars=host_deploy_vdsm_port=54321, --extra-vars=host_deploy_override_firewall=true, --extra-vars=host_deploy_firewall_type=IPTABLES, --extra-vars=ansible_port=22, --extra-vars=host_deploy_post_tasks=/etc/ovirt-engine/ansible/ovirt-host-deploy-post-tasks.yml, --extra-vars=host_deploy_ovn_tunneling_interface=1.1.1.1, --extra-vars=host_deploy_ovn_central=null, /usr/share/ovirt-engine/playbooks/ovirt-host-deploy.yml] [Logfile: /var/log/ovirt-engine/host-deploy/ovirt-host-deploy-ansible-20180228121053-1.1.1.1-1ba50bd6.log]

See... vars=host_deploy_gluster_enabled=false
However gluster playbooks are being run

Looking into /usr/share/ovirt-engine/playbooks/ovirt-host-deploy.yml:
- hosts: all
  remote_user: root

  roles:
    - role: ovirt-host-deploy
    - role: hc-gluster-cgroups
      when: host_deploy_virt_enabled and host_deploy_gluster_enabled
                                          ^^ This should be False
... output omitted...

However, if metrics playbook were running on the host it's "False" instead of False.. thus string "False" in condition is True

Inside host deploy log you will see only deployment playbook, metrics playbook and afterwards gluster playbook, nothing unusual.

Comment 3 Lukas Svaty 2018-03-20 11:24:40 UTC
verified in ovirt-engine-metrics-1.1.3.3-1.el7ev.noarch

Comment 4 Sandro Bonazzola 2018-03-29 11:17:12 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.