vorburger / opendaylight-coe-kubernetes-openshift

Personal sandbox for http://OpenDaylight.org CoE Kubernetes OpenShift related stuff which may move "upstream" in due time
Apache License 2.0
1 stars 1 forks source link

ERROR! Unexpected Exception, this is probably a bug: invalid version number '2.4.2.0' #2

Closed vorburger closed 5 years ago

vorburger commented 5 years ago

After having gotten an error message yesterday (which I haven't kept) saying something about Python 3 vs 2 (it linked to https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html), today I attempted to use CentOS 7.6.1810 instead of Fedora 28 for my first OpenShift installation, and am now hitting:

[centos@openshift-ansible openshift-ansible]$ ansible-playbook playbooks/prerequisites.yml
ERROR! Unexpected Exception, this is probably a bug: invalid version number '2.4.2.0'
to see the full traceback, use -vvv

[centos@openshift-ansible openshift-ansible]$ ansible-playbook -vvv playbooks/prerequisites.yml
ansible-playbook 2.4.2.0
  config file = /home/centos/openshift-ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /home/centos/openshift-ansible/ansible.cfg as config file
Parsed /etc/ansible/hosts inventory source with ini plugin
statically imported: /home/centos/openshift-ansible/roles/rhel_subscribe/tasks/satellite.yml
statically imported: /home/centos/openshift-ansible/roles/os_firewall/tasks/firewalld.yml
statically imported: /home/centos/openshift-ansible/roles/os_firewall/tasks/iptables.yml
statically imported: /home/centos/openshift-ansible/roles/openshift_excluder/tasks/install.yml
statically imported: /home/centos/openshift-ansible/roles/openshift_excluder/tasks/exclude.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/pre.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/udev_workaround.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/atomic_proxy.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/docker_sanity.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/post.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/registry_auth.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/setup_docker_symlink.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/pre.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/udev_workaround.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/crio_firewall.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/post.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/registry_auth.yml
statically imported: /home/centos/openshift-ansible/roles/container_runtime/tasks/common/setup_docker_symlink.yml
ERROR! Unexpected Exception, this is probably a bug: invalid version number '2.4.2.0'
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 106, in <module>
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 130, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 90, in run
    self._tqm.load_callbacks()
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 208, in load_callbacks
    callback_obj = callback_plugin()
  File "/home/centos/openshift-ansible/roles/lib_utils/callback_plugins/aa_version_requirement.py", line 60, in __init__
    if not version_requirement(__version__):
  File "/home/centos/openshift-ansible/roles/lib_utils/callback_plugins/aa_version_requirement.py", line 41, in version_requirement
    ver = version.StrictVersion(ver)
  File "/usr/lib64/python2.7/distutils/version.py", line 40, in __init__
    self.parse(vstring)
  File "/usr/lib64/python2.7/distutils/version.py", line 107, in parse
    raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '2.4.2.0'

[centos@openshift-ansible openshift-ansible]$ git branch
  master
* release-3.11

[centos@openshift-ansible openshift-ansible]$ python --version
Python 2.7.5

[centos@openshift-ansible openshift-ansible]$ ansible --version
ansible 2.4.2.0
  config file = /home/centos/openshift-ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

So that 2.4.2.0 apparently refers to the Ansible version (BTW that error message is really useless, without context). I just used yum install ansible (on CentOS 7.6.1810) ... no good?!

vorburger commented 5 years ago

With d9ce285, we get Ansible v2.7.4 instead of v2.4.2.0:

[centos@openshift-ansible openshift-ansible]$ ansible --version
ansible 2.7.4
  config file = /home/centos/openshift-ansible/ansible.cfg
  configured module search path = [u'/home/centos/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

With this, ansible-playbook playbooks/prerequisites.yml seems to work.