rally (OpenStack) fails vs unversioned OS_AUTH_URL

Bug #1771560 reported by Cédric OLLIVIER
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Unassigned

Bug Description

"rally deployment check" is selecting v2 in case of an unversioned OS_AUTH_URL (https://xxx:5000)
It may discover the version or leverage on OS_IDENTITY_API_VERSION instead.

The backtrace shows the use of /usr/lib/python2.7/site-packages/keystoneauth1/identity/v2.py vs Keystone v3.
Then the classical error "The request you have made requires authentication" is printed

And it works well when adding v3 to OS_AUTH_URL.

Cédric OLLIVIER (m.col)
no longer affects: functest
Revision history for this message
Andriy Kurilin (andreykurilin) wrote :

Sorry for a long reply.
It should be fixed in latest rally-openstack release. `rally env create --from-sysenv` saves OS_IDENTITY_API_VERSION. Also it is possible to specify it in environemnt spec.

Revision history for this message
Andriy Kurilin (andreykurilin) wrote :
Changed in rally:
status: New → Fix Released
Revision history for this message
Cédric OLLIVIER (m.col) wrote :

I would have thought rally-openstack selected the smallest number instead of OS_IDENTITY_API_VERSION.
https://github.com/openstack/rally-openstack/blob/master/rally_openstack/osclients.py#L311
Here v2.0 is selected whatever OS_IDENTITY_API_VERSION.

In case of Keystone, the smallest number could be hugely deprecated.
If true, it may easily fail in case of misconfiguration (already faced twice in 2 different installers) when calling rally deployment check.

curl -s http://192.0.2.4:5000 | python -mjson.tool
{
    "versions": {
        "values": [
            {
                "id": "v3.10",
                "links": [
                    {
                        "href": "http://192.0.2.4:5000/v3/",
                        "rel": "self"
                    }
                ],
                "media-types": [
                    {
                        "base": "application/json",
                        "type": "application/vnd.openstack.identity-v3+json"
                    }
                ],
                "status": "stable",
                "updated": "2018-02-28T00:00:00Z"
            },
            {
                "id": "v2.0",
                "links": [
                    {
                        "href": "http://192.0.2.4:5000/v2.0/",
                        "rel": "self"
                    },
                    {
                        "href": "https://docs.openstack.org/",
                        "rel": "describedby",
                        "type": "text/html"
                    }
                ],
                "media-types": [
                    {
                        "base": "application/json",
                        "type": "application/vnd.openstack.identity-v2.0+json"
                    }
                ],
                "status": "deprecated",
                "updated": "2016-08-04T00:00:00Z"
            }
        ]
    }
}

curl http://192.0.2.4:5000/v2.0/tokens
{"error": {"message": "(http://192.0.2.4:5000/v2.0/tokens): The resource could not be found.", "code": 404, "title": "Not Found"}}

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.