Description of problem: when provisioning with an openstack hot heat template, values that are lists or hashes stay in the ruby format instead of being converted to the json format, causing errors in openstack Version-Release number of selected component (if applicable): 5.7.3 How reproducible: all the time Steps to Reproduce: 1.provision using an openstack hot heat template similar to info in additional info 2. 3. Actual results: fog error : {\"message\": \"Value must be valid JSON: Expecting ':' delimiter: line 1 column 8 (char 7)\", \"traceback\": null, \"type\": \"ValueError\"}, \"title\": \"Bad Request\"}" Expected results: value correctly converted to JSON format and passed to openstack Additional info: sample : private_subnet_spec: type: json label: Subnet Spec description: Subnet prefix and gateway ip. default: cidr: 192.168.1.0/24 gateway_ip: 192.168.1.254 the same happens for lists : dns_nameservers: type: comma_delimited_list label: DNS Name Servers description: Dns name servers for private stand network default: - 172.30.0.14 - 172.30.0.15 gives ["172.30.0.14", "172.30.0.15"] customer followed HOT heat template: https://access.redhat.com/documentation/en/red-hat-cloudforms/4.2/paged/integration-with-aws-cloudformation-and-openstack-heat/
https://github.com/ManageIQ/manageiq-providers-openstack/pull/105
New commit detected on ManageIQ/manageiq-providers-openstack/master: https://github.com/ManageIQ/manageiq-providers-openstack/commit/670beeca1c2935bcb2edadf4fc8f133523acfd04 commit 670beeca1c2935bcb2edadf4fc8f133523acfd04 Author: Bill Wei <bilwei> AuthorDate: Thu Sep 28 15:16:05 2017 -0400 Commit: Bill Wei <bilwei> CommitDate: Tue Oct 3 16:11:37 2017 -0400 Enhance parameter type handling Better support non-string parameter types including comma-delimited-list, number, boolean https://bugzilla.redhat.com/show_bug.cgi?id=1489908 .../openstack/cloud_manager/orchestration_stack.rb | 16 +++ .../cloud_manager/orchestration_template.rb | 137 ++++++++++++++++++--- .../orchestration_templates/heat_parameters.json | 89 ++++++++++++- .../orchestration_templates/heat_parameters.yml | 61 ++++++--- .../cloud_manager/orchestration_stack_spec.rb | 10 ++ .../cloud_manager/orchestration_template_spec.rb | 115 +++++++++++------ 6 files changed, 357 insertions(+), 71 deletions(-)
The problem had to do with the default values showing on the dialog. For both JSON and Array types a TextBox was used, and their default values were shown in a Ruby format. The following fixes have been merged into upstream master 1) For both JSON and Array types, now a TextBoxArea is used 2) For Array type, default values are broken into multiple lines, one entry per line 3) For JSON type, default value is shown in true JSON format in multiple lines. However these fixes will NOT be back ported to prior releases because we have refactored orchestration template classes and dialog generators and moved them to different repositories. There is a workaround for customers using prior releases. They only need to edit the value in TextBox to a proper format: 1) For Array type, a comma delimited string should be used, for example, 172.30.0.14,172.30.0.15 2) For JSON type, a JSON string should be used, for example, {"cidr":"192.168.1.0/24", "gateway_ip":"192.168.1.254"} Our TextBox has length limit so it may not be able to accept a long JSON string. User can then convert the TextBox into a TextBoxArea. Doc team should document the change for next release.
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/RHSA-2018:0380