migrated CaaS model will left in the cluster after model destroyed

Bug #1927656 reported by Yang Kelvin Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Yang Kelvin Liu

Bug Description

The migrated CaaS model will be left in the cluster after the model destroyed.
The root cause is we don't have strategies to update the `controller.juju.is/id` annotation to the new controller UUID.
Because of this reason, any global resources will be left as well.

This issue happens on any CaaS model.

$ juju bootstrap microk8s k1
$ juju bootstrap microk8s k2
$ juju add-model t1 -c k1 && juju deploy ch:ambassador -m k1:t1
$ juju migrate k1:t1 k2
$ yml2json ~/.local/share/juju/controllers.yaml | jq '.controllers|to_entries|map("\(.key) => \(.value.uuid)")'
[
  "k2 => 48636994-6b13-46fa-8022-f3167ef7b619",
  "k1 => 0d5e3e4e-06fe-4ee2-83b2-7b55025b1fa9"
]
$ mkubectl get ns t1 -o json | jq .metadata.annotations
{
  "controller.juju.is/id": "0d5e3e4e-06fe-4ee2-83b2-7b55025b1fa9",
  "model.juju.is/id": "cb627a31-84ce-4d02-8248-3b73a18ebb96"
}
$ juju destroy-model k2:t1 -y --debug --force --destroy-storage
$ mkubectl get ns t1 -o json | jq .metadata.annotations
{
  "controller.juju.is/id": "0d5e3e4e-06fe-4ee2-83b2-7b55025b1fa9",
  "model.juju.is/id": "cb627a31-84ce-4d02-8248-3b73a18ebb96"
}

Tags: k8s
description: updated
tags: added: k8
tags: added: k8s
removed: k8
Changed in juju:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 2.8.11
Revision history for this message
John A Meinel (jameinel) wrote :

i don't think this is critical, as it isn't a regression, but it is definitely important

Changed in juju:
importance: Critical → High
John A Meinel (jameinel)
Changed in juju:
milestone: 2.8.11 → 2.9.6
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Yang Kelvin Liu (kelvin.liu)
Changed in juju:
milestone: 2.9.6 → 2.9.7
Revision history for this message
Yang Kelvin Liu (kelvin.liu) wrote :

https://github.com/juju/juju/pull/13096 will be landed to 2.9 to fix this issue.

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.