canonical / canonical/ubuntu-com-security-api

The charm is not handling requirement for pg_trgm extension

Open
#254 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
9
Avg merge
1d 3h
Merged PRs (30d)
2

Description

The neither charm beta (rev2) or the [current](https://github.com/canonical/ubuntu-com-security-api/commit/7a92843b7de342cd5664b0e685321b6c130d133c) built from source is not working

It requires postgresql-k8s 16/ (no stable branch only beta and edge)

edge postgresql is not starting cluster, I tried adding extra unit but doest not help

```
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
ubuntu-security-api localhost-localhost ck8s/default 3.6.13 unsupported 14:59:19+01:00

App Version Status Scale Charm Channel Rev Address Exposed Message
postgresql-k8s 16.11 waiting 3 postgresql-k8s 16/edge 748 10.152.183.239 no installing agent
ubuntu-security-api blocked 1 ubuntu-security-api 0 10.152.183.55 no missing integrations: postgresql

Unit Workload Agent Address Ports Message
postgresql-k8s/0* waiting executing 10.1.0.54 awaiting for cluster to start
postgresql-k8s/1 unknown idle 10.1.0.3
postgresql-k8s/2 unknown idle 10.1.0.11
ubuntu-security-api/0* blocked idle 10.1.0.186 missing integrations: postgresql
```

when using postgresql-k8s 16 beta charm is failing

```
$ juju status --relations
Model Controller Cloud/Region Version SLA Timestamp
ubuntu-security-api localhost-localhost ck8s/default 3.6.13 unsupported 15:30:58+01:00

App Version Status Scale Charm Channel Rev Address Exposed Message
postgresql-k8s 16.8 active 1 postgresql-k8s 16/beta 525 10.152.183.71 no
ubuntu-security-api blocked 1 ubuntu-security-api 0 10.152.183.150 no database migration command ['bash', '-eo', 'pipefail', 'migrate.sh'] failed, will retry in next update-status

Unit Workload Agent Address Ports Message
postgresql-k8s/0* active idle 10.1.0.169 Primary
ubuntu-security-api/0* blocked idle 10.1.0.22 database migration command ['bash', '-eo', 'pipefail', 'migrate.sh'] failed, will retry in next update-status

Integration provider Requirer Interface Type Message
postgresql-k8s:database ubuntu-security-api:postgresql postgresql_client regular
postgresql-k8s:database-peers postgresql-k8s:database-peers postgresql_peers peer
postgresql-k8s:restart postgresql-k8s:restart rolling_op peer
postgresql-k8s:upgrade postgresql-k8s:upgrade upgrade peer
ubuntu-security-api:secret-storage ubuntu-security-api:secret-storage secret-storage peer
```

The debug-log attached

[ubuntu-security-api_debug-log.log](https://github.com/user-attachments/files/25293775/ubuntu-security-api_debug-log.log)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached debug log and the reported failure from migrate.sh, then trace how the charm declares and provisions the pg_trgm PostgreSQL extension. Done means the supported postgresql-k8s deployment completes its migration without blocking the ubuntu-security-api charm.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql
Domain
backend, databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.