identity-admin relation: if admin-password not set, service_password=None when running unclustered

Bug #1525380 reported by Alvaro Uria
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Keystone Charm
Triaged
Medium
Unassigned
keystone (Juju Charms Collection)
Invalid
Medium
Unassigned

Bug Description

If keystone (revno=157) is deployed as suggested (w/o setting admin-password parameter), related service does not receive service_password value.

ie:
juju add-relation myservice "keystone:identity-admin"
"""
settings(rid=identity-admin:16)=> {
u'service_region': u'RegionOne', u'service_password': u'None',
u'service_port': u'5000', u'private-address': u'10.55.60.119',
u'service_hostname': u'10.55.60.119', u'service_username': u'admin',
u'service_tenant_name': u'Admin'
}
"""

However, if I juju set keystone admin-password=THE_PASSWORD, then service_password=='THE_PASSWORD'.

ie:
juju set keystone admin-password=THE_PASSWORD
juju add-relation myservice "keystone:identity-admin"
"""
settings(rid=identity-admin:17)=> {
u'service_region': u'RegionOne', u'service_password': u'THE_PASSWORD',
u'service_port': u'5000', u'private-address': u'10.55.60.119',
u'service_hostname': u'10.55.60.119', u'service_username': u'admin',
u'service_tenant_name': u'Admin'
}
"""

I read lp#1385105 and I think it is slightly different to described behaviour here.

Cheers,
-Alvaro.

Revision history for this message
James Page (james-page) wrote :

I see the issue here:

    if is_relation_made("cluster"):
        passwd = peer_retrieve('admin_passwd')
        if passwd:
            store_admin_passwd(passwd)

    return passwd

is_relation_made relies on at least one other unit being part of a relation - I suspect that you may be deploying a standalone keystone, in which case this check is false, and the function just returns the default None value from an earlier config call in the get_admin_passwd function.

TBH that entire function needs refactoring to use leader-storage.

Changed in keystone (Juju Charms Collection):
importance: Undecided → Medium
status: New → Triaged
summary: identity-admin relation: if admin-password not set,
- service_password=None
+ service_password=None when running unclustered
tags: added: leader-storage
James Page (james-page)
Changed in charm-keystone:
importance: Undecided → Medium
status: New → Triaged
Changed in keystone (Juju Charms Collection):
status: Triaged → 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.