Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3664

Invalid metadata.json in module root causes Error 400

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Coremunity

      Description

      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>:

      {
        "name": "OSS-OSS",
        "author": "",
        "license": "",
        "version": "1.0.0",
        "types": [
       
        ],
        "checksums": "",
        "source": ""
      }
      

      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:

      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
      

      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.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                redmine.exporter redmine.exporter
                QA Contact:
                Erik Dasher
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: