github/octocatalog-diff

Receiving `Could not find class` for puppet forge modules

BarnumD opened this issue · 3 comments

Some background: I'm trying to configure ocd for the first time to test an upgrade of puppet from 4->5 and a refactor of some puppet code therein. One of the first changes I'm making is upgrading modules in the Puppetfile to new versions.

Using Ubuntu on windows (windows subsystem for linux), I installed ocd and all it's dependencies onto my machine. I created a .octocatalog-diff.cfg.rb and made sure I had a hiera.yaml file in place. When I run octocatalog-diff -n node.domain.com, i'm getting an error:
Error: Evaluation Error: Error while evaluating a Method call, Could not find class ::resolv_conf for node.domain.com

Now, resolv_conf is a puppet forge module that's included via a hiera file with classes: -resolv_conf. Does octocatalog-diff deal with modules from the forge? I've tried installing the module via puppet module install saz-resolv_conf --version 3.3.0 but that didn't seem to help.

Ubuntu 16.04 on windows subsystem for Linux.
ruby 2.3.1p112
puppet-agent 5.5.0
octocatalog-diff 1.5.3

  • Your version of octocatalog-diff:

@BarnumD octocatalog-diff does not run r10k or librarian-puppet for you. if you have a Puppetfile you need to provide some sort of bootstrap script (--bootstrap-script)

maybe the part A bootstrap script to run r10k on my Puppetfile and to symlink local modules to the common modules dir (see below) of https://maljaars-it.nl/2016/11/validating-puppet-code-changes-using-octocatalog-diff/ might give you some clues.

That did help when I ran the r10k puppetfile install Puppetfile for i in site/*; do BLA="echo $i |sed -e 's#site/##'"; ln -s ../site/$BLA modules/$BLA; done code from that link manually. However, It doesn't seem to be executing with --bootstrap-script. Even with --debug --debug-bootstrap on it says it's successfully copying the bootstrap script to the tmp folder and it says begin bootstrap with .octocatalog-bootstrap.sh but I see no evidence that it did anything.

I suggest trying with --no-parallel since sometimes output can get eaten as it tries to launch the two parallel scripts. This will make it run 2x slower (since it will compile the old and new catalogs one after the other, instead of at the same time) but this can be handy for debugging.

I also suggest that you have .octocatalog-bootstrap.sh start with -x for further debugging, e.g.:

#!/bin/bash -x