Bug 1139152 - yum remove ruby193-rubygem-foreman-tasks produces preun errors on RHEL 7, causing katello-remove to not work properly
Summary: yum remove ruby193-rubygem-foreman-tasks produces preun errors on RHEL 7, cau...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1138600 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-08 08:56 UTC by Ivan Necas
Modified: 2019-09-25 21:15 UTC (History)
17 users (show)

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.
Clone Of:
Environment:
Last Closed: 2015-01-16 21:07:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1197943 0 None None None Never
Red Hat Product Errata RHBA-2015:0054 0 normal SHIPPED_LIVE Red Hat Satellite 6 server bug fix update 2015-01-17 02:04:45 UTC

Description Ivan Necas 2014-09-08 08:56:01 UTC
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 09:00:00 UTC
*** Bug 1138600 has been marked as a duplicate of this bug. ***

Comment 3 Ivan Necas 2014-09-08 10:48:55 UTC
Created redmine issue http://projects.theforeman.org/issues/7373 from this bug

Comment 4 Ivan Necas 2014-09-08 11:10:24 UTC
A fix proposed in https://github.com/theforeman/foreman-tasks/pull/87

Comment 5 Pavel Moravec 2014-09-16 11:40:06 UTC
(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 11:56:47 UTC
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 08:04:48 UTC
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 17:24:36 UTC
temp move to MOD for ET

Comment 12 Tazim Kolhar 2015-01-02 03:34:04 UTC
*** 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 13:26:52 UTC
verified in upstream,moving it back
to ON_QA

Comment 14 jcallaha 2015-01-13 16:15:10 UTC
QE Verified for z-stream

Comment 16 errata-xmlrpc 2015-01-16 21:07:43 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/RHBA-2015:0054


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