Bug 2173570

Summary: Installer fails in upgrade with "No Puppet module parser is installed and no cache of the file /usr/share/foreman-installer/modules/foreman/manifests/compute/gce.pp is available"
Product: Red Hat Satellite Reporter: Gaurav Talreja <gtalreja>
Component: InstallationAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: egolov, ehelms
Target Milestone: 6.13.0Keywords: Regression, Triaged, UpgradeBlocker, WorkAround
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: satellite-installer-6.13.0.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:25:13 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:
Bug Depends On:    
Bug Blocks: 2163425    

Description Gaurav Talreja 2023-02-27 09:35:04 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Satellite 6.13.0 Snap13 

How reproducible:


Steps to Reproduce:
1. Setup 6.12 with ohsnap repos of 6.13 and update rubygem-foreman_maintain
2. # foreman-maintain upgrade run --target-version 6.13 --whitelist="repositories-validate,repositories-setup"
...
--------------------------------------------------------------------------------
Procedures::Installer::Upgrade: /usr/share/gems/gems/kafo-6.5.0/lib/kafo/puppet_module.rb:70:in `parse': No Puppet module parser is installed and no cache of the file /usr/share/foreman-installer/modules/foreman/manifests/compute/gce.pp is available. Please check debug logs and install optional dependencies for the parser. (Kafo::ParserError)
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:133:in `block in modules'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:133:in `map'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/configuration.rb:133:in `modules'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:253:in `modules'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:257:in `module'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hook_context.rb:113:in `module_present?'
	from /usr/share/foreman-installer/hooks/boot/20-certs_update.rb:2:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hooking.rb:36:in `instance_eval'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hooking.rb:36:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hook_context.rb:19:in `instance_eval'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hook_context.rb:19:in `execute'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hooking.rb:67:in `block in execute'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hooking.rb:65:in `each'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/hooking.rb:65:in `execute'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:140:in `initialize'
	from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
	from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	from /usr/share/gems/gems/kafo-6.5.0/lib/kafo/kafo_configure.rb:50:in `run'
	from /usr/sbin/satellite-installer:8:in `<main>'
                                      [FAIL]
Failed executing satellite-installer, exit status 1
--------------------------------------------------------------------------------
...

Actual results:
Upgrade fails with mentioned error

Expected results:
Upgrade to 6.13 complete successfully

Additional info:

Comment 3 Lukas Pramuk 2023-02-27 10:04:02 UTC
Workaround:

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

And re-running satellite-maintain again

Comment 4 Evgeni Golov 2023-02-27 10:12:32 UTC
Workaround:

# sed -i '/gce/d' /etc/foreman-installer/scenarios.d/satellite-answers.yaml

Comment 6 Gaurav Talreja 2023-03-02 17:37:56 UTC
Verified.

Tested upgrade from Satellite 6.12.2 to 6.13.0 Snap 13.0
Version: 
satellite-installer-6.13.0.7-1.el8sat.noarch
rubygem-foreman_maintain-1.2.6-1.el8sat.noarch

Steps:
1. # foreman-maintain upgrade run --target-version 6.13 --whitelist="repositories-validate,repositories-setup"

Observation:
Upgrade to Satellite 6.13 completed successfully, Post-upgrade, GCE CR is working as before.

Comment 9 errata-xmlrpc 2023-05-03 13:25:13 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 (Important: Satellite 6.13 Release), 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-2023:2097