jhoblitt / puppet-ganglia

Manages ganglia gmond & gmetad daemons + web front end
Other
12 stars 34 forks source link

validate_string fails for integer #28

Closed NoodlesNZ closed 9 years ago

NoodlesNZ commented 9 years ago

When running ganglia::web with the defaults it produces this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 8652 is not a string. It looks to be a Fixnum on node ganglia.example.com

It looks like in future parser it is more strict and $ganglia_port = 8652 fails validate_string().

jhoblitt commented 9 years ago

Did it give you a line number? I'm not surprised by the future parser failing on it but I don't understand why the future parser runs in the travis matrix aren't failing at that point.

NoodlesNZ commented 9 years ago

Does travis use future parser and future evaluator? Things are a little vague, but it seems that it evaluates bare word numbers as Fixnum. This can be worked around by setting --evaluator=current

NoodlesNZ commented 9 years ago

Actually I think --evaluator was removed recently.

If you want to test this out you can use the following as test.pp:

$var = 123
validate_string($var)

and run puppet apply --parser future test.pp It should error out

If you change $var = 123 to $var = "123" then that should pass the validate_string() check

I'm still not sure why travis doesn't pick this up

NoodlesNZ commented 9 years ago

Have added a PR #32 to address this

jhoblitt commented 9 years ago

32 has been merged.