Vault fails if certificates-relation-joined runs before initial setup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vault-charm |
Fix Committed
|
High
|
Martin Kalcok |
Bug Description
If the certificates-
configured then the hook fails. This is because the charm tries to access the running vault service but at this point vault is not configured or running. This regression appears to have been introduced by 1159e547
( https:/
The issue can be reproduced with this bundle:
series: focal
applications:
keystone-
charm: ch:mysql-router
channel: latest/edge
vault-
charm: ch:mysql-router
channel: latest/edge
mysql-
charm: ch:mysql-
constraints: mem=3072M
num_units: 3
channel: latest/edge
vault:
num_units: 3
charm: ch:vault
channel: latest/edge
keystone:
charm: ch:keystone
num_units: 1
options:
admin-
channel: latest/edge
relations:
- - 'vault:shared-db'
- 'vault-
- - 'keystone:
- 'keystone-
- - 'keystone-
- 'mysql-
- - 'vault:
- 'keystone:
Note that in the bundle the relation between vault-mysql-router and
mysql-innodb-
a `certificates-
because the initial configuration of vault is gated on
`shared-
This bug can present itself in subtly different ways that may initially
appear like the db-router/shared-db relations are at fault. In the
output below vault/0 and vault/2 are both hitting this bug and in the
case of vault/0 the bug was hit before the unit sent its db access request
to vault-mysql-
has missing data.
Unit Workload Message
vault/0 error hook failed: "certificates-
vault-
vault/1* blocked Vault needs to be initialized
vault-
vault/2 error hook failed: "certificates-
vault-
description: | updated |
Changed in vault-charm: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in vault-charm: | |
assignee: | nobody → Martin Kalcok (martin-kalcok) |
Initial guess at the fix: https:/ /paste. ubuntu. com/p/8FkpyhXKd J/