R5.x invalid config for kolla is generated for multi-level objects

Bug #1783146 reported by Andrey Pavlov on 2018-07-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
High
Ramprakash R
Trunk
Fix Committed
High
Ramprakash R

Bug Description

Original Issue:
https://github.com/Juniper/contrail-ansible-deployer/issues/28

Description:
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

Andrey Pavlov (apavlov-e) wrote :

Generated config etc/kolla/globals.yml is

---
# You can use this file to override _any_ variable throughout Kolla.
# Additional options can be found in the
# 'kolla-ansible/ansible/group_vars/all.yml' file.

neutron_opencontrail_init_image_full: opencontrailnightly/contrail-openstack-neutron-init:latest
openstack_release: queens
ironic_notification_manager_image_full: opencontrailnightly/contrail-openstack-ironic-notification-manager:latest
opencontrail_collector_ip: 10.21.23.155 10.21.23.156 10.21.23.157
horizon_keystone_multidomain: True
storage_nodes: 10.21.23.155,10.21.23.156,10.21.23.157
heat_opencontrail_init_image_full: opencontrailnightly/contrail-openstack-heat-init:latest
enable_barbican: True
enable_opencontrail_rbac: yes
customize_etc_hosts: False
enable_ironic: False
opencontrail_api_server_ip: 10.21.23.155 10.21.23.156 10.21.23.157
kolla_external_vip_address: 10.20.23.254
horizon_keystone_domain_choices: {u'Default': u'Default', u'domain': u'domain'}
nova_compute_opencontrail_init_image_full: opencontrailnightly/contrail-openstack-compute-init:latest
enable_swift: False
kolla_internal_vip_address: 10.21.23.254
neutron_plugin_agent: opencontrail

Changed in juniperopenstack:
assignee: nobody → Ramprakash R (ramprakash)
information type: Proprietary → Public

Review in progress for https://review.opencontrail.org/44868
Submitter: Ramprakash R (<email address hidden>)

Review in progress for https://review.opencontrail.org/44869
Submitter: Ramprakash R (<email address hidden>)

Reviewed: https://review.opencontrail.org/44868
Committed: http://github.com/Juniper/contrail-ansible-deployer/commit/d5535df7a28fcf289cd59fd5ae6fc0ff34234be5
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit d5535df7a28fcf289cd59fd5ae6fc0ff34234be5
Author: Ramprakash <email address hidden>
Date: Mon Jul 23 11:39:20 2018 -0700

Support one level of nested dicts in kolla_globals

Change-Id: I442a4d8be63000837c130df0573433967c2cddde
Closes-Bug: #1783146

OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/44869
Committed: http://github.com/Juniper/contrail-ansible-deployer/commit/4da5aeb16a3583139aced38b49e8d50ecb35e021
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 4da5aeb16a3583139aced38b49e8d50ecb35e021
Author: Ramprakash <email address hidden>
Date: Mon Jul 23 11:39:20 2018 -0700

Support one level of nested dicts in kolla_globals

Change-Id: I442a4d8be63000837c130df0573433967c2cddde
Closes-Bug: #1783146

Jeba Paulaiyan (jebap) on 2018-07-24
tags: added: provisioning
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers