Bug 1499861

Summary: Running migrations on disabled scenario produces errors in %post script
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bkearney, ehelms, mbacovsk
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-11-01 23:44:32 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 Jan Hutař 2017-10-09 13:39:51 UTC
Description of problem:
Upgrading from snap 18 to satellite-6.3.0-20.0.beta.el7sat.noarch: %post(foreman-installer-1:1.15.5-1.el7sat.noarch) scriptlet failed, exit status 27


Version-Release number of selected component (if applicable):
satellite-6.3.0-20.0.beta.el7sat.noarch
foreman-installer-1.15.5-1.el7sat.noarch


How reproducible:
1 of 1


Steps to Reproduce:
1. Install 6.3.0 snap 18 and configure repos to latest nightly
2. # yum upgrade


Actual results:
[...]
  Updating   : 1:foreman-installer-1.15.5-1.el7sat.noarch                31/64 
warning: %post(foreman-installer-1:1.15.5-1.el7sat.noarch) scriptlet failed, exit status 27
Non-fatal POSTIN scriptlet failure in rpm package 1:foreman-installer-1.15.5-1.el7sat.noarch
  Updating   : katello-client-bootstrap-1.4.2-1.el7sat.noarch
[...]


Expected results:
There should not be any failure in scriptlets


Additional info:
Maybe the problem is only in that "foreman" vs. "satellite"?

# rpm -q --scripts foreman-installer
postinstall scriptlet (using /bin/sh):
foreman-installer --scenario foreman --migrations-only > /dev/null
# 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.
# foreman-installer --scenario satellite --migrations-only
# echo $?
0

Comment 2 Martin Bacovsky 2017-10-18 14:20:21 UTC
This is expected behavior. We don't use the foreman scenario so there is no risk ignoring that. 

To avoid these messages we can fix the installer to not fail on running "--migrations-only" on disabled scenario and just print the migrations are going to be skipped.

Comment 3 Jan Hutař 2017-10-19 12:19:15 UTC
Could this be solved directly in spec file?

Comment 4 Martin Bacovsky 2017-10-19 20:27:38 UTC
@Jan, probably yes but not without adding conditions there or doing downstream only fix. I'd prefer fix in Kafo as most clean and sustainable solution.

Comment 5 Martin Bacovsky 2017-10-19 20:28:45 UTC
Created redmine issue http://projects.theforeman.org/issues/21402 from this bug

Comment 7 Martin Bacovsky 2017-10-19 20:42:19 UTC
@Jan, I changed the severity to low as the impact is minimal.

Comment 8 Bryan Kearney 2018-11-01 14:43:39 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is  not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Rich Jerrido or Bryan Kearney or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 10 Bryan Kearney 2018-11-30 14:49:26 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Rich Jerrido or Bryan Kearney. Thank you.