contrail-ansible-deployer
contrail-ansible-deployer copied to clipboard
Issue with kolla multidomain auth
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 ?
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
Thanks for this BR, Maxime
fixed. issue can be closed.