RedHatQE / teflo

Teflo is a standalone orchestration software that controls the flow of a set of testing scenarios, allowing users to provision machines, deploy software, execute tests against them and manage generated artifacts and report results.
https://teflo.readthedocs.io/en/latest/
GNU General Public License v3.0
14 stars 16 forks source link

Ansible orchestrate fails with ansible 7.0.0 #264

Closed ryankwilliams closed 1 year ago

ryankwilliams commented 1 year ago

Bug

Teflo is using the ConfigManager class directly from ansible. With the recent ansible 7.0.0 release bringing ansible-core version 2.14.0, when an object is instantiated from this class, it no longer has the data attribute.

Version 2.14.0 ~ https://github.com/ansible/ansible/blob/devel/lib/ansible/config/manager.py

Version 2.13.6 (ansible < 7.0.0) ~ https://github.com/ansible/ansible/blob/b14bbf1c11358da8c1f3fad00f095333102ede1c/lib/ansible/config/manager.py#L290

2022-11-23 13:27:33,560 ERROR 'ConfigManager' object has no attribute 'data'
2022-11-23 13:27:33,561 ERROR A exception was raised while processing task: Install OpenShift method: run
Traceback (most recent call last):
  File "/home/jenkins/agent/workspace/PipelineSimulator/sol-mock-1.0-openshift4.12-stage/envs/solution/lib64/python3.9/site-packages/blaster/blast.py", line 83, in run
    value = getattr(task_obj, method)()
  File "/home/jenkins/agent/workspace/PipelineSimulator/sol-mock-1.0-openshift4.12-stage/envs/solution/lib64/python3.9/site-packages/teflo/tasks/orchestrate.py", line 59, in run
    self.orchestrator.run()
  File "/home/jenkins/agent/workspace/PipelineSimulator/sol-mock-1.0-openshift4.12-stage/envs/solution/lib64/python3.9/site-packages/teflo/orchestrators/action_orchestrator.py", line 61, in run
    res = self.plugin.run()
  File "/home/jenkins/agent/workspace/PipelineSimulator/sol-mock-1.0-openshift4.12-stage/envs/solution/lib64/python3.9/site-packages/teflo/orchestrators/ext/ansible_orchestrator_plugin/ansible_orchestrator_plugin.py", line 216, in run
    self.ans_service.alog_update(folder_name='ansible_orchestrator')
  File "/home/jenkins/agent/workspace/PipelineSimulator/sol-mock-1.0-openshift4.12-stage/envs/solution/lib64/python3.9/site-packages/teflo/ansible_helpers.py", line 576, in alog_update
    ans_logfile = self.ans_log_path if self.ans_log_path else self.get_default_config(key="DEFAULT_LOG_PATH")
  File "/home/jenkins/agent/workspace/PipelineSimulator/sol-mock-1.0-openshift4.12-stage/envs/solution/lib64/python3.9/site-packages/teflo/ansible_helpers.py", line 532, in get_default_config
    a_settings = acm.data.get_settings()

Should be fixed together with #263

dno-github commented 1 year ago

Jira ticket CCITCARBON-489 has been created for this issue. Url : https://issues.redhat.com/browse/CCITCARBON-489