Description of problem:
Procedures::Packages::Install should be after epel repo check
If you have epel repo enabled and run foreman-maintain its possible it will fail when it tries to get packages for the speed test.
Version-Release number of selected component (if applicable):
[root@dell-r330-12 ~]# rpm -q rubygem-foreman_maintain
depends on packages versions for libpmem at the time
Steps to Reproduce:
1. enable epel repo (yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm)
2. foreman-maintain upgrade run --target-version 6.6.z --whitelist="disk-performance,repositories-validate,repositories-setup"
~]# foreman-maintain upgrade run --target-version 6.6.z
Running preparation steps required to run the next scenarios
Procedures::Packages::Install: Error: Package: libpmem-devel-1.1-1.el7.x86_64 (epel)
Requires: libpmem = 1.1-1.el7
Available: libpmem-1.1-1.el7.x86_64 (epel)
libpmem = 1.1-1.el7
Available: libpmem-1.1-4.el7.x86_64 (rhel-7-server-rpms)
libpmem = 1.1-4.el7
Available: libpmem-1.2.1-4.el7.x86_64 (rhel-7-server-rpms)
libpmem = 1.2.1-4.el7
Available: libpmem-1.3-3.el7.x86_64 (rhel-7-server-rpms)
libpmem = 1.3-3.el7
Installing: libpmem-1.4-3.el7.x86_64 (rhel-7-server-rpms)
libpmem = 1.4-3.el7
Check if EPEL repository enabled on system:
| Checking for presence of EPEL repository
foreman-maintain should not attempt to install packages for speed check if you use --whitelist="disk-performance" command option.
Created redmine issue https://projects.theforeman.org/issues/29002 from this bug
There are steps that can require some additional steps to be performed before foreman-maintain can proceed. A typical example is installing additional dependencies.
In foreman-maintain, these additional steps are called as preparation steps and these will be run as separate scenario all together.
Through foreman-maintain we can control ordering for checks but running these preparation steps and running pre-upgrade checks are two different scenarios.
To achieve what you have mentioned i.e foreman-maintain should check for epel repo first in case of pre-upgrade checks and
to avoid repetitive conditional checking of EPEL repository each time for every package install preparation step.
I need to run this EPEL repository check explicitly as a part of preparation steps scenario when any package installation step added.
In results, user will see that this check will be run twice one while running preparation steps and one as part of pre-upgrade checks.
thanks for comment 3
it sounds unavoidable then, the double check.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29002 has been resolved.
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 (Satellite 6.8 Satellite Maintenance Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.