Bug #7373

yum remove ruby193-rubygem-foreman-tasks produces preun errors on RHEL 7, causing katello-remove to not work properly

Added by Ivan Necas over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assigned To:Ivan Necas
Category:-
Target version:Sprint 1
Difficulty: Bugzilla link:1139152
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1139152
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

Associated revisions

Revision d5701435
Added by Ivan Necas over 2 years ago

Fixes #7373 - fix service stopping and removing before uninstall

Revision 24e6f573
Added by Ivan Necas over 2 years ago

Merge pull request #87 from iNecas/issue/7373

Fixes #7373 - fix service stopping and removing before uninstall on RHEL 7

History

#1 Updated by Ivan Necas over 2 years ago

  • Status changed from New to Assigned
  • Target version set to Sprint 1

#2 Updated by Ivan Necas over 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF