Skip to content

ArgoCD deployment of eoAPI in develop cluster failing (Postgres) #160

@j08lue

Description

@j08lue

In a recent ArgoCD sync of data-access-core, the pgstac-migrate step failed repeatedly, with the below traceback:

https://argocd.develop.eoepca.org/applications/argocd/data-access-core?view=tree&resource=&node=%2FPod%2Fdata-access%2Fpgstac-migrate-2dx6d%2F0&tab=summary

Waiting for database to be ready...
Running PgSTAC migrations...
Traceback (most recent call last):
  File "/usr/local/bin/pypgstac", line 10, in <module>
    sys.exit(cli())
  File "/opt/src/pypgstac/src/pypgstac/pypgstac.py", line 125, in cli
    fire.Fire(PgstacCLI)
  File "/usr/local/lib/python3.9/dist-packages/fire/core.py", line 135, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/usr/local/lib/python3.9/dist-packages/fire/core.py", line 468, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/usr/local/lib/python3.9/dist-packages/fire/core.py", line 684, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/opt/src/pypgstac/src/pypgstac/pypgstac.py", line 61, in migrate
    return migrator.run_migration(toversion=toversion)
  File "/opt/src/pypgstac/src/pypgstac/migrate.py", line 157, in run_migration
    cur.execute(migration_sql)
  File "/usr/local/lib/python3.9/dist-packages/psycopg/cursor.py", line 97, in execute
    raise ex.with_traceback(None)
psycopg.errors.InsufficientPrivilege: permission denied to create role
DETAIL:  Only roles with the CREATEROLE attribute may create roles.
CONTEXT:  SQL statement "CREATE ROLE pgstac_admin"
PL/pgSQL function inline_code_block line 5 at SQL statement

The manifests are here: https://github.com/EOEPCA/eoepca-plus/tree/deploy-develop/argocd/eoepca/data-access

What is the root cause and how can we fix this?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions