vrouter gateway should be set if instances has gateway vars set in topology.yml

Bug #1786860 reported by Senthilnathan Murugappan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
High
Sanju Abraham
Trunk
Fix Committed
High
Sanju Abraham

Bug Description

Currently for gateway role alone we look at the gateway var of instances dict and update the contrail_configuration section where as this should be applicable for all instances in OnPrem.

Proposed patch is as below.

diff --git a/transform/generate_inventories.py b/transform/generate_inventories.py
index 52c28de..b416cb8 100755
--- a/transform/generate_inventories.py
+++ b/transform/generate_inventories.py
@@ -266,11 +266,9 @@ class Inventory(object):
                     'VROUTER_AGENT__DEFAULT__gateway_mode': 'server',
                     'PHYSICAL_INTERFACE': instance.interface
                 }
- if instance.provider == 'onprem' and hasattr(instance, 'gateway') and instance.gateway:
- entry['contrail_configuration'].update({'VROUTER_GATEWAY': instance.gateway})
- else:
- entry['contrail_configuration'].update({'VROUTER_GATEWAY': str(network[1])})
-
+ entry['contrail_configuration'].update({'VROUTER_GATEWAY': str(network[1])})
+ if instance.provider == 'onprem' and hasattr(instance, 'gateway') and instance.gateway:
+ entry['contrail_configuration'].update({'VROUTER_GATEWAY': instance.gateway})

             _instances[instance.name] = entry
             # TODO

tags: added: beta-blocker releaseblocker
Revision history for this message
Sanju Abraham (asanju) wrote :

Senthil,

contrail-multi-cloud is not intended to provision any other roles onprem other than the gateway for extending the fabric.

The gateway var for gateway in onprem is the only role that is applicable in the current context.

I am marking this bug as invalid. Please let me know if you need to discuss this further.

Revision history for this message
Senthilnathan Murugappan (msenthil) wrote :

msenthil [23:18]
@sanju multicloud does create contrail_config.yml which is fed to contrail-ansible-deployer. contrail_config.yml was not created properly hence ansible-deployer doesnt populate the values correct so vrouter-agent fails to comes up…
Assuming i have two computes in two different subnets in onprem, one being 192.168.3.0 and other 192.168.4.0 and i have respective .254 as gateways i dont have an option to set vrouter_gateway per subnet/instance either in topology.yml or common.yml

sanju [23:41]
@msenthil - We do not support provisioning computes onprem. That has to be with contrail-ansible-deployer (contrail-fabric use case).
contrail-multi-cloud only extends the cluster provisioned and managed by contrail-fabric to the public cloud

msenthil [23:43]
yup but we still need to provide those computes in topology.yml with provision set to false and those computes are also subject to deploy.yml hence the vrouter-gateway gets reset
@sanju

sanju [23:46]
with the provison set to false, it should not do anything on those..

msenthil [23:46]
deploy.yml still does try to deploy those nodes
you may refer the generated inventory and contrail_config at 10.84.7.18

sanju [23:48]
I will look at it, with provision set to false it should not do anything.
The functionality for gateway var was introduced for the onprem GW only
There are other things that we need to consider if contrail-multi-cloud needs support autogeneration for onprem roles (other than GW)

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.