Bug 1477158 - Foreman-installer RPM scriplet is not executed
Foreman-installer RPM scriplet is not executed
Status: VERIFIED
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Packaging (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: --
Assigned To: Eric Helms
Chris Roberts
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-01 07:25 EDT by Lukas Zapletal
Modified: 2017-09-13 11:09 EDT (History)
4 users (show)

See Also:
Fixed In Version: katello-3.4.5
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 18818 None None None 2017-08-01 15:56 EDT

  None (edit)
Description Lukas Zapletal 2017-08-01 07:25:12 EDT
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 pm-sat@redhat.com 2017-08-01 16:02:23 EDT
Upstream bug assigned to ehelms@redhat.com
Comment 3 pm-sat@redhat.com 2017-08-08 10:02:25 EDT
Upstream bug assigned to ehelms@redhat.com
Comment 4 pm-sat@redhat.com 2017-08-08 12:02:25 EDT
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 13:03:37 EDT
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 12:14:18 EDT
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 11:08:19 EDT
Retested the upgrade and didn't see the issue, moving to verified.

Note You need to log in before you can comment on or make changes to this bug.