failing task "service-ks-register : keystone | Creating services"

Bug #1866181 reported by Mark Goddard
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Critical
Radosław Piliszek
Ussuri
Fix Released
Critical
Radosław Piliszek

Bug Description

CI deploy jobs are currently broken on master. We get errors like the following:

TASK [service-ks-register : keystone | Creating services] **********************
task path: /home/zuul/src/opendev.org/openstack/kolla-ansible/ansible/roles/service-ks-register/tasks/main.yml:3
FAILED - RETRYING: keystone | Creating services (5 retries left).Result was: {
    "action": "os_keystone_service",
    "attempts": 1,
    "changed": false,
    "invocation": {
        "module_args": {
            "api_version": "auto",
            "module_args": {
                "auth": {
                    "auth_url": "http://192.0.2.10:35357",
                    "domain_name": "default",
                    "password": "1zwBct8GtM44jb97UuM2l5vhcs85UzbA3snC3et3",
                    "project_name": "admin",
                    "user_domain_name": "default",
                    "username": "admin"
                },
                "cacert": "",
                "description": "Openstack Identity Service",
                "interface": "admin",
                "name": "keystone",
                "region_name": "RegionOne",
                "service_type": "identity"
            },
            "module_extra_vars": null,
            "module_name": "os_keystone_service",
            "timeout": 180,
            "user": null
        }
    },
    "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible-tmp-1583403053.4-202030654516731/AnsiballZ_os_keystone_service.py\", line 114, in <module>\n _ansiballz_main()\n File \"/tmp/ansible-tmp-1583403053.4-202030654516731/AnsiballZ_os_keystone_service.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/tmp/ansible-tmp-1583403053.4-202030654516731/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_EVkuxm/__main__.py\", line 194, in <module>\n File \"/tmp/ansible_os_keystone_service_payload_EVkuxm/__main__.py\", line 150, in main\n File \"/tmp/ansible_os_keystone_service_payload_EVkuxm/ansible_os_keystone_service_payload.zip/ansible/module_utils/openstack.py\", line 126, in openstack_cloud_from_module\n File \"/usr/lib64/python2.7/distutils/version.py\", line 40, in __init__\n self.parse(vstring)\n File \"/usr/lib64/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,
    "retries": 6
}

Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Critical
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/711449

Changed in kolla-ansible:
assignee: nobody → Mark Goddard (mgoddard)
status: Triaged → In Progress
Mark Goddard (mgoddard)
summary: - CI: os_* modules broken in ansible 2.9.6
+ CI: service-ks-register : keystone | Creating services failing
summary: - CI: service-ks-register : keystone | Creating services failing
+ CI: failing task "service-ks-register : keystone | Creating services"
description: updated
description: updated
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.

Revision history for this message
Mark Goddard (mgoddard) wrote :

Looks like it was caused by this patch: https://github.com/ansible/ansible/commit/e9a190e9c19cb4898c2f264be099f625f77a5f14.

It is a backport, but has some additional changes in module_utils/openstack.py which are the issue.

Mark Goddard (mgoddard)
Changed in kolla:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 7.1.1
milestone: 7.1.1 → 10.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-ansible (master)

Change abandoned by Mark Goddard (<email address hidden>) on branch: master
Review: https://review.opendev.org/711449
Reason: Wrong fix.

Revision history for this message
Mark Goddard (mgoddard) wrote :
summary: - CI: failing task "service-ks-register : keystone | Creating services"
+ failing task "service-ks-register : keystone | Creating services"
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.opendev.org/711470

Changed in kolla:
assignee: nobody → Mark Goddard (mgoddard)
status: Triaged → In Progress
Revision history for this message
Mark Goddard (mgoddard) wrote :
Revision history for this message
Mark Goddard (mgoddard) wrote :
Changed in kolla:
assignee: Mark Goddard (mgoddard) → Radosław Piliszek (yoctozepto)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.opendev.org/711470
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=a755304795eb7bd43a26b7380aa2686151295c64
Submitter: Zuul
Branch: master

commit a755304795eb7bd43a26b7380aa2686151295c64
Author: Mark Goddard <email address hidden>
Date: Thu Mar 5 14:34:18 2020 +0000

    Multiple fixes to unblock CI

    This change includes a number of fixes to make CI functional.

    * Blacklist ansible 2.8.9 in kolla-toolbox

      Ansible 2.8.9 broke the OpenStack modules, see
      https://bugs.launchpad.net/kolla/+bug/1866181 for details.

      This causes us to fail with the following error:

        /usr/lib64/python2.7/distutils/version.py\", line 40, in __init__
        self.parse(vstring)
        File "/usr/lib64/python2.7/distutils/version.py", line 105, in parse
        match = self.version_re.match(vstring)\nTypeError: expected string or buffer

      This change works around the issue by blacklisting ansible 2.8.9 in
      the kolla-toolbox image.

    * Drop CentOS 7 CI jobs. There are multiple issues with CentOS 7 now,
      and we have CentOS 8 jobs in place so it's time to move on

    * pin requirements to commit
      ea42244642c3c091cb4f70917ae8d79af217b6af. This is required to avoid
      oslo.cache 2.1.0, which breaks us. See
      https://bugs.launchpad.net/kolla-ansible/+bug/1866008.

    Change-Id: Iebc39bd804d2c4f553d42c285549f50f4c8bc8be
    Closes-Bug: #1866181
    Related-Bug: #1866008

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
Mark Goddard (mgoddard) wrote :

The fix for ansible was released yesterday in ansible 2.8.10: https://groups.google.com/forum/#!msg/ansible-devel/Zz3cwmDlyOA/jEIkG6x2AAAJ

no longer affects: kolla-ansible
no longer affects: kolla-ansible/ussuri
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.