Bug 1791338
Summary: | THT: custom network VIPs are stored in a hieradata hash called network_virtual_ips, but it's impossible to access the hash's keys with hiera from hieradata | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Andreas Karis <akaris> | ||||||||||
Component: | openstack-tripleo-heat-templates | Assignee: | RHOS Maint <rhos-maint> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Sasha Smolyak <ssmolyak> | ||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | high | ||||||||||||
Version: | 13.0 (Queens) | CC: | aschultz, bbethell, bfournie, dsneddon, hjensas, mburns, rhos-maint | ||||||||||
Target Milestone: | z11 | Keywords: | Triaged, ZStream | ||||||||||
Target Release: | 13.0 (Queens) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | openstack-tripleo-heat-templates-8.4.1-36.el7ost | Doc Type: | If docs needed, set a value | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2020-03-10 11:23:27 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Andreas Karis
2020-01-15 15:10:57 UTC
And from the customer's environment, we get the same: root@controller01 ~]# hiera -c /etc/puppet/hiera.yaml network_virtual_ips {"contrailctl"=>{"index"=>4, "ip_address"=>"192.168.215.12"}, "internalapi"=>{"index"=>1, "ip_address"=>"192.168.212.12"}, "storagectl"=>{"index"=>3, "ip_address"=>"192.168.214.12"}} [root@controller01 ~]# hiera -c /etc/puppet/hiera.yaml network_virtual_ips.contrailctl nil Hi Please can you provide me an update on this bug or when this is planed to be fixed? Kind Regards, Billy Hi Please can you provide me an update on this bug or when this is planed to be fixed? Kind Regards, Billy Hi Please can you provide me an update on this bug or when this is planed to be fixed? Kind Regards, Billy I wonder if dropping hiera is the better approach. If we add the below change in tripleo, L107-L11 of file: templates/openstack-tripleo-heat-templates/docker/services/contrail/contrail-config.yaml can be replaced with: 107 internal_ip: {get_param: ServiceData, net_vip_map, {get_param: [ServiceNetMap, ContrailConfigNetwork]}} diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index cdd2cc0e9..c5ebd4194 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -544,6 +544,7 @@ resources: ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]} ServiceData: net_cidr_map: {get_attr: [NetCidrMapValue, value]} + net_vip_map: {get_attr: [VipMap, net_ip_map]} EndpointMap: {get_attr: [EndpointMapData, value]} DefaultPasswords: {get_attr: [DefaultPasswords, passwords]} RoleName: {{role.name}} Juniper created this file: templates/openstack-tripleo-heat-templates/docker/services/contrail/contrail-config.yaml ~~~ 99 service_config_settings: 100 map_merge: 101 - {get_attr: [ContrailBase, role_data, service_config_settings]} 102 - haproxy: 103 tripleo.contrail_config.haproxy_endpoints: 104 contrail_config: 105 map_merge: 106 - public_ssl_port: 18082 107 internal_ip: 108 str_replace: 109 template: "%{hiera('NETWORK_virtual_ip')}" 110 params: 111 NETWORK: {get_param: [ServiceNetMap, ContrailConfigNetwork]} 112 service_port: 8082 113 service_network: {get_param: [ServiceNetMap, ContrailConfigNetwork]} 114 - {get_attr: [ContrailBase, role_data, haproxy_config_settings_api]} ~~~ @Billy, do you have an environment where you can try this out? Would the above change fix your problem? We may consider extending the patch to also include redis and ovn_dbs vip's, i.e: diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index cdd2cc0e9..c5ebd4194 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -544,6 +544,7 @@ resources: ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]} ServiceData: net_cidr_map: {get_attr: [NetCidrMapValue, value]} + net_vip_map: + map_merge: + - {get_attr: [VipMap, net_ip_map]} + - redis: {get_attr: [RedisVirtualIP, ip_address]} + - ovn_dbs: {get_attr: [OVNDBsVirtualIP, ip_address]} EndpointMap: {get_attr: [EndpointMapData, value]} DefaultPasswords: {get_attr: [DefaultPasswords, passwords]} RoleName: {{role.name}} The customer reported that Template validation failed. The deploy.log file contains run this run's log. Created attachment 1654976 [details]
overcloud.j2.yaml
Created attachment 1654978 [details]
deploy.log
Created attachment 1654979 [details]
contrail-config.yaml
contrail-config.yaml: 99 service_config_settings: 100 map_merge: 101 - {get_attr: [ContrailBase, role_data, service_config_settings]} 102 - haproxy: 103 tripleo.contrail_config.haproxy_endpoints: 104 contrail_config: 105 map_merge: 106 - public_ssl_port: 18082 107 internal_ip: {get_param: ServiceData, net_vip_map, {get_param: [ServiceNetMap, ContrailConfigNetwork]}} 108 service_port: 8082 109 service_network: {get_param: [ServiceNetMap, ContrailConfigNetwork]} 110 - {get_attr: [ContrailBase, role_data, haproxy_config_settings_api]} 111 contrail_env_file: &contrail_env_file 112 "/etc/contrail/common_config.env" 113 docker_config: 114 step_2: Error message: 'OS::TripleO::Services::SkydiveAgent', 'OS::TripleO::Services::SkydiveAnalyzer', 'OS::TripleO::Services::Snmp', 'OS::TripleO::Services::Sshd', 'OS::TripleO::Services::Tacker', 'OS::TripleO::Services::Timezone', 'OS::TripleO::Services::TripleoFirewall', 'OS::TripleO::Services::TripleoPackages', 'OS::TripleO::Services::Tuned', 'OS::TripleO::Services::Zaqar', 'OS::TripleO::Services::Ptp'], 'default_route_networks': ['MgmtCtl'], 'CountDefault': 1, 'name': 'Controller', 'tags': ['primary', 'controller'], 'networks': ['MgmtCtl', 'InternalApi', 'External', 'StorageCtl', 'ContrailCtl'], 'description': 'Controller role that has all the controler services loaded and handles\ Database, Messaging and Network functions.\ (...) 'OS::TripleO::Services::TripleoFirewall', 'OS::TripleO::Services::TripleoPackages', 'OS::TripleO::Services::Tuned', 'OS::TripleO::Services::Ptp', 'OS::TripleO::Services::ContrailCertmongerUser'], 'description': 'Virtual perf\ ', 'networks': ['MgmtCpt', 'InternalCpt', 'StorageCpt', 'CephCpt', 'ContrailCpt'], 'name': 'hciComputePerfVirtual'}] Waiting for messages on queue 'tripleo' with no timeout. Action tripleo.parameters.update execution failed: Error validating environment for plan overcloud: ERROR: Internal Error Traceback (most recent call last): File \"/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py\", line 166, in _process_incoming res = self.dispatcher.dispatch(message) File \"/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py\", line 220, in dispatch return self._do_dispatch(endpoint, method, ctxt, args) File \"/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py\", line 190, in _do_dispatch result = func(ctxt, **new_args) File \"/usr/lib/python2.7/site-packages/osprofiler/profiler.py\", line 158, in wrapper result = f(*args, **kwargs) File \"/usr/lib/python2.7/site-packages/heat/common/context.py\", line 422, in wrapped return func(self, ctx, *args, **kwargs) File \"/usr/lib/python2.7/site-packages/heat/engine/service.py\", line 1283, in validate_template result.update(stack.get_nested_parameters(filter_parameter)) File \"/usr/lib/python2.7/site-packages/heat/engine/stack.py\", line 1094, in get_nested_parameters params.update(nested.get_nested_parameters(filter_func)) File \"/usr/lib/python2.7/site-packages/heat/engine/stack.py\", line 1094, in get_nested_parameters params.update(nested.get_nested_parameters(filter_func)) File \"/usr/lib/python2.7/site-packages/heat/engine/stack.py\", line 1077, in get_nested_parameters nested = rsrc.get_nested_parameters_stack() File \"/usr/lib/python2.7/site-packages/heat/engine/resources/stack_resource.py\", line 210, in get_nested_parameters_stack child_template = self.child_template() File \"/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py\", line 179, in child_template self.template_url) File \"/usr/lib/python2.7/site-packages/heat/common/template_format.py\", line 116, in parse tpl = simple_parse(tmpl_str, tmpl_url) File \"/usr/lib/python2.7/site-packages/heat/common/template_format.py\", line 79, in simple_parse raise ValueError(msg) ValueError: Error parsing template http://192.168.210.10:8080/v1/AUTH_a5040294aee74ca69f85aa8689477295/overcloud/user-files/home/stack/templates/openstack-tripleo-heat-templates/docker/services/contrail/contrail-config.yaml while constructing a mapping in \"<unicode string>\", line 107, column 36: internal_ip: {get_param: ServiceData, net_vip ... ^ found unacceptable key (unhashable type: 'dict') in \"<unicode string>\", line 107, column 74: ... aram: ServiceData, net_vip_map, {get_param: [ServiceNetMap, Cont ... ^ real\t2m16.056s user\t0m8.529s sys\t0m0.663s", "stderr_lines": ["The disable_upgrade_deployment flag is not set in the roles file. This flag is expected when you have a nova-compute or swift-storage role. Please check the contents of the roles file: [{'ServicesDefault': ['OS::TripleO::Services::Aide', 'OS::TripleO::Services::AodhApi', 'OS::TripleO::Services::AodhEvaluator', 'OS::TripleO::Services::AodhListener', 'OS::TripleO::Services::AodhNotifier', 'OS::TripleO::Services::AuditD', 'OS::TripleO::Services::BarbicanApi', 'OS (...) Created attachment 1654992 [details]
contrail-analytics.yaml
Andreas, I could be mistaken, but I believe there needs to be an additional pair of nested square brackets in Harald's solution, so: If we add the below change in tripleo, L107-L11 of file: templates/openstack-tripleo-heat-templates/docker/services/contrail/contrail-config.yaml can be replaced with: 107 internal_ip: {get_param: ServiceData, net_vip_map, {get_param: [ServiceNetMap, ContrailConfigNetwork]}} Should be: 107 internal_ip: {get_param: [ServiceData, net_vip_map, {get_param: [ServiceNetMap, ContrailConfigNetwork]}]} Can you give that a try? Seems that all's good with that last modification :-) --- #33 (Customer) Make PrivatePrivate Helps Resolution? 0 Created By: SOIYFFIDINE CHEIK OMAR (1/27/2020 11:01 AM) Hello, It works. When do you plan to integrate the following variable? On which version exactly. For inform juniper to use this variable in their template. overcloud.j2.yaml net_vip_map: {get_attr: [VipMap, net_ip_map]} templates/openstack-tripleo-heat-templates/docker/services/contrail/contrail-config.yaml internal_ip: {get_param: [ServiceData, net_vip_map, {get_param: [ServiceNetMap, ContrailConfigNetwork]}]} Regards, Hi, For Juniper to use this variable then Redhat need to release new templates with the new variable. We can change our template only when they release new package. (It will not be possible to use our new template with older templates from RH.) Kind Regards, Billy The patch has merged in upstream master, and I have proposed patches upstream to backport this to Queens. My intention is also to backport this to downstream Red Hat OSP. It will be available in OSP-13 and later releases. I cannot give you a date at this time, but we will update the bug once we have more information. Best Regards, Harald Great! The customer (and I) will surely appreciate it! :-) Thanks, Andreas Hi @Harald Jensås Please let me know once this is back-ported to Queens Kind Regards, Billy Note that this was backported to Queens on 1/28 - https://review.opendev.org/#/c/704286/. Verified that FIV is in 13z11 and regressions pass. The bug itself was verified by customer in Comment 13. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0760 |