Bug 1772596 - dnf prevent a successful upgrade
Summary: dnf prevent a successful upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.0
Assignee: Kavita
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-14 17:29 UTC by Andrea Perotti
Modified: 2024-03-25 15:31 UTC (History)
10 users (show)

Fixed In Version: rubygem-foreman_maintain-0.7.2-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 14:48:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28700 0 Normal Closed dnf prevent a successful upgrade 2021-02-09 08:06:59 UTC
Red Hat Product Errata RHBA-2021:1312 0 None None None 2021-04-21 14:48:34 UTC

Description Andrea Perotti 2019-11-14 17:29:50 UTC
Description of problem:

If user has installed on RHEL7 `dnf` - that is available from RH - and try to upgrade Satellite, the rpm upgrade phase fails with the following error:

# foreman-maintain upgrade run --target-version 6.5.z

I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : === Scenario 'Migration scripts to Satellite 6.5.z' started ===I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : --- Execution step 'Setup repositories' [repositories-setup] started ---
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : --- Execution step 'Setup repositories' finished ---
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : --- Execution step 'Unlock packages' [packages-unlock-versions] started ---
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : --- Execution step 'Unlock packages' finished ---
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : --- Execution step 'Update package(s) ' [packages-update] started ---
E, [2019-11-08 10:54:52+0100 #6382] ERROR -- : undefined method `join' for "all":String (NoMethodError)
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/package_manager/dnf.rb:13:in `dnf_action'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/package_manager/dnf.rb:4:in `clean_cache'
/usr/share/gems/gems/foreman_maintain-0.4.9/definitions/procedures/packages/update.rb:13:in `run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/executable.rb:139:in `__run__'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner/execution.rb:82:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner/execution.rb:81:in `run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner.rb:122:in `run_step'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner.rb:111:in `run_steps'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner.rb:104:in `execute_scenario_steps'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/runner.rb:51:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/upgrade_runner.rb:138:in `block in run_phase'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/upgrade_runner.rb:185:in `with_non_empty_scenario'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/upgrade_runner.rb:134:in `run_phase'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/upgrade_runner.rb:82:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/upgrade_runner.rb:77:in `each'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/upgrade_runner.rb:77:in `run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/cli/upgrade_command.rb:80:in `execute'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/usr/share/gems/gems/foreman_maintain-0.4.9/lib/foreman_maintain/cli.rb:32:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
/usr/share/gems/gems/foreman_maintain-0.4.9/bin/foreman-maintain:15:in `<top (required)>'
/usr/bin/foreman-maintain:23:in `load'
/usr/bin/foreman-maintain:23:in `<main>'
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : --- Execution step 'Update package(s) ' finished ---
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : === Scenario 'Migration scripts to Satellite 6.5.z' finished ===
I, [2019-11-08 10:54:52+0100 #6382]  INFO -- : foreman-maintain command finished with

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

rubygem-foreman_maintain-0.4.9-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. yum install dnf
2. foreman-maintain upgrade run --target-version 6.5.z

Actual results:
Failure and bad ruby dump


Expected results:
1. during the `upgrade check` would be useful if the installer would check for the presence of any of the following packages:

dnf
dnf-data
dnf-plugins-core 
libdnf 
python2-dnf 
python2-dnf-plugins-core 
python2-libdnf 

and raise an error. 

Another option could be to make foreman-maintain at rpm level mutually exclusive with dnf.

Comment 3 Kavita 2020-01-09 07:43:58 UTC
Created redmine issue https://projects.theforeman.org/issues/28700 from this bug

Comment 5 Amit Upadhye 2020-12-04 12:20:32 UTC
Hello,

We are not allowing the dnf on EL7 with this, this is to avoid issue,

E, [2019-11-08 10:54:52+0100 #6382] ERROR -- : undefined method `join' for "all":String (NoMethodError)

While running command. The dnf support with EL7 is as per the support policy of EL7 itself.
_
Amit Upadhye.

Comment 6 Bryan Kearney 2020-12-04 16:03:53 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28700 has been resolved.

Comment 7 Jameer Pathan 2021-02-10 10:29:33 UTC
Verified

Verified with:
- Satellite 6.9.0 snap 12
- rubygem-foreman_maintain-0.7.4-1.el7sat.noarch 

Tests performed (based on comment#5):
- Upgrade Satellite 6.8 to Satellite 6.9.0 snap 12
- Install/update packages using "foreman-maintain packages" command.
- Run existing automation for rubygem-foreman_maintain-0.7.4-1.el7sat.noarch 

Observation:
- Patch is available in rubygem-foreman_maintain-0.7.4-1.el7sat.noarch 
- Successfully updated satellite to 6.9.0 snap 12
- "foreman-maintain packages" command worked as expected.
- No automation failures observed around this.

Comment 10 errata-xmlrpc 2021-04-21 14:48:22 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 (Satellite 6.9 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.

https://access.redhat.com/errata/RHBA-2021:1312


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