Bug 1549163

Summary: oVirt.metrics role prevents execution of all following parts of oVirt.host-deploy role
Product: [oVirt] ovirt-engine-metrics Reporter: tm-pi <petr.istenik>
Component: GenericAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: bugs, didi, lveyde, mperina, nicolas, omachace, petr.istenik, sradco
Target Milestone: ovirt-4.2.2Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.1.3.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 10:58:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1514927, 1547711    
Attachments:
Description Flags
ovirt-host-deploy-ansible
none
ovirt-host-deploy none

Description tm-pi 2018-02-26 15:02:21 UTC
Created attachment 1400863 [details]
ovirt-host-deploy-ansible

Description of problem:

When I customizing host deploy process (https://www.ovirt.org/blog/2017/12/host-deploy-customization/) with additional firewalld rule, rule not deployed. host-deploy-post-tasks deployment not visible in ansible host deploy logs.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
setup /etc/ovirt-engine/ansible/ovirt-host-deploy-post-tasks.yml
---
- name: Enable custom firewall port
  firewalld:
    port: "10050/tcp"
    permanent: yes
    immediate: yes
    state: enabled

- name: Print debug information
  debug:
    msg: "My custom tasks was successfully executed!"
2.
Host reinstall from UI


Actual results:
No firewalld rule added on host

Expected results:
firewalld rule added

Additional info:
this is corresponding item from engine.log:
2018-02-26 15:34:47,917+01 INFO  [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (EE-ManagedThreadFactory-engine-Thread-646) [b5ce073f-5dac-4ccc-b8db-6f96da6dce0a] Executing Ansible command:  [/usr/bin/ansible-playbook, -v, --private-key=/etc/pki/ovirt-engine/keys/engine_id_rsa, --inventory=/tmp/ansible-inventory5351283305925319216, --extra-vars=host_deploy_cluster_version=4.2, --extra-vars=host_deploy_cluster_name=Default, --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=FIREWALLD, --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=194.108.1.145, --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-20180226153447-ovnode1.lab.vdi.cz.net-b5ce073f-5dac-4ccc-b8db-6f96da6dce0a.log]

Comment 1 tm-pi 2018-02-26 15:03:41 UTC
Created attachment 1400864 [details]
ovirt-host-deploy

Comment 2 Ondra Machacek 2018-02-27 09:56:38 UTC
Shirly, this:

 https://github.com/oVirt/ovirt-engine-metrics/blob/master/roles/oVirt.ovirt-initial-validations/validate-config-yml/tasks/main.yml#L9

is causing that nothing after metrics will be run. Can you please separate the ovirt-metrics to be a separate play in the host-deploy playbook, if you need to do such calls?

Comment 3 Martin Perina 2018-02-27 11:21:46 UTC
Raising severity to high and marking as a blocker for 4.2.2 as this is a regression to the original ovirt-host-deploy role functionality introduced in 4.2.0

Comment 4 Shirly Radco 2018-02-27 11:26:42 UTC
AFAIU, The meta: end_play only stops the specific play I'm running now.
It does not affect other plays or playbooks.

I even had this bug https://bugzilla.redhat.com/show_bug.cgi?id=1547711
Where the rest of the plays in the playbook continued running even if the validations failed.

Comment 5 Shirly Radco 2018-02-27 11:51:19 UTC
I moved the role so a separate play at the end of the ovirt-host-deploy playbook.

Comment 6 Lukas Svaty 2018-03-20 11:55:39 UTC
verified i novirt-engine-metrics-1.1.3.3-1.el7ev.noarch

Comment 7 Sandro Bonazzola 2018-03-29 10:58:01 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.