Bug 1381081

Summary: satellite installer using puppet4 fails with Kafo::ParserError
Product: Red Hat Satellite Reporter: Lukas Pramuk <lpramuk>
Component: InstallationAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: high    
Version: 6.3.0CC: ahumbe, bbuckingham, cduryee, ehelms, ktordeur, mhorga, redhat, stbenjam
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Pramuk 2016-10-02 20:38:50 UTC
Description of problem:
satellite installer using puppet4 fails with "No Puppet module parser is installed and no cache of the file /usr/share/katello-installer-base/modules/certs/manifests/init.pp is available. Please check debug logs and install optional dependencies for the parser. (Kafo::ParserError)"

Version-Release number of selected component (if applicable):
satellite-installer-6.3.0-1.el7sat.noarch
katello-installer-base-3.2.0-2.rc1.el7.noarch
rubygem-kafo-0.9.6-1.el7.noarch

How reproducible:
katello-installer-base-3.2.0-2.rc1.el7.noarch

Steps to Reproduce:
1. Install Puppet v4
# yum install puppetserver

2. Install Satellite rpms
# yum install satellite 

3. Run satellite-installer using puppet v4
# puppet -V
4.7.0

# satellite-installer -S satellite -v
/usr/share/gems/gems/kafo-0.9.6/lib/kafo/puppet_module.rb:69:in `parse': No Puppet module parser is installed and no cache of the file /usr/share/katello-installer-base/modules/certs/manifests/init.pp is available. Please check debug logs and install optional dependencies for the parser. (Kafo::ParserError)
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/configuration.rb:89:in `block in modules'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/configuration.rb:89:in `map'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/configuration.rb:89:in `modules'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/configuration.rb:189:in `params'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/configuration.rb:199:in `preset_defaults_from_puppet'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/kafo_configure.rb:266:in `set_parameters'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/kafo_configure.rb:99:in `initialize'
	from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `new'
	from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
	from /usr/share/gems/gems/kafo-0.9.6/lib/kafo/kafo_configure.rb:154:in `run'
	from /usr/sbin/satellite-installer:8:in `<main>'


Actual results:
installer fails with Kafo::ParserError

Expected results:
installer runs successfully

Comment 3 Chris Duryee 2016-10-04 18:37:33 UTC
As a workaround, you can do:

# /opt/puppetlabs/puppet/bin/gem install yard
# /opt/puppetlabs/bin/puppet module install puppetlabs-strings

Comment 5 Lukas Pramuk 2017-01-02 13:44:39 UTC
Created redmine issue http://projects.theforeman.org/issues/17888 from this bug

Comment 6 Lukas Pramuk 2017-01-31 08:17:09 UTC
#17888 was closed as a dupe of http://projects.theforeman.org/issues/17710

Comment 7 Ashish Humbe 2017-03-02 14:52:29 UTC
(In reply to Chris Duryee from comment #3)
> As a workaround, you can do:
> 
> # /opt/puppetlabs/puppet/bin/gem install yard
> # /opt/puppetlabs/bin/puppet module install puppetlabs-strings

After installing puppetlabs-strings module I had to run below command to fix the issue with installer 

# puppet resource package puppet-strings provider=puppet_gem

Comment 8 Stephen Benjamin 2017-03-02 15:19:15 UTC
Hi hi - just a note, the only step now is to insatll the puppet-strings gem.  The puppetlabs-string puppet module is now deprecated.

Comment 9 mhorga 2017-03-15 15:26:13 UTC
I tried to do it both ways, with puppetlabs-strings installed and without it, but I still get this error:

# satellite-installer -S satellite -v
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- kafo (LoadError)
	from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /sbin/satellite-installer:3:in `<main>'

I wonder what am I missing here...

Comment 10 Lukas Pramuk 2017-08-08 11:55:16 UTC
VERIFIED.

@satellite-6.3.0-16.0.beta.el7sat.noarch
puppet-agent-1.8.2-2.el7sat.x86_64
puppet-agent-oauth-0.5.1-2.el7sat.noarch
puppetserver-2.7.2-2.el7sat.noarch
rubygem-kafo-2.0.0-1.el7sat.noarch

# satellite-installer -S satellite ...
...
  Success!
  * Katello is running at https://sat4.example.com
      Initial credentials are admin / changeme
  * To install an additional Foreman proxy on separate machine continue by running:

      foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar"

  The full log is at /var/log/foreman-installer/satellite.log

>>> satellite installs successfully using puppet4

Comment 11 Satellite Program 2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336