keystone APIv2.0 unavailable for admin endpoint under apache

Bug #1382570 reported by Oleh Anufriiev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
MOS Keystone
5.0.x
Won't Fix
Medium
MOS Keystone
5.1.x
Won't Fix
Medium
MOS Keystone
6.0.x
Fix Released
Medium
MOS Keystone
6.1.x
Fix Released
Medium
MOS Keystone

Bug Description

There is a bug https://bugs.launchpad.net/rally/+bug/1379876 that rized during benchmarkin cloud with Rally.

Guys configured keystone + apache by this guide https://mirantis.jira.com/wiki/pages/viewpage.action?spaceKey=OSST&title=Keystone+behind+Apache+on+Ubuntu+MOS+HA

and their cloud has no V2.0 keystone API on admin endpoint in contrast to public endpoint.

curl http://192.168.0.7:5000
{"versions": {"values": [{"status": "stable", "updated": "2013-03-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v3+xml"}], "id": "v3.0", "links": [{"href": "http://192.168.0.7:5000/v3/", "rel": "self"}]}, {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://192.168.0.7:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/", "type": "text/html", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf", "type": "application/pdf", "rel": "describedby"}]}]}}

curl http://192.168.0.7:35357
{"versions": {"values": [{"status": "stable", "updated": "2013-03-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v3+xml"}], "id": "v3.0", "links": [{"href": "http://192.168.0.7:35357/v3/", "rel": "self"}]}]}}

But when keystone is started as service (without apache) both v2.0 and v3 API on all endpoints are available.

After debugging the cause was found:

/usr/lib/python2.7/dist-packages/keystone/service.py

@fail_gracefully
def admin_app_factory(global_conf, **local_conf):
    conf = global_conf.copy()
    conf.update(local_conf)
    return wsgi.ComposingRouter(routes.Mapper(),
                                [identity.routers.Admin(),
                                 assignment.routers.Admin(),
                                    token.routers.Router(),
                                    routers.VersionV2('admin'),
                                    routers.Extension()])

should be

@fail_gracefully
def admin_app_factory(global_conf, **local_conf):
    controllers.register_version('v2.0')
    conf = global_conf.copy()
    conf.update(local_conf)
    return wsgi.ComposingRouter(routes.Mapper(),
                                [identity.routers.Admin(),
                                 assignment.routers.Admin(),
                                    token.routers.Router(),
                                    routers.VersionV2('admin'),
                                    routers.Extension()])

INFO:

apt-cache policy keystone

keystone:
  Installed: 1:2014.1.1-fuel5.1~mira10
  Candidate: 1:2014.1.1-fuel5.1~mira10
  Version table:
 *** 1:2014.1.1-fuel5.1~mira10 0
        500 http://10.20.0.2/ubuntu/fuelweb/x86_64/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Dmitry Mescheryakov (dmitrymex) wrote :

Please get the output of /api/version, it better identifies MOS version then packages' names.

Changed in mos:
status: New → Incomplete
Revision history for this message
Oleh Anufriiev (oanufriev) wrote :

fuel --fuel-version
api: '1.0'
astute_sha: f5fbd89d1e0e1f22ef9ab2af26da5ffbfbf24b13
auth_required: true
build_id: 2014-09-17_21-40-34
build_number: '11'
feature_groups:
- mirantis
fuellib_sha: d9b16846e54f76c8ebe7764d2b5b8231d6b25079
fuelmain_sha: 8ef433e939425eabd1034c0b70e90bdf888b69fd
nailgun_sha: eb8f2b358ea4bb7eb0b2a0075e7ad3d3a905db0d
ostf_sha: 64cb59c681658a7a55cc2c09d079072a41beb346
production: docker
release: '5.1'
release_versions:
  2014.1.1-5.1:
    VERSION:
      api: '1.0'
      astute_sha: f5fbd89d1e0e1f22ef9ab2af26da5ffbfbf24b13
      build_id: 2014-09-17_21-40-34
      build_number: '11'
      feature_groups:
      - mirantis
      fuellib_sha: d9b16846e54f76c8ebe7764d2b5b8231d6b25079
      fuelmain_sha: 8ef433e939425eabd1034c0b70e90bdf888b69fd
      nailgun_sha: eb8f2b358ea4bb7eb0b2a0075e7ad3d3a905db0d
      ostf_sha: 64cb59c681658a7a55cc2c09d079072a41beb346
      production: docker
      release: '5.1'

Changed in mos:
status: Incomplete → Confirmed
importance: Undecided → Medium
assignee: nobody → MOS Keystone (mos-keystone)
Revision history for this message
Boris Bobrov (bbobrov) wrote :
Revision history for this message
Boris Bobrov (bbobrov) wrote :
Changed in mos:
status: Confirmed → Won't Fix
Changed in mos:
status: Fix Committed → Fix Released
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.