if one env. file contains:
resource_registry:
OS::TripleO::Controller::Net::SoftwareConfig: /home/stack/composable_roles/network/nic-configs/controller.yaml
OS::TripleO::Compute::Net::SoftwareConfig: /home/stack/composable_roles/network/nic-configs/compute.yaml
(undercloud) [stack@undercloud-0 ~]$ ./deploy_isol.sh
Removing the current plan files
Uploading new plan files
Plan updated.
Processing templates in the directory /tmp/tripleoclient-shih9uld/tripleo-heat-templates
Exception occured while running the command
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 29, in run
super(Command, self).run(parsed_args)
File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run
return_code = self.take_action(parsed_args) or 0
File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 910, in take_action
self._deploy_tripleo_heat_templates_tmpdir(stack, parsed_args)
File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 365, in _deploy_tripleo_heat_templates_tmpdir
new_tht_root, tht_root)
File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 468, in _deploy_tripleo_heat_templates
deployment_options=deployment_options)
File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 485, in _try_overcloud_deploy_with_compat_yaml
deployment_options=deployment_options)
File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 217, in _heat_deploy
stack_name, files, tht_root)
File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 333, in _upload_missing_files
files_dict[orig_path], link_replacement)
File "/usr/lib/python3.6/site-packages/tripleoclient/utils.py", line 883, in replace_links_in_template_contents
return yaml.safe_dump(template)
File "/usr/lib64/python3.6/site-packages/yaml/__init__.py", line 216, in safe_dump
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
File "/usr/lib64/python3.6/site-packages/yaml/__init__.py", line 188, in dump_all
dumper.represent(data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 26, in represent
node = self.represent_data(data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 47, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 205, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 116, in represent_mapping
node_value = self.represent_data(item_value)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 47, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 205, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 116, in represent_mapping
node_value = self.represent_data(item_value)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 47, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 205, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 116, in represent_mapping
node_value = self.represent_data(item_value)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 57, in represent_data
node = self.yaml_representers[None](self, data)
File "/usr/lib64/python3.6/site-packages/yaml/representer.py", line 229, in represent_undefined
raise RepresenterError("cannot represent an object: %s" % data)
yaml.representer.RepresenterError: cannot represent an object: <map object at 0x7fbc15404198>
cannot represent an object: <map object at 0x7fbc15404198>
I think the issue is related to the "default" definitions in the attached files/templates.
Looking for example at:
TenantInterfa ceRoutes: :'10.0. 0.0/16' , 'nexthop' :'10.0. 0.1'}]
default: []
description: >
Routes for the tenant network traffic.
JSON route e.g. [{'destination'
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
this gets translated into:
'TenantInterfac eRoutes' : {'default': <map object at 0x7f84f97a9f60>, 'description': "Routes for the tenant network traffic. JSON route e.g. [{'destination' :'10.0. 0.0/16' , 'nexthop' :'10.0. 0.1'}] Unless the default is changed, the parameter is automatically resolved from the subnet host_routes attribute.\n", 'type': 'json'},
Things go sideways when doing a safe_dump in /usr/lib/ python3. 6/site- packages/ tripleoclient/ utils.py
def replace_ links_in_ template_ contents( contents, link_replacement):
"""Replace get_file and type file links in Heat template contents
If the string contents passed in is a Heat template, scan the replacement are from/to, respectively.)
template for 'get_file' and 'type' occurrences, and replace the
file paths according to link_replacement dict. (Key/value in
link_
If the string contents don't look like a Heat template, return the
contents unmodified.
"""
template = {} load(contents)
try:
template = yaml.safe_
except yaml.YAMLError:
return contents
if not (isinstance( template, dict) and
template. get('heat_ template_ version' )):
return contents
template = replace_ links_in_ template( template, link_replacement)
return yaml.safe_ dump(template)