Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1139152 - yum remove ruby193-rubygem-foreman-tasks produces preun errors on RHEL 7, causing katello-remove to not work properly
yum remove ruby193-rubygem-foreman-tasks produces preun errors on RHEL 7, cau...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: Unused
Assigned To: Ivan Necas
jcallaha
http://projects.theforeman.org/issues...
: Triaged
: 1138600 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-08 04:56 EDT by Ivan Necas
Modified: 2015-04-10 11:31 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
katello-remove fails to remove the ruby193-rubygem-foreman-tasks package on a Red Hat Enterprise Linux 7 system because of preun script errors related to turning off services. The preun script used the chkconfig command to turn off tasks which is not compatible with Red Hat Enterprise Linux 7. This fix corrects the preun script to include the correct commands for different Red Hat Enterprise Linux versions. katello-remove should correctly remove the package.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-16 16:07:43 EST
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
Red Hat Knowledge Base (Solution) 1197943 None None None Never
Red Hat Product Errata RHBA-2015:0054 normal SHIPPED_LIVE Red Hat Satellite 6 server bug fix update 2015-01-16 21:04:45 EST

  None (edit)
Description Ivan Necas 2014-09-08 04:56:01 EDT
Description of problem:
The preun script in ruby193-rubygem-foreman-tasks script doesn't work properly in rhel7, because it's using `chkconfig --del foreman-tasks`, which fails:

error reading information on service foreman-tasks: No such file or directory
error: %preun(ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat.noarch) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat.noarch

This causes katello-remove to leave the package there, and the next installation of katello will start failing on rake tasks, because the dynflow package was already remove as the foreman-tasks dependency and was not installed correctly again (with this in katello-installer.log):

/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: Gem loading error: Could not find dynflow (>= 0.7.2) amongst [actionmailer-3.2.8, actionpack-3.2.8, activemodel-3.2.8, activerecord-3.2.8, activeresource-3.2.8, ...

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

ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat (Sat 6.0) on RHEL 7

How reproducible:
Always on RHEL 7

Steps to Reproduce:
1. Given a RHEL 7 machine
2. yum install ruby193-rubygem-foreman-tasks
3. yum remove ruby193-rubygem-foreman-tasks

Actual results:
PREUN errors
ruby193-rubygem-foreman-tasks kept on the system

Expected results:
Everything goes fine
the ruby193-rubygem-foreman-tasks is not installed on the system

Workaround:
/bin/systemctl --no-reload disable foreman-proxy.service
/bin/systemctl stop foreman-proxy.service
rpm -e --nopreun ruby193-rubygem-foreman-tasks
Comment 1 Ivan Necas 2014-09-08 05:00:00 EDT
*** Bug 1138600 has been marked as a duplicate of this bug. ***
Comment 3 Ivan Necas 2014-09-08 06:48:55 EDT
Created redmine issue http://projects.theforeman.org/issues/7373 from this bug
Comment 4 Ivan Necas 2014-09-08 07:10:24 EDT
A fix proposed in https://github.com/theforeman/foreman-tasks/pull/87
Comment 5 Pavel Moravec 2014-09-16 07:40:06 EDT
(In reply to Ivan Necas from comment #4)
> A fix proposed in https://github.com/theforeman/foreman-tasks/pull/87

Is there a workaround how to repair a RHEL7 system after katello-remove finishes?

(i.e. now I have a RHEL7 machine I can't install katello due to this)

So far I manually installed packages:
ruby193-rubygem-dynflow.noarch
ruby193-rubygem-sequel
ruby193-rubygem-sinatra

but foreman_certs_config fails as well.. :(

Thanks for hint.
Comment 6 Ivan Necas 2014-09-16 07:56:47 EDT
After:

/bin/systemctl --no-reload disable foreman-proxy.service
/bin/systemctl stop foreman-proxy.service
rpm -e --nopreun ruby193-rubygem-foreman-tasks

running
yum install katello

should give all the required packages back again and `katello-installer --reset` should reinitialize the configuration.
Comment 7 Bryan Kearney 2014-09-22 04:04:48 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/7373 has been closed
-------------
Ivan Necas
Applied in changeset commit:24e6f57301cbabc4621a873da23c4ec9dcd4bc67.
Comment 10 Mike McCune 2014-12-11 12:24:36 EST
temp move to MOD for ET
Comment 12 Tazim Kolhar 2015-01-01 22:34:04 EST
*** This bug is verified in upstream. This fix should eventually land in future downstream builds ***
Version Tested:

# rpm -q foreman
foreman-1.8.0-0.develop.201412181705git9e844ba.el7.noarch


Removed:
  ruby193-rubygem-foreman-tasks.noarch 0:0.6.10-3.el7                           

Dependency Removed:
  katello.noarch 0:2.1.0-1.201411061509gitb0b8f43.el7                           
  ruby193-rubygem-katello.noarch 0:2.2.0-1.201412291253git77d1e64.el7           

Complete!
Comment 13 Tazim Kolhar 2015-01-03 08:26:52 EST
verified in upstream,moving it back
to ON_QA
Comment 14 jcallaha 2015-01-13 11:15:10 EST
QE Verified for z-stream
Comment 16 errata-xmlrpc 2015-01-16 16:07:43 EST
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/RHBA-2015:0054

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