Possible collisions if two apps with same name related to vault from different models
Bug #1949913 reported by
Paul Goins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Kubernetes Control Plane Charm |
Fix Released
|
Critical
|
Adam Dyess | |||
Vault KV Charm Layer |
Fix Released
|
Critical
|
Adam Dyess | |||
charm-interface-vault-kv |
Fix Released
|
Undecided
|
Adam Dyess | |||
vault-charm | Status tracked in Trunk | |||||
1.5 |
New
|
Undecided
|
Unassigned | |||
1.6 |
New
|
Undecided
|
Unassigned | |||
1.7 |
New
|
Undecided
|
Unassigned | |||
1.8 |
New
|
Undecided
|
Unassigned | |||
Trunk |
New
|
Undecided
|
Unassigned |
Bug Description
Hello,
I have an issue where I have 2 K8s clusters, both with apps named "kubernetes-
After recent maintenance, we're unable to get the kubernetes-master units to fully come up on one of the clusters.
I've noted that the layer code (https:/
Changed in charm-kubernetes-master: | |
status: | New → Confirmed |
Changed in charm-layer-vault-kv: | |
status: | New → Confirmed |
Changed in charm-kubernetes-master: | |
milestone: | none → 1.27+ck1 |
Changed in charm-layer-vault-kv: | |
milestone: | none → 1.27+ck1 |
Changed in charm-kubernetes-master: | |
assignee: | nobody → Adam Dyess (addyess) |
Changed in charm-layer-vault-kv: | |
assignee: | nobody → Adam Dyess (addyess) |
Changed in charm-interface-vault-kv: | |
status: | New → In Progress |
assignee: | nobody → Adam Dyess (addyess) |
Changed in charm-layer-vault-kv: | |
status: | Triaged → In Progress |
Changed in charm-kubernetes-master: | |
status: | Triaged → In Progress |
Changed in charm-layer-vault-kv: | |
status: | In Progress → Fix Committed |
Changed in charm-kubernetes-master: | |
status: | In Progress → Fix Committed |
no longer affects: | vault-charm |
Changed in charm-interface-vault-kv: | |
status: | In Progress → Fix Committed |
Changed in charm-kubernetes-master: | |
status: | In Progress → Fix Committed |
tags: | removed: backport-needed |
Changed in charm-interface-vault-kv: | |
status: | In Progress → Fix Committed |
Changed in charm-kubernetes-master: | |
status: | Fix Committed → Fix Released |
Changed in charm-layer-vault-kv: | |
status: | Fix Committed → Fix Released |
Changed in charm-interface-vault-kv: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
After hitting this bug again, and reading into the sources a bit, this seems like a critical bug. Apps relying on VaultAppKV (e.g. kubernetes-master, which I think is now kubernetes- control- plane) can end up clobbering each others' data.
Likely a similar issue occurs on VaultUnitKV, albeit mitigated somewhat if the unit IDs from the different apps don't collide. That doesn't matter in my current case re: Charmed Kubernetes, but it's worth calling out as well.
The core of the collision appears to be here: https:/ /github. com/juju- solutions/ layer-vault- kv/blob/ 39b0c7b38d59e01 33d7fffe3849b47 83c431e16d/ lib/charms/ layer/vault_ kv.py#L246
(This is on the tip of the master branch at the time of writing.)
The only way I know of to avoid this issue at present is to avoid having multiple apps of the same name (via differnet models) using the same vault.