Bug 1487082
Summary: | [ovirt-ansible-roles] Ansible caching ovirt-ansible-modules so sometimes they are not loaded from role's library | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Petr Kubica <pkubica> | |
Component: | ovirt-ansible-roles | Assignee: | Ondra Machacek <omachace> | |
Status: | CLOSED DEFERRED | QA Contact: | Petr Kubica <pkubica> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 4.1.5 | CC: | lsvaty, mperina, pkubica | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1487113 (view as bug list) | Environment: | ||
Last Closed: | 2019-01-14 08:36:22 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: | 1462821, 1487113 | |||
Bug Blocks: |
Description
Petr Kubica
2017-08-31 08:36:16 UTC
Can you add extra information on which modules are being used for what roles (Galaxy/included in RPM) and specific use-case where this is a problem? Introduction: - Ansible uses modules merged in version 2.3.1.0-3 location of these modules: [1] /usr/lib/python2.7/site-packages/ansible/modules/cloud/ovirt/ in the ansible package - When user use oVirt Ansible module Ansible will take the module from [1]. Roles may have own modules specified in their folder called library example location: [2] /usr/share/ansible/roles/ovirt-cluster-upgrade/library/ from ovirt-ansible rpm - so for example in ovirt-cluster-upgrade role we have in [2] modules ( ovirt_clusters.py ovirt_hosts.py... and others) which is different than in [1] (fixed some bugs in modules until they will be merged into Ansible) The problem is: When user will use: - oVirt Ansible role which doesn't have fixed modules in library folder and then he will use oVirt Ansible role that have fixed modules in library folder => second role will use some modules from [1] (first role will use modules A,B,C second role needs modules A,C,D specified in library folder so second role now will use A,C from [1] and D from [2]) - users own created playbook that use some oVirt Ansible modules from Ansible and then he run oVirt Ansible role => ansible will cache modules from [1] and the next role will use cached modules (same as before) - directly oVirt Ansible module and after that he will use oVirt Ansible role => every module used before will be cached and after it will be ignored in oVirt Ansible role Conclusion: using older module from [1] (directly or in any role) before oVirt Ansible role which has these modules fixed in library folder [2] may result into different and unpredictable behavior worst scenario: ignored all modules in all library folders [2] (all modules are cached from [1]) - affected RPM and Galaxy as well. example problem (there are many cases): - using module ovirt_hosts (directly or in ovirt-infra role...etc), have a host in maintenance, upgrade hosts with status [Maintenance] ([Maintenance, UP]..) via role ovirt-cluster-upgrade - role will freeze on maintenance hosts => ovirt-cluster-upgrade should use module ovirt_hosts.py from [2] but it will use module from [1]) Closing as the issue is in Ansible itself and it will most probably be fixed once Ansible as a platform will switch to ansible-collections |