❯ teflo run -t provision -t execute -s scenario.yml
--------------------------------------------------
Teflo Framework v1.1.0
Copyright (C) 2020, Red Hat, Inc.
--------------------------------------------------
2021-05-10 08:23:14,109 WARNING Scenario workspace was not set, therefore the workspace is automatically assigned to the current working directory. You may experience problems if files needed by teflo do not exists in the scenario workspace.
2021-05-10 08:23:14,189 INFO
2021-05-10 08:23:14,189 INFO TEFLO RUN (START)
2021-05-10 08:23:14,190 INFO -------------------------------------------------------------------------------
2021-05-10 08:23:14,190 INFO * Data Folder : .teflo/ud41ik0pfi
2021-05-10 08:23:14,190 INFO * Workspace : /home/bpratt/pit/teflo-inventory-gen-reproduction
2021-05-10 08:23:14,191 INFO * Log Level : info
2021-05-10 08:23:14,191 INFO * Tasks : ['provision', 'execute']
2021-05-10 08:23:14,191 INFO * Scenario : provision_bug
2021-05-10 08:23:14,192 INFO -------------------------------------------------------------------------------
2021-05-10 08:23:14,192 INFO * Task : provision
2021-05-10 08:23:14,192 INFO Sending out any notifications that are registered.
2021-05-10 08:23:14,193 INFO ..................................................
2021-05-10 08:23:14,194 INFO Starting tasks on pipeline: notify
2021-05-10 08:23:14,194 WARNING ... no tasks to be executed ...
2021-05-10 08:23:14,195 INFO ..................................................
2021-05-10 08:23:14,195 INFO Starting tasks on pipeline: provision
2021-05-10 08:23:14,196 INFO --> Blaster v0.4.0 <--
2021-05-10 08:23:14,196 INFO Task Execution: Concurrent
2021-05-10 08:23:14,198 INFO Tasks:
2021-05-10 08:23:14,199 INFO 1. Task : laptop
Class : <class 'teflo.tasks.provision.ProvisionTask'>
Methods : ['run']
2021-05-10 08:23:14,199 INFO ** BLASTER BEGIN **
2021-05-10 08:23:14,208 WARNING Asset laptop is static, provision will be skipped.
2021-05-10 08:23:14,211 INFO ** BLASTER COMPLETE **
2021-05-10 08:23:14,211 INFO -> TOTAL DURATION: 0h:0m:0s
2021-05-10 08:23:14,212 INFO Populating master inventory file with host(s) laptop
2021-05-10 08:23:14,214 INFO ..................................................
2021-05-10 08:23:14,215 INFO * Task : execute
2021-05-10 08:23:14,215 INFO Sending out any notifications that are registered.
2021-05-10 08:23:14,216 INFO ..................................................
2021-05-10 08:23:14,216 INFO Starting tasks on pipeline: notify
2021-05-10 08:23:14,217 WARNING ... no tasks to be executed ...
2021-05-10 08:23:14,217 INFO ..................................................
2021-05-10 08:23:14,218 INFO Starting tasks on pipeline: execute
2021-05-10 08:23:14,218 INFO --> Blaster v0.4.0 <--
2021-05-10 08:23:14,219 INFO Task Execution: Sequential
2021-05-10 08:23:14,219 INFO Tasks:
2021-05-10 08:23:14,219 INFO 1. Task : Test command
Class : <class 'teflo.tasks.execute.ExecuteTask'>
Methods : ['run']
2021-05-10 08:23:14,220 INFO ** BLASTER BEGIN **
2021-05-10 08:23:14,221 INFO executing Test command
2021-05-10 08:23:14,224 INFO Executing shell commands:
2021-05-10 08:23:14,224 INFO Executing shell command /usr/bin/true
2021-05-10 08:23:14,224 INFO Ansible options used: {}
2021-05-10 08:23:14,235 INFO Executing playbook : cbn_execute_shell_25st0.yml
[WARNING]: * Failed to parse /home/bpratt/pit/teflo-inventory-gen-reproduction/.teflo/.results/inventory/master-ud41ik0pfi with yaml plugin:
We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 2 (char 1)
Syntax Error while loading YAML. did not find expected <document start> The error appears to be in '/home/bpratt/pit/teflo-inventory-gen-
reproduction/.teflo/.results/inventory/master-ud41ik0pfi': line 2, column 1, but may be elsewhere in the file depending on the exact syntax
problem. The offending line appears to be: [laptop:children] laptop ^ here
[WARNING]: * Failed to parse /home/bpratt/pit/teflo-inventory-gen-reproduction/.teflo/.results/inventory/master-ud41ik0pfi with ini plugin:
can't add group to itself
[WARNING]: Unable to parse /home/bpratt/pit/teflo-inventory-gen-reproduction/.teflo/.results/inventory/master-ud41ik0pfi as an inventory
source
[WARNING]: Unable to parse /home/bpratt/pit/teflo-inventory-gen-reproduction/.teflo/.results/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
2021-05-10 08:23:14,559 INFO ansible-playbook 2.10.9
2021-05-10 08:23:14,560 INFO config file = None
2021-05-10 08:23:14,560 INFO configured module search path = ['/home/bpratt/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
2021-05-10 08:23:14,560 INFO ansible python module location = /home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/ansible
2021-05-10 08:23:14,560 INFO executable location = /home/bpratt/pit/teflo-inventory-gen-reproduction/venv/bin/ansible-playbook
2021-05-10 08:23:14,560 INFO python version = 3.9.4 (default, Apr 6 2021, 00:00:00) [GCC 11.0.1 20210324 (Red Hat 11.0.1-0)]
2021-05-10 08:23:14,560 INFO No config file found; using defaults
2021-05-10 08:23:14,637 INFO Skipping callback 'default', as we already have a stdout callback.
2021-05-10 08:23:14,638 INFO Skipping callback 'minimal', as we already have a stdout callback.
2021-05-10 08:23:14,638 INFO Skipping callback 'oneline', as we already have a stdout callback.
2021-05-10 08:23:14,638 INFO
2021-05-10 08:23:14,638 INFO PLAYBOOK: cbn_execute_shell_25st0.yml ******************************************
2021-05-10 08:23:14,638 INFO 1 plays in cbn_execute_shell_25st0.yml
2021-05-10 08:23:14,650 INFO
2021-05-10 08:23:14,650 INFO PLAY [run shell and fetch results] *********************************************
2021-05-10 08:23:14,656 INFO
2021-05-10 08:23:14,656 INFO TASK [Gathering Facts] *********************************************************
2021-05-10 08:23:14,656 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_shell_25st0.yml:1
2021-05-10 08:23:15,457 INFO ok: [localhost]
2021-05-10 08:23:15,465 INFO META: ran handlers
2021-05-10 08:23:15,471 INFO
2021-05-10 08:23:15,471 INFO TASK [shell command] ***********************************************************
2021-05-10 08:23:15,471 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_shell_25st0.yml:5
2021-05-10 08:23:15,734 INFO changed: [localhost] => {"changed": true, "cmd": "/usr/bin/true", "delta": "0:00:00.002992", "end": "2021-05-10 08:23:15.716966", "rc": 0, "start": "2021-05-10 08:23:15.713974", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
2021-05-10 08:23:15,740 INFO
2021-05-10 08:23:15,740 INFO TASK [to get correct (stderr/stdout/msg) output msg] ***************************
2021-05-10 08:23:15,740 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_shell_25st0.yml:11
2021-05-10 08:23:15,752 INFO ok: [localhost] => {"ansible_facts": {"sh_out": ""}, "changed": false}
2021-05-10 08:23:15,758 INFO
2021-05-10 08:23:15,758 INFO TASK [setting json str] ********************************************************
2021-05-10 08:23:15,758 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_shell_25st0.yml:15
2021-05-10 08:23:15,772 INFO ok: [localhost] => {"ansible_facts": {"json_str": {"err": "", "host_name": "workstation", "rc": "0"}}, "changed": false}
2021-05-10 08:23:15,785 INFO
2021-05-10 08:23:15,785 INFO TASK [copy to shell results to a json file] ************************************
2021-05-10 08:23:15,785 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_shell_25st0.yml:20
2021-05-10 08:23:16,256 INFO fatal: [localhost]: FAILED! => {"changed": false, "checksum": "5334ada093057555f4a8602c96d94dff571ec3a7", "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}
2021-05-10 08:23:16,256 INFO
2021-05-10 08:23:16,256 INFO NO MORE HOSTS LEFT *************************************************************
2021-05-10 08:23:16,257 INFO
2021-05-10 08:23:16,257 INFO PLAY RECAP *********************************************************************
2021-05-10 08:23:16,257 INFO localhost : ok=4 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
2021-05-10 08:23:16,257 INFO
2021-05-10 08:23:16,303 ERROR [Errno 2] No such file or directory: 'shell-results-25st0.json'
2021-05-10 08:23:16,304 ERROR Failed to find the shell-results.json file which means there was an uncaught failure running the dynamic playbook. Please enable verbose Ansible logging in the teflo.cfg file and try again.
2021-05-10 08:23:16,304 INFO Test Execution has failed but still fetching any test generated artifacts
2021-05-10 08:23:16,305 INFO Fetching test artifacts @ .teflo/.results/artifacts
2021-05-10 08:23:16,305 INFO Ansible options used: {}
2021-05-10 08:23:16,346 INFO Executing playbook : cbn_execute_synchronize_25st0.yml
2021-05-10 08:23:16,664 INFO ansible-playbook 2.10.9
2021-05-10 08:23:16,665 INFO config file = None
2021-05-10 08:23:16,665 INFO configured module search path = ['/home/bpratt/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
2021-05-10 08:23:16,665 INFO ansible python module location = /home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/ansible
2021-05-10 08:23:16,665 INFO executable location = /home/bpratt/pit/teflo-inventory-gen-reproduction/venv/bin/ansible-playbook
2021-05-10 08:23:16,665 INFO python version = 3.9.4 (default, Apr 6 2021, 00:00:00) [GCC 11.0.1 20210324 (Red Hat 11.0.1-0)]
2021-05-10 08:23:16,665 INFO No config file found; using defaults
2021-05-10 08:23:16,740 INFO redirecting (type: action) ansible.builtin.synchronize to ansible.posix.synchronize
2021-05-10 08:23:16,746 INFO Skipping callback 'default', as we already have a stdout callback.
2021-05-10 08:23:16,746 INFO Skipping callback 'minimal', as we already have a stdout callback.
2021-05-10 08:23:16,746 INFO Skipping callback 'oneline', as we already have a stdout callback.
2021-05-10 08:23:16,746 INFO
2021-05-10 08:23:16,746 INFO PLAYBOOK: cbn_execute_synchronize_25st0.yml ************************************
2021-05-10 08:23:16,747 INFO 1 plays in cbn_execute_synchronize_25st0.yml
2021-05-10 08:23:16,759 INFO
2021-05-10 08:23:16,759 INFO PLAY [fetch artifacts] *********************************************************
2021-05-10 08:23:17,438 INFO
2021-05-10 08:23:17,438 INFO TASK [Gathering Facts] *********************************************************
2021-05-10 08:23:17,438 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_synchronize_25st0.yml:1
2021-05-10 08:23:17,438 INFO ok: [localhost]
2021-05-10 08:23:17,445 INFO META: ran handlers
2021-05-10 08:23:17,482 INFO
2021-05-10 08:23:17,482 INFO TASK [setup artifacts_found list] **********************************************
2021-05-10 08:23:17,482 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_synchronize_25st0.yml:16
2021-05-10 08:23:17,482 INFO ok: [localhost] => {"ansible_facts": {"artifacts_found": []}, "changed": false}
2021-05-10 08:23:17,517 INFO
2021-05-10 08:23:17,517 INFO TASK [debug] *******************************************************************
2021-05-10 08:23:17,518 INFO task path: /home/bpratt/pit/teflo-inventory-gen-reproduction/cbn_execute_synchronize_25st0.yml:26
2021-05-10 08:23:17,518 INFO ok: [localhost] => {
2021-05-10 08:23:17,518 INFO "msg": "0"
2021-05-10 08:23:17,518 INFO }
2021-05-10 08:23:17,631 INFO redirecting (type: action) ansible.builtin.synchronize to ansible.posix.synchronize
2021-05-10 08:23:17,688 INFO META: ran handlers
2021-05-10 08:23:17,694 INFO META: ran handlers
2021-05-10 08:23:17,695 INFO
2021-05-10 08:23:17,695 INFO PLAY RECAP *********************************************************************
2021-05-10 08:23:17,695 INFO localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0
2021-05-10 08:23:17,695 INFO
2021-05-10 08:23:17,747 ERROR [Errno 2] No such file or directory: 'sync-results-25st0.txt'
2021-05-10 08:23:17,780 ERROR Failed to execute Test command
2021-05-10 08:23:17,781 ERROR Failed to find the sync-results.txt file which means there was an uncaught failure running the synchronization playbook. Please enable verbose Ansible logging in the teflo.cfg file and try again.
2021-05-10 08:23:17,783 ERROR A exception was raised while processing task: Test command method: run
Traceback (most recent call last):
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/ansible_helpers.py", line 677, in run_shell_playbook
with open('shell-results-' + self.uid + '.json') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'shell-results-25st0.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/executors/ext/ansible_executor_plugin/ansible_executor_plugin.py", line 338, in run
getattr(self, '__%s__' % attr)()
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/executors/ext/ansible_executor_plugin/ansible_executor_plugin.py", line 100, in __shell__
result = self.ans_service.run_shell_playbook(shell)
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/ansible_helpers.py", line 686, in run_shell_playbook
raise AnsibleServiceError('Failed to find the shell-results.json file '
teflo.exceptions.AnsibleServiceError: Failed to find the shell-results.json file which means there was an uncaught failure running the dynamic playbook. Please enable verbose Ansible logging in the teflo.cfg file and try again.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/executors/ext/ansible_executor_plugin/ansible_executor_plugin.py", line 225, in __artifacts__
with open('sync-results-' + self.ans_service.uid + '.txt') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'sync-results-25st0.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/blaster/blast.py", line 83, in run
value = getattr(task_obj, method)()
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/tasks/execute.py", line 57, in run
self.executor.run()
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/executors/execute_manager.py", line 72, in run
res = self.plugin.run()
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/executors/ext/ansible_executor_plugin/ansible_executor_plugin.py", line 346, in run
self.__artifacts__()
File "/home/bpratt/pit/teflo-inventory-gen-reproduction/venv/lib64/python3.9/site-packages/teflo/executors/ext/ansible_executor_plugin/ansible_executor_plugin.py", line 229, in __artifacts__
raise TefloExecuteError('Failed to find the sync-results.txt file '
teflo.exceptions.TefloExecuteError: Failed to find the sync-results.txt file which means there was an uncaught failure running the synchronization playbook. Please enable verbose Ansible logging in the teflo.cfg file and try again.
2021-05-10 08:23:18,787 INFO ** BLASTER COMPLETE **
2021-05-10 08:23:18,789 INFO -> TOTAL DURATION: 0h:0m:4s
2021-05-10 08:23:18,791 ERROR One or more tasks got a status of non zero.
2021-05-10 08:23:18,794 INFO Sending out any notifications that are registered.
2021-05-10 08:23:18,799 INFO ..................................................
2021-05-10 08:23:18,801 INFO Starting tasks on pipeline: notify
2021-05-10 08:23:18,803 WARNING ... no tasks to be executed ...
2021-05-10 08:23:18,833 INFO
2021-05-10 08:23:18,834 INFO SCENARIO RUN (END)
2021-05-10 08:23:18,834 INFO -------------------------------------------------------------------------------
2021-05-10 08:23:18,835 INFO * Duration : 0h:0m:4s
2021-05-10 08:23:18,835 INFO * Passed Tasks : ['provision']
2021-05-10 08:23:18,835 INFO * Failed Tasks : ['execute']
2021-05-10 08:23:18,836 INFO * Results Folder : .teflo/.results
2021-05-10 08:23:18,836 INFO * Included Scenario Definition : []
2021-05-10 08:23:18,837 INFO * Final Scenario Definition : .teflo/.results/results.yml
2021-05-10 08:23:18,837 INFO -------------------------------------------------------------------------------
2021-05-10 08:23:18,838 INFO TEFLO RUN (RESULT=FAILED)