Bug 1897129 - Ensure postgresql-docs and postgresql-contrib is removed as part of 6.8 postgresql upgrade
Summary: Ensure postgresql-docs and postgresql-contrib is removed as part of 6.8 postg...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 6.9.0
Assignee: Eric Helms
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-12 11:57 UTC by Stefan Nemeth
Modified: 2023-12-15 20:05 UTC (History)
7 users (show)

Fixed In Version: foreman-installer-2.3.1.6-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1933156 (view as bug list)
Environment:
Last Closed: 2021-03-03 17:18:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31671 0 High Closed Ensure postgresql-docs and postgresql-contrib are removed as part of postgresql upgrade 2021-02-15 20:30:17 UTC
Red Hat Knowledge Base (Solution) 5572901 0 None None None 2020-11-12 13:57:04 UTC

Description Stefan Nemeth 2020-11-12 11:57:21 UTC
Description of problem:

If any package is installed which may have dependecy on postgress or any other rpm in satellite, rpm -e command does not solve dependencies which leads to upgrade error. For example 

Executing: scl enable rh-postgresql12 "PGSETUP_INITDB_OPTIONS='--lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 --locale=en_US.UTF-8' postgresql-setup --upgrade"
* upgrading from 'postgresql.service' to 'rh-postgresql12-postgresql.service'
* Upgrading database.
* Upgraded OK.
WARNING: The configuration files were replaced by default configuration.
WARNING: The previous configuration and data are stored in folder
WARNING: /var/lib/pgsql/data.
WARNING: If you've just upgraded your database from a previous major version of
Fedora or RHEL, please run reindexdb against your databases.  Core library
collation data may have changed and this will invalidate database indexes.  For
example, in Fedora 28 and RHEL 8 there have been extensive changes in glibc
collations to support ISO 14651:2016 (Unicode 9.0.0 data) and your indexes may
be affected: https://sourceware.org/ml/libc-announce/2018/msg00002.html
* See /var/lib/pgsql/upgrade_rh-postgresql12-postgresql.log for details.
scl enable rh-postgresql12 "PGSETUP_INITDB_OPTIONS='--lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 --locale=en_US.UTF-8' postgresql-setup --upgrade" finished successfully!

Failed to ensure postgresql is absent
Error: Execution of '/bin/rpm -e postgresql' returned 1: error: Failed dependencies:
        postgresql(x86-64) = 9.2.24-4.el7_8 is needed by (installed) postgresql-docs-9.2.24-4.el7_8.x86_64
Error: /Stage[main]/Main/Package[postgresql]/ensure: change from '9.2.24-4.el7_8' to 'absent' failed: Execution of '/bin/rpm -e postgresql' returned 1: error: Failed dependencies:
        postgresql(x86-64) = 9.2.24-4.el7_8 is needed by (installed) postgresql-docs-9.2.24-4.el7_8.x86_64
Error: Report processor failed: Could not send report to Foreman at https://satellite.example.test/api/config_reports: Failed to open TCP connection to satellite.example.test:443 (Connection refused - connect(2) for "satellite.example.test" port 443)
["/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:103:in `timeout'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:935:in `connect'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:920:in `do_start'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:909:in `start'", "/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:1458:in `request'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports/foreman.rb:69:in `process'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:37:in `block in process'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:54:in `block in processors'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:51:in `each'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:51:in `processors'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:30:in `process'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:14:in `save'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:316:in `save'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:432:in `send_report'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:408:in `run_internal'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:227:in `block in run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:210:in `run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:343:in `apply_catalog'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:260:in `block (2 levels) in main'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:243:in `block in main'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:207:in `main'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:177:in `run_command'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `block in run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:710:in `exit_on_fail'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'", "/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'"]
                                      [FAIL]

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

6.7


How reproducible:

100%

Steps to Reproduce:
1. install postgresql-docs
2. try to upgrade from 6.7 to 6.8
3.

Actual results:

Error: Execution of '/bin/rpm -e postgresql' returned 1: error: Failed dependencies:
        postgresql(x86-64) = 9.2.24-4.el7_8 is needed by (installed) postgresql-docs-9.2.24-4.el7_8.x86_64
Error: /Stage[main]/Main/Package[postgresql]/ensure: change from '9.2.24-4.el7_8' to 'absent' failed: Execution of '/bin/rpm -e postgresql' returned 1: error: Failed dependencies:

Expected results:

run yum remove to reslove the dependencies.

Additional info:

easily fixable by

yum remove problematic_package

in this case

#yum remove postgresql-docs

Comment 5 Eric Helms 2021-01-19 01:56:58 UTC
Created redmine issue https://projects.theforeman.org/issues/31671 from this bug

Comment 6 Bryan Kearney 2021-01-26 14:35:27 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31671 has been resolved.

Comment 12 Eric Helms 2021-03-03 17:18:48 UTC
This fix does not apply to Satellite 6.9, only to Satellite 6.8. Given that, it does not make sense to include this bug and attempt to verify it against Satellite 6.9. Therefore I am choosing to close it in favor of https://bugzilla.redhat.com/show_bug.cgi?id=1933156


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