Add schema to config.yaml to manage configuration that can only be set at deployment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Several charms have options that are not configurable after deployment of a charm.
Examples include:
cs:cassandra "rack" and "datacenter" cannot be changed after deployment
cs:swift-proxy "partition-power" cannot be changed after rings have been built
cs:rabbitmq-server "ceph-osd-
Handling the case of these sorts of options changing after deployment requires code to handle the configuration status within the charm code itself instead of being able to pass this configuration management upstream to juju to handle at the operator interface layer.
It would be helpful if juju could implement an additional config schema component that determines if an option should be immutable to reduce the amount of overhead needed during charm development.
Changed in juju: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
tags: | added: config schema |
This seems like a decent idea. I'm trying to picture how this might look from the perspective of a user deploying a charm with immutable config fields.
I would imagine these fields are generally required fields and perhaps forcing the deployer to make an explicit decision to set them is ideal.
Charmers would probably just set it within their config.yaml. Many possibilities how we could do this.
# config.yaml
options:
datacenter:
type: string
description: Which datacenter this deployment belongs.
immutable: true
# config2.yaml
options:
datacenter:
type: string
description: Which datacenter this deployment belongs.
constant: true
# config3.yaml
options:
datacenter:
type: conststring
description: Which datacenter this deployment belongs.