cloudsmith/geppetto — Issue #233: complex interpolation hangs parser
Author: hlindberg
Created: 2011-11-15 14:08:36+00:00
State: open
Labels: major

From issue #232

OK, I traced the issue to a single line in a module's manifest.

It contains a really long line; if I try to open this file in Geppetto it hangs.

If I comment out this line using VIM and then open it in Geppetto, it loads properly. Also, building the project works if the line is commented.

define postgresql::dbcreatefunapp ($env , $passwordenv='' , $password_qlikview='' , $password='' , $conntype="host" , $address='10.1.0.0/16' , $auth_method="md5" , $auth_options="" , $usertype="nosuperuser") {
exec { "role$name":
user => "${postgresql::params::processuser}",
unless => "echo \\dg | psql | grep $name 2>/dev/null",
command => "echo \"CREATE ROLE ${name}crud_role valid until 'infinity'; CREATE ROLE ${name}_select_role valid until 'infinity'; CREATE ROLE ${name}${env} LOGIN PASSWORD '${passwordenv}' CREATEROLE VALID UNTIL 'infinity'; GRANT ${name}_crud_role TO ${name}${env} WITH ADMIN OPTION; GRANT ${name}select_role TO ${name}${env} WITH ADMIN OPTION; CREATE DATABASE ${name}${env} WITH ENCODING='UTF8' OWNER= ${name}${env} CONNECTION LIMIT=-1; CREATE ROLE ${name} LOGIN PASSWORD '${password}' VALID UNTIL 'infinity'; GRANT ${name}crud_role TO ${name} WITH ADMIN OPTION; GRANT ${name}_select_role TO ${name} WITH ADMIN OPTION; CREATE ROLE qlikview LOGIN PASSWORD '${password_qlikview}' VALID UNTIL 'infinity'; GRANT ${name}_select_role TO qlikview; \" | /usr/bin/psql && echo \"CREATE LANGUAGE plpgsql; \" | /usr/bin/psql ${name}${env}",
require => Service["postgresql"],
}

As you might have guessed; the 'command' line is the culprit.