[Openstack] Heat: error in templates related with JSON

magicboiz at hotmail.com magicboiz at hotmail.com
Thu Apr 28 08:23:49 UTC 2016


Hi


I've setup an small lab based on Liberty (FUEL 8.0), and started to test 
some heat-templates:

/git clone https://github.com/openstack/heat-templates.git/

I've detected that all resources type "OS::Heat::SoftwareConfig" which 
have references to external files like "config: { get_file: 
db_install.sh }" aren't accepted by the heat server with an error 
related with JSON:

/[user1 at linux wordpress]$openstack orchestration template validate -t 
WordPress_software-config_2-instances.yaml //
//b"#!/bin/bash -v\n\nyum -y install mariadb mariadb-server\ntouch 
/var/log/mariadb/mariadb.log\nchown mysql.mysql 
/var/log/mariadb/mariadb.log\nsystemctl start mariadb.service\n\n# Setup 
MySQL root password and create a user\nmysqladmin -u root password 
$db_rootpassword\ncat << EOF | mysql -u root 
--password=$db_rootpassword\nCREATE DATABASE $db_name;\nGRANT ALL 
PRIVILEGES ON $db_name.* TO '$db_user'@'%'\nIDENTIFIED BY 
'$db_password';\nFLUSH PRIVILEGES;\nEXIT\nEOF\n" is not JSON serializable/


It looks like the engine isn't able to serialize the content of the 
referenced files.....

Any ideas? Thanks in advance

J.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160428/2d7d0c20/attachment.html>


More information about the Openstack mailing list