`nova version-list` doesn't work with latest endpoint url

Bug #1702194 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
High
Andriy Kurilin

Bug Description

The novaclient's CI is broken due to failed funtional test:

> novaclient.tests.functional.v2.legacy.test_readonly_nova.SimpleReadOnlyNovaClientTest.test_version_list

> http://logs.openstack.org/33/473833/3/check/gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv/58bfe25/console.html.gz#_2017-06-30_10_37_44_630123

It had happend due to recent change in devstack, which moved Nova-API under uwsgi (https://github.com/openstack-dev/devstack/commit/b90bb1a46193b052cd98513213eed688e8e29d23) and changed the endpoint url format.

The trace of failed test:

2017-06-30 10:37:44.630123 | 2017-06-30 10:37:44.629 | novaclient.tests.functional.v2.legacy.test_readonly_nova.SimpleReadOnlyNovaClientTest.test_version_list
2017-06-30 10:37:44.631464 | 2017-06-30 10:37:44.631 | -------------------------------------------------------------------------------------------------------
2017-06-30 10:37:44.632907 | 2017-06-30 10:37:44.632 |
2017-06-30 10:37:44.634253 | 2017-06-30 10:37:44.634 | Captured traceback:
2017-06-30 10:37:44.635743 | 2017-06-30 10:37:44.635 | ~~~~~~~~~~~~~~~~~~~
2017-06-30 10:37:44.637276 | 2017-06-30 10:37:44.637 | Traceback (most recent call last):
2017-06-30 10:37:44.638582 | 2017-06-30 10:37:44.638 | File "novaclient/tests/functional/v2/legacy/test_readonly_nova.py", line 103, in test_version_list
2017-06-30 10:37:44.639948 | 2017-06-30 10:37:44.639 | self.nova('version-list')
2017-06-30 10:37:44.641237 | 2017-06-30 10:37:44.641 | File "novaclient/tests/functional/base.py", line 314, in nova
2017-06-30 10:37:44.642573 | 2017-06-30 10:37:44.642 | endpoint_type, merge_stderr)
2017-06-30 10:37:44.644786 | 2017-06-30 10:37:44.644 | File "/opt/stack/new/python-novaclient/.tox/functional/local/lib/python2.7/site-packages/tempest/lib/cli/base.py", line 130, in nova
2017-06-30 10:37:44.646371 | 2017-06-30 10:37:44.646 | 'nova', action, flags, params, fail_ok, merge_stderr)
2017-06-30 10:37:44.647926 | 2017-06-30 10:37:44.647 | File "/opt/stack/new/python-novaclient/.tox/functional/local/lib/python2.7/site-packages/tempest/lib/cli/base.py", line 374, in cmd_with_auth
2017-06-30 10:37:44.649645 | 2017-06-30 10:37:44.649 | self.cli_dir, prefix=self.prefix)
2017-06-30 10:37:44.651374 | 2017-06-30 10:37:44.650 | File "/opt/stack/new/python-novaclient/.tox/functional/local/lib/python2.7/site-packages/tempest/lib/cli/base.py", line 71, in execute
2017-06-30 10:37:44.652972 | 2017-06-30 10:37:44.652 | result_err)
2017-06-30 10:37:44.654727 | 2017-06-30 10:37:44.654 | tempest.lib.exceptions.CommandFailed: Command '['/opt/stack/new/python-novaclient/.tox/functional/bin/nova', '--os-username', 'admin', '--os-tenant-name', 'admin', '--os-password', 'secretadmin', '--os-auth-url', 'http://198.72.124.34/identity', '--os-compute-api-version', '2.1', '--os-endpoint-type', 'publicURL', 'version-list']' returned non-zero exit status 1.
2017-06-30 10:37:44.656429 | 2017-06-30 10:37:44.656 | stdout:
2017-06-30 10:37:44.658176 | 2017-06-30 10:37:44.657 |
2017-06-30 10:37:44.660023 | 2017-06-30 10:37:44.659 | stderr:
2017-06-30 10:37:44.661509 | 2017-06-30 10:37:44.661 | ERROR (TypeError): 'NoneType' object has no attribute '__getitem__'

Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in python-novaclient:
status: New → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in python-novaclient:
importance: Undecided → High
assignee: nobody → Andrey Kurilin (andreykurilin)
Changed in python-novaclient:
status: Confirmed → In Progress
summary: - test_version_list fails with "(TypeError): 'NoneType' object has no
- attribute '__getitem__'"
+ `nova version-list` doesn't work with latest endpoint url
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/479818
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=bd0a2adefe5e89c4269f6589837f871764c6f1f6
Submitter: Jenkins
Branch: master

commit bd0a2adefe5e89c4269f6589837f871764c6f1f6
Author: Andrey Kurilin <email address hidden>
Date: Mon Jul 3 16:27:29 2017 +0300

    Fix cropping the endpoint url

    `nova version-list` crops the endpoint url to exclude API version and
    project-id(for microversions < 2.18). It is ok, but the code was
    designed before Nova-API moved under uwsgi, which changed the endpoint
    url format.

    The latest endpoint url contains the hostname and port which can be one
    for several services and it is a wrong case to cut the whole path from
    the endpoint.

    Closes-Bug: #1702194

    Change-Id: Icba858b496855e2ffd71b35168e8057b28236119

Changed in python-novaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 9.1.0

This issue was fixed in the openstack/python-novaclient 9.1.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.