python-ceilometerclient does not work with v3

Bug #1466460 reported by kinglion
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ceilometerclient
Invalid
Undecided
Unassigned

Bug Description

I install openstack as the way http://docs.openstack.org/kilo/install-guide/install/apt/content/ in ubuntu14.04_x86_64,when I finish installing ceilometer,and to test if it work or not,I encounter the problem,:
ceilometer meter-list
 report the error is " The service catalog is empty." in keystoneclient/service_catalog.py
my admin-openrc.sh is :
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=57af19784cd #I‘m pretty sure the passwoard is correct
export OS_AUTH_URL=http://172.16.21.145:35357/v3
so I read the keystoneclient and ceilometerclient code detail;
I find the keystoneclient/auth/identity/v3.py

class Auth(base.BaseIdentityPlugin):
     def __init__(self, auth_url, auth_methods,
                 trust_id=None,
                 domain_id=None,
                 domain_name=None,
                 project_id=None,
                 project_name=None,
                 project_domain_id=None,
                 project_domain_name=None,
                 reauthenticate=True,
                 include_catalog=True)
but when we use it in ceilometerclient/client.py
def _get_keystone_session(**kwargs):
    ........
    if use_v3:
        # the auth_url as v3 specified
        # e.g. http://no.where:5000/v3
        # Keystone will return only v3 as viable option
        logger.info("domain id %s"%user_domain_id)
        auth = v3_auth.Password(
            v3_auth_url,
            username=username,
            password=kwargs.pop('password', None),
            user_id=user_id,
            user_domain_name=user_domain_name,
            user_domain_id=user_domain_id,
            project_domain_name=project_domain_name,
            project_domain_id=project_domain_id)
I think the parameters user_domain_id and user_domain_name are incorrect,they are should be domain_id and domain_name;
if I do not change them, the body in keystoneclient/auth/identity/v3.py
def get_auth_ref(self, session, **kwargs):
    .........
     resp = session.post(token_url, json=body, headers=headers,
                            authenticated=False, log=False, **rkwargs)
the body is:
{'auth': {'identity': {'password': {'user': {'password': '57af19784cd', 'name': 'admin'}}, 'methods': ['password']}}}
when I change them,the body is:
{'auth': {'scope': {'domain': {'id': 'default'}}, 'identity': {'password': {'user': {'password': '57af19784cd', 'name': 'admin'}}, 'methods': ['password']}}}
even I change them to domain_name, domain_id, it can not get the token from keystone, I think the body is not correct,becasue I use the same admin-openrc.sh on
nova list
the body is:
{'auth': {'scope': {'project': {'domain': {'id': 'default'}, 'name': 'admin'}}, 'identity': {'password': {'user': {'password': '57af19784cd', 'name': 'admin'}}, 'methods': ['password']}}}
so I think the ceilometerclient is Incompatible with keystoneclient;

Revision history for this message
kinglion (ayun-1987-li) wrote :

nobody to dispose this problem?

Revision history for this message
gordon chung (chungg) wrote :

hi kinglion.

apologies, we don't track launchpad constantly so if you are looking for immediate response, the mailing list [openstack-dev] and irc is your best bet.

regarding this bug i believe you are affected by this: https://bugs.launchpad.net/cloud-archive/+bug/1462410

Changed in python-ceilometerclient:
status: New → Incomplete
Revision history for this message
kinglion (ayun-1987-li) wrote :

Thanks,it works!

gordon chung (chungg)
Changed in python-ceilometerclient:
status: Incomplete → Invalid
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.