contrail-ansible-deployer icon indicating copy to clipboard operation
contrail-ansible-deployer copied to clipboard

Issue with kolla multidomain auth

Open malebeau opened this issue 6 years ago • 3 comments

I'm trying to setup mutlidomain auth with domain choices in horizon UI (branch stable-queens). When setting in config/instances.yaml :

kolla_globals:
  horizon_keystone_multidomain: true
  horizon_keystone_domain_choices:
    Default: Default
    domain: domain

This result on an error when horizon docker launch.

Resulting var in : /etc/kolla/globals

horizon_keystone_domain_choices: {u'Default': u'Default', u'domain': `u'domain'}

Result in local_settings in /etc/kolla/horizon/local_settings :

OPENSTACK_KEYSTONE_DOMAIN_CHOICES = (
    (''u'Default'', 'u'default''),
    ('u'domain'', 'u'domain''),
)

This causes horizon docker to restart infinitely.

When changing in contrail-kolla-ansible/ansible/roles/horizon/templates/local_settings.j2

OPENSTACK_KEYSTONE_DOMAIN_CHOICES = (
{% for key, value in horizon_keystone_domain_choices.items() %}
    ('{{ key }}', '{{ value }}'),
{% endfor %}
)

with :

OPENSTACK_KEYSTONE_DOMAIN_CHOICES = (
{% for key, value in horizon_keystone_domain_choices.items() %}
    ({{ key }}, {{ value }}),
{% endfor %}
)

Problem is solved in that case.

Also when setting directly the domain in contrail-kolla-ansible/ansible/roles/horizon/defaults/main.yml and without modifying local_setting template this is OK

horizon_keystone_domain_choices:
  Default: default
  domain: domain

It seems the way contrail ansible deployer generate kolla_globals variable file is the problem. Has someone a clue to avoid this problem ?

malebeau avatar Jul 23 '18 14:07 malebeau

Hi @surfmax I've checked it on my side. You're right - it generates invalid config for kolla:

horizon_keystone_domain_choices: {u'Default': u'Default', u'domain': u'domain'}

LP bug for tracking is https://bugs.launchpad.net/juniperopenstack/+bug/1783146

Andrey-mp avatar Jul 23 '18 15:07 Andrey-mp

Thanks for this BR, Maxime

malebeau avatar Jul 23 '18 15:07 malebeau

fixed. issue can be closed.

Andrey-mp avatar Jul 24 '18 10:07 Andrey-mp