Project

General

Profile

Actions

Bug #23969

closed

Upgrade failing in step 'packages-update' when /var/cache/yum is mounted as device

Added by Kavita Gaikwad almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1591137

Description of problem:
The upgrade of satellite 6.3 is impossible, when yum-cache directory is mounted directly

Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.1.5-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. mount /dev/sdb /var/cache/yum
2. # foreman-maintain upgrade run --target-version 6.3

Actual results:
Running Migration scripts to Satellite 6.3 ================================================================================
Setup repositories: | Configuring repositories for 6.3 [OK]
--------------------------------------------------------------------------------
Update package(s) :
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Cleaning repos: rhel-7-server-rpms rhel-7-server-satellite-6.3-rpms
: rhel-7-server-satellite-maintenance-6-rpms rhel-7-server-satellite-tools-6.3-rpms
: rhel-server-rhscl-7-rpms
Cleaning up everything
Maybe you want: rm rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager
[FAIL]
Failed executing rm -rf /var/cache/yum, exit status 1:
rm: cannot remove ‘/var/cache/yum’: Device or resource busy
-------------------------------------------------------------------------------

Scenario [Migration scripts to Satellite 6.3] failed.

The following steps ended up in failing state:

[packages-update]

Expected results:
No error

Additional info:

Changing the rb-file workaround this issue

/usr/share/gems/gems/foreman_maintain-0.1.5/lib/foreman_maintain/concerns/system_helpers.rb

...
- 109 execute!('rm -rf /var/cache/yum')
+ 109 execute!('rm -rf /var/cache/yum/*')
...

==> adding '/*' at the end of the command

Actions #1

Updated by Amit Upadhye almost 6 years ago

  • Assignee changed from Anurag Patel to Amit Upadhye
  • Triaged set to No
Actions #2

Updated by The Foreman Bot almost 6 years ago

  • Pull request https://github.com/theforeman/foreman_maintain/pull/198 added
Actions #3

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
Actions #4

Updated by Amit Upadhye over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Ivan Necas over 5 years ago

  • Fixed in Releases foreman_maintain-0.2.9 added
Actions

Also available in: Atom PDF