Bug 1554285

Summary: Ansible tasks should support Python 3
Product: [oVirt] ovirt-engine Reporter: Viktor Mihajlovski <mihajlov>
Component: Host-DeployAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, didi, gzaidman, michal.skrivanek, mperina, pasik, yturgema
Target Milestone: ovirt-4.3.0Flags: rule-engine: ovirt-4.3+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-17 11:50:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1460625, 1575428    

Description Viktor Mihajlovski 2018-03-12 10:27:33 UTC
Description of problem:
Currently, host-deploy ansible tasks are running on Python 2 even with Fedora 27. This can lead to failures. On example being the python support for firewalld, which comes as Python 3 module by default and requires that the Python 2 support is installed as well. While this specific issue can be fixed by adding the respective package requirement to the ovirt-host RPM, future problems are likely to occur, as Fedora moves along.

How reproducible:
Add a minimally installed F27 host to a cluster and install it using ovirt-engine.

Actual results:
Host deployment fails in the ansible task ovirt-host-deploy-firewalld.

Expected results:
Should be able to add a F27 host in all cases.

Comment 1 Martin Perina 2018-05-07 07:46:23 UTC
Why this is open on oVirt? We don't specify which python version Ansible is using. Shouldn't this bug be closed and shouldn't github issue on ansible project be created to track Python 3 requirement? Or am I missing something?

Comment 2 Martin Perina 2018-05-07 08:03:18 UTC
Ahh, OK, now I see that ovirt-host package depends on python-firewall package which was removed in FC28. So for FC28 we need to switch our dependency to python3-firewall instead.

Comment 3 Gal Zaidman 2018-07-17 11:50:51 UTC
The bug was fixed in these two patches:
https://gerrit.ovirt.org/#/c/88786/
https://gerrit.ovirt.org/#/c/91912/

Comment 4 Gal Zaidman 2018-07-17 11:51:17 UTC
The bug was fixed in these two patches:
https://gerrit.ovirt.org/#/c/88786/
https://gerrit.ovirt.org/#/c/91912/

Comment 5 Gal Zaidman 2018-07-17 12:05:21 UTC
The bug was fixed in these two patches:
https://gerrit.ovirt.org/#/c/88786/
https://gerrit.ovirt.org/#/c/91912/

Comment 6 Yuval Turgeman 2018-07-17 12:47:56 UTC
Small notes -

1. python-firewall was dropped from fc28 so adding it as a requirement to ovirt-host will break ovirt-host (and ovirt-node-ng) on fc28.

2. Requiring python3-firewall is not good enough also, because if we'd like to use this module, we need to run ovirt-host-deploy with ansible_python_interpreter set to python3

For more details please read:
https://github.com/ansible/ansible/blob/b6e9df20653e768c47e63599be90d3f1e49c0c78/lib/ansible/modules/system/firewalld.py#L78