Bug 1477158

Summary: Foreman-installer RPM scriplet is not executed
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: PackagingAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Chris Roberts <chrobert>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, chrobert, ehelms, jcallaha
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-3.4.5 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 Zapletal 2017-08-01 11:25:12 UTC
While upgrading I see:

warning: %post(foreman-installer-1:1.15.2-1.el7sat.noarch) scriptlet failed, exit status 27
Non-fatal POSTIN scriptlet failure in rpm package 1:foreman-installer-1.15.2-1.el7sat.noarch

What causes it:

[root@winter ~]# rpm -q --scripts foreman-installer
postinstall scriptlet (using /bin/sh):
foreman-installer --scenario foreman --migrations-only > /dev/null

Unfortunately the installer prints errors to STDOUT, therefore they are swallowed. Running it manually reveals the root cause:

[root@winter ~]# foreman-installer --scenario foreman --migrations-only
ERROR: Selected scenario is DISABLED, can not continue.
       Use --list-scenarios to list available options.
       You can also --enable-scenario SCENARIO to make the selected scenario available.

I guess we need to change that to "satellite" perhaps?

Comment 2 Satellite Program 2017-08-01 20:02:23 UTC
Upstream bug assigned to ehelms

Comment 3 Satellite Program 2017-08-08 14:02:25 UTC
Upstream bug assigned to ehelms

Comment 4 Satellite Program 2017-08-08 16:02:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18818 has been resolved.

Comment 5 Chris Roberts 2017-09-06 17:03:37 UTC
Still showing foreman:

[root@rhel7 ~]# rpm -q --scripts foreman-installer
postinstall scriptlet (using /bin/sh):
foreman-installer --scenario foreman --migrations-only > /dev/null

Comment 6 Eric Helms 2017-09-08 16:14:18 UTC
Chris,

In your verification output you did not address whether or not you see the actual error output the BZ is reporting. Can you re-verify this by checking if you see:

warning: %post(foreman-installer-1:1.15.2-1.el7sat.noarch) scriptlet failed, exit status 27
Non-fatal POSTIN scriptlet failure in rpm package 1:foreman-installer-1.15.2-1.el7sat.noarch


When doing the yum upgrade?

The output you posted:

[root@rhel7 ~]# rpm -q --scripts foreman-installer
postinstall scriptlet (using /bin/sh):
foreman-installer --scenario foreman --migrations-only > /dev/null

Is entirely expected and not error output.

Comment 7 Chris Roberts 2017-09-13 15:08:19 UTC
Retested the upgrade and didn't see the issue, moving to verified.

Comment 8 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