Bug 1154170

Summary: katello-installer fails if files with a .pp extension are found in the working directory that katello-installer is invoked from.
Product: Red Hat Satellite Reporter: Rich Jerrido <rjerrido>
Component: InstallationAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Stephen Benjamin <stbenjam>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.4CC: ahumbe, dcleal, egolov, hjensas, kshirsal, mjs, stbenjam, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/7288
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:45:44 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 Rich Jerrido 2014-10-17 18:04:03 UTC
Description of problem:

katello-installer fails if files with a .pp extension are found in the working directory that katello-installer is invoked from. 

Version-Release number of selected component (if applicable):
katello-installer-0.0.64-1.el6sat.noarch

How reproducible:
100%

Steps to Reproduce:
[root@satellite ~]# cd ~
[root@satellite ~]# echo foobar > baz.pp
[root@satellite ~]# katello-installer --help



Actual results:

/usr/lib/ruby/site_ruby/1.8/puppet/parser/parser_support.rb:157:in `on_error': Could not parse for environment production: Syntax error at end of file at /root/baz.pp:2 (Puppet::Error)
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `_racc_yyparse_c'
	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/lexer.rb:522:in `scan'
	from /usr/lib/ruby/1.8/racc/parser.rb:152:in `_racc_yyparse_c'
	from /usr/lib/ruby/1.8/racc/parser.rb:152:in `__send__'
	from /usr/lib/ruby/1.8/racc/parser.rb:152:in `yyparse'
	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/parser_support.rb:168:in `parse'
	from /usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:536:in `perform_initial_import'
	from /usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:534:in `map'
	from /usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:534:in `perform_initial_import'
	from /usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:255:in `known_resource_types'
	from /usr/lib/ruby/site_ruby/1.8/puppet/resource/type_collection_helper.rb:5:in `known_resource_types'
	from /usr/lib/ruby/site_ruby/1.8/puppet/parser/parser_support.rb:120:in `import'
	from /usr/lib/ruby/gems/1.8/gems/kafo_parsers-0.0.3/lib/kafo_parsers/puppet_module_parser.rb:38:in `initialize'
	from /usr/lib/ruby/gems/1.8/gems/kafo_parsers-0.0.3/lib/kafo_parsers/puppet_module_parser.rb:16:in `new'
	from /usr/lib/ruby/gems/1.8/gems/kafo_parsers-0.0.3/lib/kafo_parsers/puppet_module_parser.rb:16:in `parse'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/puppet_module.rb:44:in `parse'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/configuration.rb:84:in `modules'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/configuration.rb:84:in `map'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/configuration.rb:84:in `modules'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:170:in `modules'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:152:in `params'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:185:in `set_parameters'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:66:in `initialize'
	from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `new'
	from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:116:in `run'
	from /usr/sbin/katello-installer:9


Expected results:
katello-installer runs normally & without error. 

Additional info:
.pp files are commonly used for SELinux policy files. In this usage, the end-user had a file in their homedir, which exposed this error.

Comment 1 RHEL Program Management 2014-10-17 18:22:51 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Dominic Cleal 2014-10-22 08:50:42 UTC
Created redmine issue http://projects.theforeman.org/issues/8023 from this bug

Comment 4 Marek Hulan 2016-02-24 13:21:12 UTC
Fixed in upstream kafo_parsers 0.0.5

Comment 6 Stephen Benjamin 2016-03-24 17:41:29 UTC
Verified:

  [root@sat-r220-06 ~]# cd ~
  [root@sat-r220-06 ~]# echo foobar > baz.pp
  [root@sat-r220-06 ~]# foreman-installer --help  
  Usage:
      foreman-installer [OPTIONS]

  Options:
  [...snip...]

Comment 9 errata-xmlrpc 2016-07-27 08:45:44 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/RHBA-2016:1500

Comment 10 Stephen Benjamin 2016-08-03 15:22:16 UTC
*** Bug 1283787 has been marked as a duplicate of this bug. ***