Example why this matters: if a disk partition is not trying to be
resized, and it's actual size is not an even multiple of what align_up
supports, then it could get a unrequested non-zero size change.
And if there is no supporting gap for that change, then we can get a
size Exception despite not having asked for a resize.
Since we added a search_drivers checkbox that is uncheckd by default,
there is no longer a way for users to install third-party drivers in an
autoinstall context.
We now implement the autoinstall support for source so that users can
specify what value they want for search_drivers.
Futhermore, to be backward compatible with existing autoinstall
configurations, we now make search_drivers default to true in
autoinstall contexts.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The search_drivers attribute is set at the source model level, not at
the the drivers model level.
Having said that, by adding its value in the response to GET /drivers,
we can avoid doing multiple HTTP calls in the make_ui function.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Before, we would not run answers for the source controller if only one
source was specified. The controller would automatically get marked
configured.
Since we're adding a new "search drivers" option in this screen, we need
to make it interactive in integration tests now.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
The source screen now includes a checkbox that makes Subiquity search
for third-party drivers in a later stage.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
In order we place:
* the arguments that are for client & server
* the arguments for the client only
* the arguments for the server only
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
A scenario that should happen nearly always for guided direct, when we
add_boot_disk from partition_disk_handler we must update the gap or the
target partition is at the wrong offset.
When a HTTP client sends a query but closes the socket before an answer
is received, aiohttp signals it on the server end by raising an
asyncio.CancelledError in the associated query handler.
By default, when a task is cancelled with asyncio, the task(s) that it
is currently awaiting on are cancelled as well.
The GET handler for /drivers?wait=true awaits on the "list drivers"
task. Therefore, if the GET handler gets cancelled, so will be the "list
drivers" task.
When that happens, any subsequent call to GET /drivers?wait=true will
make the server raise an asyncio.CancelledError because the "list
drivers" task has already been cancelled. This results in:
* the socket being closed from the server end
* an aiohttp.client_exceptions.ServerDisconnectedError exception raised
on the client end. This type of exception is unhandled and makes the
client crash.
Fixed by preventing the "list drivers" task from being cancelled when
the GET /drivers query handler gets cancelled.
https://bugs.launchpad.net/subiquity/+bug/1968729
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>