Issue #20728 has been reported by Jeff Field.

----------------------------------------
Bug #20728: Invalid metadata.json in module root causes Error 400
https://projects.puppetlabs.com/issues/20728

* Author: Jeff Field
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: modules
* Target version: 
* Affected Puppet version: 3.1.1
* Keywords: 
* Branch: 
----------------------------------------
The other day I <a href="https://github.com/jefffield/puppet-cdh3";>forked</a> a 
<a href="https://github.com/sergei-koren/puppet-Cloudera";>module from 
github</a> that I had used a while back but had not been updated in some time.

Within their module is <a 
href="https://github.com/sergei-koren/puppet-Cloudera/blob/master/modules/ganglia/metadata.json";>this
 file</a>:

<pre><code>
{
  "name": "OSS-OSS",
  "author": "",
  "license": "",
  "version": "1.0.0",
  "types": [

  ],
  "checksums": "",
  "source": ""
}
</code></pre>

At some point, for reasons I could not now tell you, I moved that file out of 
the ganglia module and into the <b>root of my cdh3 module</b>. Little did I 
know how much time it would waste later.

I went about reformatting the module quite a bit, and then finally got to 
testing the code, and consistently came up against this error:

<pre><code>
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class cdh3 for server01.123xyz.com on node server01.123xyz.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
</code></pre>

Various stages of madness set in as I tore things apart trying to find the 
problem. I stack traced, I debugged, I validated my code, I triple checked my 
naming.

So I decided to remove all files but those essential to the function of the 
module, and it started working. So I put the others back, started removing them 
one at a time, and discovered it was all caused by this presumably invalid, but 
structurally correct JSON file.

Obviously the error is mine (lesson learned), but shouldn't this fail in such a 
way it indicates that this is the cause? No where in my searching did I ever 
encounter that file in any log or debugging output.


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to