Add schema to config.yaml to manage configuration that can only be set at deployment

Bug #1934928 reported by Drew Freiberger
18
This bug affects 3 people
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-replication-count" cannot be changed after the pool has been created

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.

Tags: config schema
Revision history for this message
Harry Pidcock (hpidcock) wrote :

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.

Revision history for this message
Drew Freiberger (afreiberger) wrote :

I can understand the idea behind wanting to require the user to specify the value, however, I think keeping the option for the charm developer to provide an opinionated default is important for continuity of the products already available. Maybe a warning provided by the UI during deployment that immutable/constant variables are not being explicitly set would be a good mitigating factor rather than outright requiring the setting of the variables by the operator.

John A Meinel (jameinel)
Changed in juju:
importance: Undecided → Wishlist
status: New → Triaged
tags: added: config schema
Revision history for this message
Amanda Hager Lopes de Andrade Katz (amandahla) wrote :

Hi, we have a similar case where we need to prevent a configuration field to be changed.
Scenario: Synapse server name cannot be changed once is set.
Reference:
https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#server_name

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.