Special casing the core configuration

Hello there,

Just for the record, a few notes out of a conversation between @pedronis, @mvo, and myself.

In recent times we’ve struggled with the fact configuring the core snap may only be done after the core snap itself is installed, which on a classic system may be delayed until the first snap is installed. That becomes an issue because unlike every other snap, we cannot do “snap set core [options]” to configure snapd and other system properties behind it until something else in the system has been installed.

For that reason, we’re now planning to special case that by intercepting and taking care of that specific action internally inside snapd. The plan right now is to introduce a new “configure-snapd” task alongside the usual “configure” hook setup that happens inside configstate.Configure.

This should be available in the next release (2.30).

1 Like

would that also give me the values with a “snap get” before core is installed (i.e. so that i can check the planned defaults) ?

(note thats purely a question out of interest, i cant actually imagine a use case for that)

Yeah, it should work both ways.

1 Like

If i want to add a new configuration option to core, what will change for me ?

Will that still be in the config hook of the core snap, will it have to land in snapd or will it have to be in both… i assume “configure-snapd” needs to somehow learn about newly added options ?

@mvo has proposed about this:

1 Like