consider the following scenario, admittedly one that is not possible
today:
* There is an "install model" that is required for server and not
desktop (let's say "mirror")
* The user initially selects a desktop install and moves through the
screens until they are asked for confirmation.
* At this point the user moves back through the screens and selects a
server variant. Now the application state of NEEDS_CONFIRMATION is
misleading; the state needs to move back to WAITING until the mirror
model is configured.
This is all probably excessively general but I feel like the core
control flow of the installer needs to be able to handle this sort of
thing...
The original design for timezone intentionally set the system timezone
based on geoip results, before a POST /timezone. After the feedback on
LP: #1936310 I'm having second thoughts on that and wish for GET to be
a simple informational query with no such side effects.
Subquity looking up various resources from SNAP is causing problems for
ubuntu-desktop-installer. Hide this detail away with SUBIQUITY_ROOT so
that other clients don't have to do magic with the SNAP env variable.
* Abstract resource file lookup relative to SNAP
Using SNAP to find the resource files is a bit of an odd requirement for
non-subiquity clients. Start abstracting that away so it's easier to
change later.
Also move loadkeys to lookup from this, since the previous solution is
still a problem for ubuntu-desktop-installer.
* Move loadkeys / configure-apt to bin
loadkeys / configure-apt are in usr/bin only when we specially put them
there by way of snapcraft, which makes things a little harder on
non-subiquity clients. Move them to bin, which is to say don't have
snapcraft put them in usr/bin.
* TimeZone: autoinstall and API
Add support for Get/Set timezone methods. Get means that we inquire
with GeoIP as to which timezone is suggested. Non-availability of
GeoIP, or a previous explicit Set, means that we return the system
timezone. Set of timezone by Post results in set of the live system
timzeone, and queuing a set of the target system by way of cloud-init.
* Add clarifying comment about _request.
Move unattended-upgrades to part of postinstall, so it can be done
before the restore_apt_config umount, which lets us get rid of the
redundant external_temp_file logic.
Move mock_app to common location.
Move run_coro to subiquitycore so that subiquitycore doesn't have to
reference things in subiquity, even for test.
Move task tracking things from mirror to geoip.
Server app owns the geoip instance.
Create EventCallback as an alternative to MessageHub that should
hopefully express clearer intermodule dependencies.
Add make_cloudconfig as a function that models should offer that allows
for generation of the cloud-config snippet.
Move snaplist and locale to this mechanism.
Add a test for snaplist output.
We need to know which controllers to block on, and which are optional.
The mechanism, for now, is this client_variant functionality, which adds
a mandatory early API call that the client shall use. This allows
controllers to say that they are only required to be configured for
certain install clients, such as is necessary for timezone (which is
needed on desktop, and optional on server).