Project

General

Profile

Actions

Bug #31783

open

Postgresql not being installed, installer fails to start postgresql

Added by Spencer Lines over 3 years ago. Updated over 3 years ago.

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

Description

Summary

Postgresql not being installed even with '--foreman-db-manage true', installer fails to start postgresql

System Details

os => {
architecture => "x86_64",
distro => {
codename => "Core",
description => "CentOS Linux release 7.8.2003 (Core)",
id => "CentOS",
release => {
full => "7.8.2003",
major => "7",
minor => "8"
},
specification => ":core-4.1-amd64:core-4.1-noarch"
},
family => "RedHat",
hardware => "x86_64",
name => "CentOS",
release => {
full => "7.8.2003",
major => "7",
minor => "8"
},
selinux => {
config_mode => "permissive",
config_policy => "targeted",
current_mode => "permissive",
enabled => true,
enforced => false,
policy_version => "31"
}
}

  1. yum repolist
    repo id repo name status
    epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,517
    foreman/x86_64 Foreman 2.3 699
    foreman-plugins/x86_64 Foreman plugins 2.3 372
  1. yum list foreman-installer
    Installed Packages
    foreman-installer.noarch 1:2.3.2-1.el7

Shell command and output

  1. foreman-installer \
    --enable-foreman-compute-ec2 \
    --enable-foreman-compute-libvirt \
    --enable-foreman-plugin-templates \
    --enable-puppet \
    --no-enable-foreman-proxy \
    --foreman-db-manage-rake true \
    --foreman-db-manage true \
    --foreman-initial-admin-password changeme \
    --foreman-oauth-active true \
    --foreman-oauth-consumer-key foo \
    --foreman-oauth-consumer-secret foo \
    --foreman-passenger true \
    --foreman-proxy-puppet false \
    --foreman-proxy-puppetca false \
    --foreman-telemetry-prometheus-enabled true \
    --foreman-version 2.3 \
    --foreman-websockets-encrypt true \
    --puppet-server false \
    --scenario foreman

2021-02-01 19:43:46 [NOTICE] [pre_migrations] Executing hooks in group pre_migrations
2021-02-01 19:43:46 [NOTICE] [pre_migrations] All hooks in group pre_migrations finished
2021-02-01 19:43:46 [NOTICE] [boot] Executing hooks in group boot
2021-02-01 19:43:46 [NOTICE] [boot] All hooks in group boot finished
2021-02-01 19:43:46 [NOTICE] [init] Executing hooks in group init
2021-02-01 19:43:46 [NOTICE] [init] All hooks in group init finished
2021-02-01 19:43:46 [NOTICE] [root] Loading default values from puppet modules...
2021-02-01 19:44:00 [NOTICE] [root] ... finished
2021-02-01 19:44:00 [NOTICE] [pre_values] Executing hooks in group pre_values
2021-02-01 19:44:00 [NOTICE] [pre_values] All hooks in group pre_values finished
2021-02-01 19:44:02 [NOTICE] [pre_validations] Executing hooks in group pre_validations
2021-02-01 19:44:13 [NOTICE] [pre_validations] All hooks in group pre_validations finished
2021-02-01 19:44:13 [NOTICE] [root] Running validation checks
2021-02-01 19:44:13 [NOTICE] [pre_commit] Executing hooks in group pre_commit
2021-02-01 19:44:17 [NOTICE] [pre_commit] All hooks in group pre_commit finished
2021-02-01 19:44:17 [NOTICE] [pre] Executing hooks in group pre
Failed to start services: Failed to start postgresql.service: Unit not found.

2021-02-01 19:44:18 [ERROR ] [root] Failed to start services: Failed to start postgresql.service: Unit not found.

Actions #1

Updated by Spencer Lines over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Ewoud Kohl van Wijngaarden over 3 years ago

I suspect you somehow trigger our PostgreSQL 9.6 migration code. Specifically, https://github.com/theforeman/foreman-installer/blob/033961ebfc0c43efe71398252862e7b41e908fc4/hooks/pre/30-el7_upgrade_postgresql.rb#L2 fails.

If /var/opt/rh/rh-postgresql12/lib/pgsql/data doesn't exist but /var/lib/pgsql/data does that's triggered. If the old data directory is empty, I'd suggest to remove it.

On a side note: --foreman-version 2.3 is generally not needed. If undefined it defaults to 'installed' but can also be set to latest or an exact version. I'm not sure if 2.3 is really understood by yum. I fear it may prevent patch versions from being installed. I'd recommend to reset it with --reset-foreman-version. However, this shouldn't affect the error you see since that fails in pre.

Actions

Also available in: Atom PDF