Bug 1554285 - Ansible tasks should support Python 3
Summary: Ansible tasks should support Python 3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Host-Deploy
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.3.0
: ---
Assignee: Ondra Machacek
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks: oVirt_on_Fedora 1575428
TreeView+ depends on / blocked
 
Reported: 2018-03-12 10:27 UTC by Viktor Mihajlovski
Modified: 2018-07-17 12:47 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-07-17 11:50:51 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.3+


Attachments (Terms of Use)

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


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