unable to change relation scope on upgrade (e.g. scope: global -> scope: container)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
A transition from global relation scope to container relation scope is not possible without removing a relation.
scope: global -> scope: container (in metadata.yaml)
https:/
https:/
"Upgrades fail with the scope change:
$ juju upgrade-charm --path ~/charms/
Added charm "local:
ERROR cannot upgrade application "telegraf" to charm "local:
Although it's not trivial to implement, what I would expect to see is:
* a relation scope has changed
* Juju does the remove-relation lifecycle at a unit level (-broken and -departed for units that are not in a primary-subordinate position) but not for the whole application
* all internal watchers and state for these relation structures previously needed are cleared out
A workaround is obviously to do `juju remove-relation ...` and `juju add-relation ...` but that's not always convenient.
summary: |
- unable to change relation scope on upgrade + unable to change relation scope on upgrade (e.g. scope: global -> scope: + container) |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Low |
There's also other restrictions on upgrading a charm, for example you can't rename a peer relation. This sort of thing was outside the original implementation design, and yes it will be a lot of work to implement. How much of an issue is it in practice? Does it materially affect the ability to satisfy our customer requirements or fulfil field operational requirements?