InformaticsMatters/okd-orchestrator

./create.py -o fails with ERROR! Unexpected Exception, this is probably a bug: local variable 'module' referenced before assignment

Closed this issue · 2 comments

[...]
+-----------------------------------------------------------------------+
| ansible-playbook ../openshift-ansible/playbooks/prerequisites.yml ... | (in okd)
+-----------------------------------------------------------------------+
| ansible-playbook ../openshift-ansible/playbooks/prerequisites.yml -i inventories/standard-3-11/inventory.yaml
 [WARNING]: Skipping plugin (/home/centos/okd-orchestrator/openshift-ansible/roles/lib_utils/callback_plugins/aa_version_requirement.py) as it seems to be invalid: name 'platform_system' is not defined

ERROR! Unexpected Exception, this is probably a bug: local variable 'module' referenced before assignment
to see the full traceback, use -vvv
ERROR: Process failed (returncode=250)
# stderr follows...
ERROR: Failed to create
[centos@orn-jgu-01 okd]$ ansible-playbook -vvv ../openshift-ansible/playbooks/prerequisites.yml -i inventories/standard-3-11/inventory.yaml
ansible-playbook 2.7.5
  config file = /home/centos/okd-orchestrator/okd/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/centos/.local/lib/python2.7/site-packages/ansible
  executable location = /home/centos/.local/bin/ansible-playbook
  python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /home/centos/okd-orchestrator/okd/ansible.cfg as config file
/home/centos/okd-orchestrator/okd/inventories/standard-3-11/inventory.yaml did not meet host_list requirements, check plugin documentation if this is unexpected
/home/centos/okd-orchestrator/okd/inventories/standard-3-11/inventory.yaml did not meet script requirements, check plugin documentation if this is unexpected
Parsed /home/centos/okd-orchestrator/okd/inventories/standard-3-11/inventory.yaml inventory source with yaml plugin
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/rhel_subscribe/tasks/satellite.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/os_firewall/tasks/firewalld.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/os_firewall/tasks/iptables.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/openshift_excluder/tasks/install.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/openshift_excluder/tasks/exclude.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/pre.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/udev_workaround.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/atomic_proxy.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/docker_sanity.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/post.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/registry_auth.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/setup_docker_symlink.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/pre.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/udev_workaround.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/crio_firewall.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/post.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/registry_auth.yml
statically imported: /home/centos/okd-orchestrator/openshift-ansible/roles/container_runtime/tasks/common/setup_docker_symlink.yml
 [WARNING]: Skipping plugin (/home/centos/okd-orchestrator/openshift-ansible/roles/lib_utils/callback_plugins/aa_version_requirement.py) as it seems to be invalid: name 'platform_system' is not defined

ERROR! Unexpected Exception, this is probably a bug: local variable 'module' referenced before assignment
the full traceback was:

Traceback (most recent call last):
  File "/home/centos/.local/bin/ansible-playbook", line 118, in <module>
    exit_code = cli.run()
  File "/home/centos/.local/lib/python2.7/site-packages/ansible/cli/playbook.py", line 122, in run
    results = pbex.run()
  File "/home/centos/.local/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 89, in run
    self._tqm.load_callbacks()
  File "/home/centos/.local/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 192, in load_callbacks
    for callback_plugin in callback_loader.all(class_only=True):
  File "/home/centos/.local/lib/python2.7/site-packages/ansible/plugins/loader.py", line 493, in all
    self._module_cache[path] = module
UnboundLocalError: local variable 'module' referenced before assignment

Hm, I fixed it by updating setuptools...

When I am in a position to re-test this I will process this change. Thanks for your investigations on this topic - it is appreciated.