Quay validator fails with pg_trgm extension error
Issue
When PosgreSQL is used as a database backend and pg_trgm
extension is not enabled on the database, Quay validator will complain with the following error:
2019-05-27 03:08:36,278 [63] [ERROR] [util.config.validator] Validation exception
Traceback (most recent call last):
File "/quay-registry/util/config/validator.py", line 78, in validate_service_for_config
VALIDATORS[service](validator_context)
File "/quay-registry/util/config/validators/validate_database.py", line 20, in validate
raise ex
OperationalError:
"pg_trgm" extension does not exists in the database.
Please run `CREATE EXTENSION IF NOT EXISTS pg_trgm;` as superuser on this database.
gunicorn-config stdout | 2019-05-27 03:08:36,278 [63] [ERROR] [util.config.validator] Validation exception
Traceback (most recent call last):
File "/quay-registry/util/config/validator.py", line 78, in validate_service_for_config
VALIDATORS[service](validator_context)
File "/quay-registry/util/config/validators/validate_database.py", line 20, in validate
raise ex
OperationalError:
"pg_trgm" extension does not exists in the database.
Please run `CREATE EXTENSION IF NOT EXISTS pg_trgm;` as superuser on this database.
However, when querying PostgreSQL, it seems that the extension is already enabled:
[root@bastion ~]# docker exec -it container_id /bin/bash -c 'echo "SELECT * FROM pg_extension" | /opt/rh/rh-postgresql96/root/usr/bin/psql'
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
---------+----------+--------------+----------------+------------+-----------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
pg_trgm | 10 | 2200 | t | 1.3 | |
(2 rows)
Environment
Red Hat Quay v3.0.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.