Comment 2 for bug 1866181

Revision history for this message
Mark Goddard (mgoddard) wrote : Re: CI: failing task "service-ks-register : keystone | Creating services"

Was finally able to reproduce:

virtualenv venv
venv/bin/pip install -c https://releases.openstack.org/constraints/upper/master 'ansible<2.9' openstacksdk
cat << EOF > repro.yml
---
- hosts: localhost
  gather_facts: no
  tasks:
    - os_keystone_service:
        auth:
          auth_url: "http://localhost:35357"
          domain_name: "default"
          password: "1zwBct8GtM44jb97UuM2l5vhcs85UzbA3snC3et3"
          project_name: "admin"
          user_domain_name: "default"
          username: "admin"
        name: foo
        service_type: bar
EOF

venv/bin/ansible-playbook repro.yml

PLAY [localhost] *******************************************************************************************************************************************************************************************

TASK [os_keystone_service] *********************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: expected string or buffer
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/mark/.ansible/tmp/ansible-tmp-1583417741.62-12087961222203/AnsiballZ_os_keystone_service.py\", line 114, in <module>\n _ansiballz_main()\n File \"/home/mark/.ansible/tmp/ansible-tmp-1583417741.62-12087961222203/AnsiballZ_os_keystone_service.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/mark/.ansible/tmp/ansible-tmp-1583417741.62-12087961222203/AnsiballZ_os_keystone_service.py\", line 49, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_os_keystone_service_payload_WbPSEt/__main__.py\", line 194, in <module>\n File \"/tmp/ansible_os_keystone_service_payload_WbPSEt/__main__.py\", line 150, in main\n File \"/tmp/ansible_os_keystone_service_payload_WbPSEt/ansible_os_keystone_service_payload.zip/ansible/module_utils/openstack.py\", line 126, in openstack_cloud_from_module\n File \"/usr/lib/python2.7/distutils/version.py\", line 40, in __init__\n self.parse(vstring)\n File \"/usr/lib/python2.7/distutils/version.py\", line 105, in parse\n match = self.version_re.match(vstring)\nTypeError: expected string or buffer\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

This works with ansible 2.8.8.