vrouter_interface_route playbook bails out if provision set to False for controller instance

Bug #1785954 reported by Senthilnathan Murugappan on 2018-08-08
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
Critical
Damian Rakowski
Trunk
Fix Committed
Critical
Damian Rakowski

Bug Description

vrouter_interface_route.yml bails out with the below error.
I had provision set to False for the controller node since its already provisioned so the generated contrail_config.yml doesnt have control role set for controller node.

            if 'controller' in instance.roles and instance.provision:
                roles = {role: {} for role in [
                    'config_database', 'config', 'control', 'webui',
                    'analytics', 'analytics_database']}
                entry['roles'].update(roles)

TASK [software/facts : Find host controller] *************************************************************************************************************************************************************
skipping: [192.168.2.1] => (item={'key': u'192.168.2.1', 'value': {u'roles': {u'vrouter': {}}, u'ip': u'192.168.2.1', u'instance_name': u'192.168.2.1', u'contrail_configuration': {u'VROUTER_GATEWAY': u'192.168.2.254', u'PHYSICAL_INTERFACE': u'bond0', u'VROUTER_AGENT__DEFAULT__gateway_mode': u'server'}, u'provider': u'bms', u'private_ip': u'192.168.2.1'}})
skipping: [192.168.2.1] => (item={'key': u'172.16.23.5', 'value': {u'roles': {u'vrouter': {}}, u'ip': u'172.16.23.5', u'instance_name': u'172.16.23.5', u'contrail_configuration': {u'VROUTER_GATEWAY': u'172.16.23.1', u'PHYSICAL_INTERFACE': u'eth1', u'VROUTER_AGENT__DEFAULT__gateway_mode': u'server'}, u'provider': u'bms', u'private_ip': u'172.16.23.5'}})
skipping: [192.168.2.1] => (item={'key': u'172.16.23.4', 'value': {u'instance_name': u'172.16.23.4', u'ip': u'172.16.23.4', u'private_ip': u'172.16.23.4', u'roles': {u'vrouter': {}, u'k8s_node': {}}, u'provider': u'bms'}})
skipping: [192.168.2.1] => (item={'key': u'172.16.23.6', 'value': {u'instance_name': u'172.16.23.6', u'ip': u'172.16.23.6', u'private_ip': u'172.16.23.6', u'roles': {u'vrouter': {}, u'k8s_node': {}}, u'provider': u'bms'}})
skipping: [192.168.2.1] => (item={'key': u'192.168.1.3', 'value': {u'instance_name': u'192.168.1.3', u'ip': u'192.168.1.3', u'private_ip': u'192.168.1.3', u'roles': {u'vrouter': {}, u'k8s_node': {}}, u'provider': u'bms'}})
skipping: [192.168.2.1] => (item={'key': u'192.168.1.2', 'value': {u'instance_name': u'192.168.1.2', u'ip': u'192.168.1.2', u'private_ip': u'192.168.1.2', u'roles': {u'vrouter': {}, u'k8s_node': {}}, u'provider': u'bms'}})
skipping: [192.168.2.1] => (item={'key': u'192.168.1.1', 'value': {u'instance_name': u'192.168.1.1', u'ip': u'192.168.1.1', u'private_ip': u'192.168.1.1', u'roles': {u'k8s_master': {}, u'kubemanager': {}}, u'provider': u'bms'}})

TASK [software/facts : Show host controller] *************************************************************************************************************************************************************
fatal: [192.168.2.1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'controller' is undefined\n\nThe error appears to have been in '/root/multicloud/ansible/contrail/playbooks/roles/software/facts/tasks/main.yml': line 28, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Show host controller\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'controller' is undefined"}
        to retry, use: --limit @/root/multicloud/ansible/contrail/playbooks/vrouter_interface_route.retry

summary: - vrouter_interface_route playbook bails out
+ vrouter_interface_route playbook bails out if provision set to False for
+ controller instance
Changed in juniperopenstack:
assignee: nobody → Paweł Kopka (pkopka)
assignee: Paweł Kopka (pkopka) → nobody
Jeba Paulaiyan (jebap) on 2018-08-08
tags: added: releaseblocker
Damian Rakowski (attil) wrote :

Fix is in a pull request on GitHub

Damian Rakowski (attil) wrote :

This bug was caused by not setting Contrail roles to a controller host and provision is set to False. The fix should make it so contrail config contains proper roles in all cases, even if provision is set to False.

If contrail-ansible-deployer is idempotent, it should be ok.

This fix can be found here: https://github.com/Juniper/contrail-multi-cloud/pull/188

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers