Project

General

Profile

Bug #23192

installation fails with postgresql => 9.6 external database

Added by Ales Dujicek over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

foreman-installer fails when you use postgresql >= 9.6

# foreman-installer --scenario katello --foreman-admin-password changeme --foreman-db-manage false --foreman-db-host  localhost --foreman-db-database foreman7db --foreman-db-username foreman7 --foreman-db-password foreman7pw --foreman-db-port     5432 --katello-candlepin-manage-db false --katello-candlepin-db-host localhost --katello-candlepin-db-name     candlepin7db --katello-candlepin-db-user     candlepin7 --katello-candlepin-db-password candlepin7pw --katello-candlepin-db-port     5432
[DEBUG 2018-04-09T07:31:20 main]  Exec[cpdb](provider=posix): Executing 'cpdb --create                        --schema-only                        --dbhost=localhost                        --dbport=8432                        --database=candlepin7db                        --user=candlepin7                         --password=candlepin7pw                        >> /var/log/candlepin/cpdb.log                        2>&1 && touch /var/lib/candlepin/cpdb_done'
[DEBUG 2018-04-09T07:31:20 main]  Executing: 'cpdb --create                        --schema-only                        --dbhost=localhost                        --dbport=8432                        --database=candlepin7db                        --user=candlepin7                         --password=candlepin7pw                        >> /var/log/candlepin/cpdb.log                        2>&1 && touch /var/lib/candlepin/cpdb_done'
[ERROR 2018-04-09T07:31:21 main]  'cpdb --create                        --schema-only                        --dbhost=localhost                        --dbport=8432                        --database=candlepin7db                        --user=candlepin7                         --password=candlepin7pw                        >> /var/log/candlepin/cpdb.log                        2>&1 && touch /var/lib/candlepin/cpdb_done' returned 1 instead of one of [0]

foreman-1.18.0-0.develop.201804061848git210e295.el7.noarch
candlepin-2.1.14-1.el7.noarch
katello-3.7.0-1.nightly.el7.noarch


Related issues

Related to Katello - Feature #19667: Need additional supported database deployment options for Katello installation: such as External PostgresClosed2017-05-25

History

#1 Updated by Ales Dujicek over 4 years ago

/var/log/candlepin/cpdb.log

Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
  Position: 407
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:283)
        at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getIndexInfo(AbstractJdbc2DatabaseMetaData.java:4202)
        at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$2.fastFetch(Unknown Source)
        ... 22 more

ERROR:  column am.amcanorder does not exist at character 407
STATEMENT:  SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM,   ct.relname AS TABLE_NAME, NOT i.indisunique AS NON_UNIQUE,   NULL AS INDEX_QUALIFIER, ci.relname AS INDEX_NAME,   CASE i.indisclustered     WHEN true THEN 1    ELSE CASE am.amname       WHEN 'hash' THEN 2      ELSE 3    END   END AS TYPE,   (i.keys).n AS ORDINAL_POSITION,   pg_catalog.pg_get_indexdef(ci.oid, (i.keys).n, false) AS COLUMN_NAME,   CASE am.amcanorder     WHEN true THEN CASE i.indoption[(i.keys).n - 1] & 1       WHEN 1 THEN 'D'       ELSE 'A'     END     ELSE NULL   END AS ASC_OR_DESC,   ci.reltuples AS CARDINALITY,   ci.relpages AS PAGES,   pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS FILTER_CONDITION FROM pg_catalog.pg_class ct   JOIN pg_catalog.pg_namespace n ON (ct.relnamespace = n.oid)   JOIN (SELECT i.indexrelid, i.indrelid, i.indoption,           i.indisunique, i.indisclustered, i.indpred,           i.indexprs,           information_schema._pg_expandarray(i.indkey) AS keys         FROM pg_catalog.pg_index i) i     ON (ct.oid = i.indrelid)   JOIN pg_catalog.pg_class ci ON (ci.oid = i.indexrelid)   JOIN pg_catalog.pg_am am ON (ci.relam = am.oid) WHERE true  AND n.nspname = 'public' AND ct.relname = 'cp2_activation_key_products' ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION

see
https://www.postgresql.org/docs/9.5/static/catalog-pg-am.html
https://www.postgresql.org/docs/9.6/static/catalog-pg-am.html

#2 Updated by Ales Dujicek over 4 years ago

  • Related to Feature #19667: Need additional supported database deployment options for Katello installation: such as External Postgres added

#3 Updated by Justin Sherrill over 4 years ago

  • Assignee set to John Mitsch
  • Category set to 78

This is likely a candlepin bug. we will reach out to them to make sure they are aware of it.

#5 Updated by Evgeni Golov over 4 years ago

That's not a CP bug, it's an issue with postgresql-jdbc, which (the version in EL7) is not compatible with PostgreSQL 9.6: https://bugzilla.redhat.com/show_bug.cgi?id=1547424

upstream:

#6 Updated by Justin Sherrill over 4 years ago

  • Legacy Backlogs Release (now unused) set to 166
  • Status changed from New to Rejected

since this is a RHEL bug, closing!

#7 Updated by Hart Mel over 4 years ago

As a workaround, you can install postgresql yum repository and postgresql-jdbc package from this repository.

Also available in: Atom PDF