Bug 1706267

Summary: fg: no job control in post scriptlet while installing satellite 6.6
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: PackagingAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: desingh, egolov, lpramuk, pcreech
Target Milestone: 6.6.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.22.0.4-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 12:47:18 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 Nikhil Kathole 2019-05-04 01:08:20 UTC
Description of problem:

fg: no job control in post scriptlet while installing satellite 6.6

Transaction Summary
==================================================================================================================================================
Install  2 Packages (+568 Dependent packages)

Total download size: 384 M
Is this ok [y/d/N]: y
Warning: RPMDB altered outside of yum.
warning: user apache does not exist - using root
warning: group apache does not exist - using root
warning: user apache does not exist - using root
warning: group apache does not exist - using root
sed: can't read /etc/sysconfig/ipmi: No such file or directory
/var/tmp/rpm-tmp.eSpJPO: line 7: fg: no job control

Installed:
  python2-pycurl.x86_64 0:7.43.0.2-4.el7sat                                 satellite.noarch 0:6.6.0-2.beta.el7sat 

Version-Release number of selected component (if applicable): 
Satellite 6.6 snap 1


How reproducible: always


Steps to Reproduce:
1. yum install satellite

Actual results:

post scriptlet while installing satellite 6.6
/var/tmp/rpm-tmp.eSpJPO: line 7: fg: no job control

Expected results: No post scriptlet error.


Additional info:

Comment 4 Evgeni Golov 2019-05-06 09:51:38 UTC
Thanks Nikhil,

the Satellite RPM does not have any `fg` in its %post scriptlet.

Do you happen to know from which RPM this is coming?

Comment 5 Nikhil Kathole 2019-05-06 11:43:38 UTC
Hey Evgeni,

I am not sure which rpm is causing it :/

Thanks.

Comment 6 Devendra Singh 2019-05-11 14:18:08 UTC
*** Bug 1708848 has been marked as a duplicate of this bug. ***

Comment 7 Lukas Pramuk 2019-06-04 14:52:47 UTC
Evgeni,

Regarding "/var/tmp/rpm-tmp.r1JyVV: line 7: fg: no job control" 
I found out it's posttrans scriptlet in foreman rpm:

# rpm -q foreman foreman-1.22.0-0.5.RC2.1.el7sat.noarch

# rpm -q --scripts foreman
...
posttrans scriptlet (using /bin/sh):
# We need to run the db:migrate after the install transaction
# always attempt to reencrypt after update in case new fields can be encrypted
/usr/sbin/foreman-rake db:migrate db:encrypt_all >> /var/log/foreman/db_migrate.log 2>&1 || :
/usr/sbin/foreman-rake db:seed >> /var/log/foreman/db_seed.log 2>&1 || :
/usr/sbin/foreman-rake apipie:cache:index >> /var/log/foreman/apipie_cache.log 2>&1 || :
/usr/sbin/foreman-rake tmp:clear >> /var/log/foreman/tmp_clear.log 2>&1 || :
%{foreman_restart} || :
exit 0


^ There is un-expanded %{foreman_restart}

Comment 8 Ewoud Kohl van Wijngaarden 2019-07-03 15:56:36 UTC
Created redmine issue https://projects.theforeman.org/issues/27225 from this bug

Comment 9 Bryan Kearney 2019-07-03 18:06:10 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27225 has been resolved.

Comment 11 Nikhil Kathole 2019-07-07 09:02:08 UTC
VERIFIED

version tested:
Satellite 6.6.0 snap 10

 ================================================================================
 Install  2 Packages (+564 Dependent packages)
 
 Total download size: 399 M
 Warning: RPMDB altered outside of yum.
 warning: user apache does not exist - using root
 warning: group apache does not exist - using root
 warning: user apache does not exist - using root
 warning: group apache does not exist - using root
 sed: can't read /etc/sysconfig/ipmi: No such file or directory
 
 Installed:
   python2-pycurl.x86_64 0:7.43.0.2-4.el7sat                                     
   satellite.noarch 0:6.6.0-5.beta.el7sat

Comment 13 errata-xmlrpc 2019-10-22 12:47:18 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-2019:3172