* The mixture of storage for disable_components in and out of the config
dict was confusing and caused bugs, depending on the flow
* disable_components now solely lives in the dict, like other items
* fix several syntax errors
* missing 'this' item was renamed to 'iso'
* change the simulated 'bash -x' output to stderr
* use shlex functions for join/split
Although the script is running with -e, having two distinct invocations
of a subshell in the same instruction masks failures in the first
subshell invocation. It is similar in essence to what the pipefail
option controls.
As a consequence, the following instruction does not fail if distro-info
is not installed:
isoname=$(distro-info -d)-live-server-$(dpkg --print-architecture).iso
And therefore, we end up with something like:
isoname=-live-server-amd64.iso
Fixed by first assigning the value of $(distro-info -d) to a variable.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
- This is a cleanup for SystemSetup per DEENG-134 and DEENG-139
- Default user should be set by the WSL launcher.
- Shutdown/reboot actions also.
- Added a structured form of communication between OOBE and launcher.
- /run/launcher-command
- Useful for develop env.
- Mimics the CI while avoiding downloading images all the time.
- Instance names change from 'tester' to the Ubuntu release adjective.
- lxc will only download if there is no local instance with that name.
- Useful for preserving matrix build instances.
pytest-3 lets us set exclude directories, which is helpful with the
desired API testing to seperate them from 'unittest discover' so that we
can keep unit test runtime short.
The behaviour of python regarding asynchronous packages changed between
18.04 and 20.04+. OOBE is only supported on 20.04 and higher and there
is no point in making the WSL specific code compatible with ealier
releases than 20.04
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
It also adds an argument --ignore-tz to the schema comparison test to
not fail on system where the schema has no TZ like WSL.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Adding "--quiet" as additional option to "lszdev" - here more for the reason of completeness and for consistency reasons.
The relevant change for solving LP#1944516 is the change in subiquity/server/controllers/zdev.py
* remove a stray space
* remove an extra call to check-yaml-fields.py, which can accept a list
of directives
* remove an entire redundant autoinstall run that I added as part of
bitlocker work but isn't actually verified in any way other than not
timing out
a while ago I rewrote inject-subiquity-snap in python, generalized it
and put it at https://github.com/mwhudson/livefs-editor. TBH, it's
always been better than the shell version but now there's a reason to
switch to it: the impish live server ISO use layers, which the current
shell scripts do not support and livefs-editor now does.
* Add new schema comparison, robust to timezone changes
Improve the schema comparison - mostly I'm worried about the
non-timezone items, spot check the timezone list for a few that should
be there.
* Incorporate feedback - pop
Impish is adding more timezones, which is cool, but breaks my schema
check, so disable this there for now and come back later with a better
answer.
Also schema check seems to need curtin.
* 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.
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.
* Add element updates (non-UI)
This can be controlled with autoinstall
updates: security or all
Also an API for controlling this:
curl --silent --unix-socket .subiquity/socket a/updates ->
"security"
curl -d '"all"' --unix-socket .subiquity/socket a/updates
* Automated tests - log grep for default/none/all states
* Enforce possible values on Updates controller
Route all the various get/set thru 2 common functions.
Validate incoming data.
Continuing the theme of previous work, this branch parses pc105.tree
into API-friendly attr-based classes at snap build time (which also lets
us check some constraints then and not at run time).
This is a bit sideways from the real thing I'm working on which is
moving most of the logic of keyboard handling to the server side but
anyway. This also lets me check some assumptions while processing the
data rather than in the view code.
The first of these scripts mashes the current branch's code over that of
a pre-existing subiquity snap.
The second uses the first to mash the current branch's code over the
subiquity snap from an ISO and then creates a new ISO with this new
snap.
It's all a bit terrifying but being able to get your changes into a
bootable ISO in about 30s is quite a large improvement on building the
snap from scratch.
Accidental schema updates are unintended, so enforce that. Schema
updates that don't break API are fine, we can handle that by manually
regenerating the schema at such time.
The inject-subiquity-snap.sh script rebuilds the installer.squashfs filesystem, but does not recalculate its MD5 hash.
This leads to an error message during bootup process, complaining about one of the files being damaged, that file
being installer.squashfs.
This commit introduces an extra step to recalculate the MD5 hash of the installer.squashfs and write it into
md5sum.txt, as well as to remove the GPG signature of the installer filesystem, since it's invalid anyway.
Using the NoCloud source meant that a filesystem label of "cidata"
(probably containing autoinstall config) could override the cloud-init
nocloud seed subiquity wrote and then users would not get created. So
instead write cloud config directly that hardcodes using the
DataSourceNone source and config for it.
https://bugs.launchpad.net/subiquity/+bug/1879103
In dry-run mode, treat SUBIQUITY_DEBUG as a comma-separated list of
things to fail:
* install-fail: curtin install fails
* copy-logs-fail: the postinstall copying of logs fails
* bpfail-full: full block device probing fails
* bpfail-restricted: restricted block device probing fails
In addition, control-u makes the UI crash in dry-run mode.
(This is all for testing of crash report generation but does not depend
on that).
Log to subiquity-debug.log.$PID instead of just subiquity-debug.log.
When we implement error reports we'll obviously attach the log to the
error report. There's no point adding log messages from previous runs of
subiquity.
Existing partitions can turn up with flags like "linux" and these are
fine to put into a RAID. I also checked all the other places we inspect
flag to check they weren't being over strict and they seem fine.