Issue #15856 has been reported by Alex Jurkiewicz.

----------------------------------------
Bug #15856: Puppet fails with opaque error message due to metadata.json syntax 
error
https://projects.puppetlabs.com/issues/15856

Author: Alex Jurkiewicz
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Error message is:
    Error 400 on SERVER: Could not parse for environment production: expected 
next name, value pair in object at '}
    '! at /home/puppet/main/manifests/site.pp:3 on node hostname.fqdn

I was getting this error message generated against the second line of my 
site.pp until I made the following change to our Puppet code:
    diff --git a/main/modules/cacti/metadata.json 
b/main/modules/cacti/metadata.json
    index c235951..6fa36c1 100644
    --- a/main/modules/cacti/metadata.json
    +++ b/main/modules/cacti/metadata.json
    @@ -6,5 +6,5 @@
    "puppetversion": "0.24",
    "summary": "Standard Apache module",
    "description": "This module can be used for basic Apache management",
    -  "project_page": "http://www.example42.com";,
    +  "project_page": "http://www.example42.com";
    }}

Our site.pp looks like this.
    import "sites/*.pp"
    import "roles/*.pp"
    
    import "roles/app_server/*.pp"

If I swapped the first and second lines around I received the same error (ie 
with the error indicating the problem was with import "roles/*.pp").

I found the solution here and with Ryan's help on IRC: 
http://projects.puppetlabs.com/issues/4142#note-3

It was introduced after updating 2.7.11 -> 2.7.18. Ryan thought it might be 
related to this change in 2.7.16: "Significantly improve compilation 
performance when using modules"

My ideal fix would be to make the error message more descriptive, not consider 
this trailing comma an error (like 2.7.11), and to not consider an unparseable 
metadata.json a critical error.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to