Bug #28903
Foreman 2.0 nightly installer shows errors when a package can't be installed but doesn't fail
Status:
Closed
Priority:
Normal
Assignee:
Category:
foreman-installer script
Target version:
Pull request:
Fixed in Releases:
Found in Releases:
Description
Installing on RHEL-7.7, the installer shows these errors:
[ INFO 2020-01-30T13:17:41 verbose] Running installer with args [["-v", "--foreman-initial-admin-password", "changeme"]] [ INFO 2020-01-30T13:17:41 verbose] Executing hooks in group pre_validations [ INFO 2020-01-30T13:17:41 verbose] All hooks in group pre_validations finished [ INFO 2020-01-30T13:17:41 verbose] Running validation checks [ INFO 2020-01-30T13:17:41 verbose] Executing hooks in group pre_commit [ INFO 2020-01-30T13:17:41 verbose] All hooks in group pre_commit finished [ INFO 2020-01-30T13:17:41 verbose] Executing hooks in group pre Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install rh-redis5-redis' returned 1: Error: Nothing to do Error: /Package[rh-redis5-redis]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install rh-redis5-redis' returned 1: Error: Nothing to do package { 'rh-redis5-redis': ensure => 'purged', provider => 'yum', } /opt/puppetlabs/bin/puppet resource package rh-redis5-redis ensure=installed finished successfully! Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install rh-postgresql12-postgresql-server' returned 1: Error: Nothing to do Error: /Package[rh-postgresql12-postgresql-server]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install rh-postgresql12-postgresql-server' returned 1: Error: Nothing to do package { 'rh-postgresql12-postgresql-server': ensure => 'purged', provider => 'yum', } /opt/puppetlabs/bin/puppet resource package rh-postgresql12-postgresql-server ensure=installed finished successfully! [ INFO 2020-01-30T13:17:53 verbose] All hooks in group pre finished
The installer should check the packages presence and handle it without error.
This issue probably relates to issue https://projects.theforeman.org/issues/28902
Related issues
Associated revisions
Refs #28903 - Swap the postgresql{,-server} removal
postgresql can't be removed until postgresql-server is removed.
72d7c3f67fd4e1b131871c946d03808c9d26a124 caused the order to be swapped.
This ensures a correct order.
History
#1
Updated by Vladimir Sedmik about 1 year ago
Edit: The package is not present as stated in the subject, it is actually missing and the installer complains there is nothing to do. I'm sorry for the confusion.
#2
Updated by Ewoud Kohl van Wijngaarden about 1 year ago
- Triaged changed from No to Yes
- Target version set to 2.0.0
- Category set to foreman-installer script
- Subject changed from Foreman 2.0 nightly installer shows errors when a package is already present on the system to Foreman 2.0 nightly installer shows errors when a package can't be installed but doesn't fail
#3
Updated by Ewoud Kohl van Wijngaarden about 1 year ago
- Related to Feature #28697: Upgrade to Postgresql 12 added
#4
Updated by Ewoud Kohl van Wijngaarden about 1 year ago
- Related to Bug #28902: Foreman 2.0 nightly installation fails on RHEL-7.7 added
#5
Updated by The Foreman Bot about 1 year ago
- Assignee set to Eric Helms
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman-installer/pull/471 added
#6
Updated by The Foreman Bot about 1 year ago
- Pull request https://github.com/theforeman/foreman-installer/pull/474 added
#7
Updated by The Foreman Bot about 1 year ago
- Fixed in Releases 2.1.0 added
#8
Updated by Ewoud Kohl van Wijngaarden about 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset installer|72d7c3f67fd4e1b131871c946d03808c9d26a124.
#9
Updated by The Foreman Bot 12 months ago
- Pull request https://github.com/theforeman/foreman-installer/pull/481 added
#10
Updated by Ewoud Kohl van Wijngaarden 12 months ago
- Fixed in Releases 2.0.0 added
- Fixed in Releases deleted (
2.1.0)
#11
Updated by The Foreman Bot 12 months ago
- Pull request https://github.com/theforeman/foreman-installer/pull/483 added
Fixes #28903 - Stop installer when package install fails
The puppet resource command always exits with code 0, even when the
package failed to install. This approach uses puppet apply with detailed
exit codes to detect when it failed. It also unifies all PUP-2169
workarounds in a single file and execution.