GeoIP requests used to run on the default executor thread and would
prevent the application from exiting if the GeoIP service would not
respond quickly enough. We witnessed an obvious impact during an
incident on geoip.ubuntu.com.
Move to aiohttp so that the HTTP calls are non blocking.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
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.
Mostly complete the second task except the API for GUI:
Implement an API in the server to know if we are in reconfigure or setup mode based on existing UID user >= 1000. Fetch that API from the client and set the variant to wsl_setup or wsl_configuration.
Getting the apt packages needs to be first, as processing probert is
more than a trivial git clone and needs some of those apt packages.
Drop probert as a requirement since it's redundant with the git
checkout.
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.
`make dryrun` will now use the simple sample machine config instead of
probing local hardware. That local probe only seems to be viable
anyhow if we're running as root, and that's vulnerable to real problems
if dryrun is less than 100% insulated from making real machine changes.
In order to use the inject-subiquity-snap.sh script, we need some extra dependencies: xorriso and isolinux.
When xorriso is missing, the following error occurs:
./scripts/inject-subiquity-snap.sh: line 184: xorriso: command not found
When isolinux is missing, the image build step for x86-64 is failing:
xorriso : FAILURE : Given path does not exist on disk: -boot_image system_area='/usr/lib/ISOLINUX/isohdpfx.bin'
This file is not present in the source ISO image, so it has to come from the isolinux package.
Add support for --recover-chooser-mode command line argument. When provided, run
as a recovery chooser, rather than as a regular console-conf instance.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
This does a few things with the end goal of making simplifying and
making consistent tox and 'make' methods of test or check.
Things here:
* move python programs out of bin and into their own main. Use
entry_points to get scripts written for them. One gain here is
that we no longer have python programs that are not named .py.
flake8 and friends would not check those programs by default.
* install scripts in bin/ using the setup.py scripts and adjust
snapcraft.yaml and debian packaging for that.
* declare and use PYTHON in Makefile to avoid repeating 'python3'
* declare and use CHECK_DIRS in Makefile for list of dirs to check.
* no longer run 'flake8' from 'make check' by default.
* remove the old tests/ directory.