Shade 1.23.0 is breaking os_tempest role

Bug #1715603 reported by Jean-Philippe Evrard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

Our os_tempest role is using the os_image module, and it fails with the latest version of shade.

(See here for its usage)
https://github.com/openstack/openstack-ansible-os_tempest/blob/master/tasks/tempest_resources.yml#L22-L36

and here is an extract of the issue:

TASK [os_tempest : Ensure tempest image] ***************************************
2017-09-06 14:17:27.062052 | Wednesday 06 September 2017 14:17:27 +0000 (0:00:45.646) 0:58:16.610 ***
2017-09-06 14:17:30.298675 | FAILED - RETRYING: Ensure tempest image (5 retries left).
2017-09-06 14:17:46.679756 | FAILED - RETRYING: Ensure tempest image (4 retries left).
2017-09-06 14:18:03.155929 | FAILED - RETRYING: Ensure tempest image (3 retries left).
2017-09-06 14:18:19.550310 | FAILED - RETRYING: Ensure tempest image (2 retries left).
2017-09-06 14:18:35.970948 | FAILED - RETRYING: Ensure tempest image (1 retries left).
2017-09-06 14:18:52.367732 | fatal: [aio1_utility_container-83f6bf81]: FAILED! =>
{"attempts": 5, "changed": false, "failed": true, "module_stderr": "mesg: ttyname failed: Inappropriate ioctl for device
Traceback (most recent call last):
  File \"/tmp/ansible_uD6LuR/ansible_module_os_image.py\", line 202, in <module>
    main()
  File \"/tmp/ansible_uD6LuR/ansible_module_os_image.py\", line 156, in main
    image = cloud.get_image(name_or_id=module.params['name'])
  File \"/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py\", line 3074, in get_image
    return _utils._get_entity(self.search_images, name_or_id, filters)
  File \"/usr/local/lib/python2.7/dist-packages/shade/_utils.py\", line 220, in _get_entity
    entities = func(name_or_id, filters, **kwargs)
  File \"/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py\", line 1550, in search_images
    images = self.list_images()
  File \"/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py\", line 2130, in list_images
    if self._is_client_version('image', 2):
  File \"/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py\", line 458, in _is_client_version
    return client._version_matches(version)
  File \"/usr/local/lib/python2.7/dist-packages/shade/_adapter.py\", line 161, in _version_matches
    api_version = self.get_api_major_version()
    AttributeError: 'ShadeAdapter' object has no attribute 'get_api_major_version'
", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}

This will impact us from Ocata onwards.

Revision history for this message
Monty Taylor (mordred) wrote :

I do not believe this is a bug in shade. Rather, I think this is a bug somewhere in the consumption of upper-constratints.txt and requirements.

get_api_major_version comes from keystoneauth1 3.2.0. If you get:

  AttributeError: 'ShadeAdapter' object has no attribute 'get_api_major_version'

that means that somehow you have installed shade 2.3.0 with keystoneauth1 < 3.2.0 even though shade's requirements file (and the upper-constraints.txt in global-requirements) say 3.2.0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible (master)

Change abandoned by Jean-Philippe Evrard (<email address hidden>) on branch: master
Review: https://review.openstack.org/501639
Reason: Shouldn't be needed, the 1.23 should work with the proper requirements.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/ocata)

Reviewed: https://review.openstack.org/501641
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=a9964643f6f9b53793c6ddaddd89c295df5ef114
Submitter: Jenkins
Branch: stable/ocata

commit a9964643f6f9b53793c6ddaddd89c295df5ef114
Author: Jean-Philippe Evrard <email address hidden>
Date: Thu Sep 7 09:06:15 2017 +0000

    Pin Shade to last known version

    Shade has to be pinned because 1.23.0 doesn't work for tempest
    instance creation. We should remove this pin as fast as possible
    when shade is fixed.

    Change-Id: Idc27f5090eaaac73d3019425b3cfabff66474af8
    Related-Bug: #1715603

tags: added: in-stable-ocata
Changed in openstack-ansible:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.2.0

This issue was fixed in the openstack/requirements 1.2.0 release.

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.