hashicorp / boundary

Boundary enables identity-based access management for dynamic infrastructure.
https://boundaryproject.io
Other
3.83k stars 282 forks source link

Boundary Init not working if extension citext already exists #4932

Closed tgahlx closed 2 months ago

tgahlx commented 2 months ago

Describe the bug Boundary init fails with

create extension "citext";: unknown: error #0: ERROR: extension "citext" already exists (SQLSTATE 42710)

To Reproduce Steps to reproduce the behavior:

  1. Manually create extension citext in schema
  2. Run boundary init
  3. See error

Expected behavior Boundary init accepts if extension citext already exists.

Additional context Migration ignores if database already exists: https://github.com/hashicorp/boundary/blob/main/internal/db/schema/migrations/oss/postgres/85/01_citext_extension.up.sql#L9

Problem doesn't occur for e.g. pgcrypto: https://github.com/hashicorp/boundary/blob/main/internal/db/schema/migrations/oss/postgres/0/60_wh_domain_types.up.sql#L6

mgaffney commented 2 months ago

Duplicate of #4859