- Fix max size partition edge case
- Ensure if nothing is entered we select the max size
- Adjust offset and size calculations for actions
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
A number of changes to the toplevel make file and dir structure.
- deb-src and deb-release fail because debian was a symlink. This is not allowed
so instead we git clone and then move the debian dir to the toplevel.
- Fix the clean target to only run rules/debian if the debian dir exists.
- Drop probert as a submodule and instead clone it as needed, controlling the
version through a Makefile variable.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
We now pass a common dictionary with attributes needed
throughout our controllers. The common dictionary now
contains:
- eventloop
- ui widgets
- signal handler
- prober options
- cli arguments
In addition we've extended the progress indicator to
include a progressbar.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
There was a mismatch between what human size units we accepted
and what we matched for in the view validator. Fix that by
ensuring all places use the HUMAN_BYTES variable, including building
the multiplier from the listed HUMAN_BYTES.
Also drop the use of mixed case for the units, now all size units
must be capital (B, K, M, G, T, P) etc.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
During an input error the text field will be set
with the error of the validation performed.
When a user places the cursor anywhere on that error
and begins typing it will zero out the error and let
you type without having to do any previous deleting,
backspacing, etc.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
Allow user to specify a probert machine configuration file to be
used during the installer. If presented with the config file
no probing of the host will occur.
In the case that disks don't have a size in the data collected then
they'll be marked as USED.
Add a few example machines and update the README on how to specify.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Using parted required root privileges since it opened the underlying device.
Instead create our own Disk model and use sysfs interface for extracting
size information.
This also clears the way for providing device data via probert input. This
means we can feed subiquity a probert dump and have it present that to
the installer UI even if we're running on a different system.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Ensure we don't explode on input for partition size
- Don't append error messages to input fields as it
can DOS the input boxes.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Provide streaming updates to the UI during non blocking
commands. For the progress controller specifically this
is the output from curtin_wrap and subsequent curtin
execs.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
This provides us with several additional features the builtin
select() loop does not, such as:
- Chainable async actions via coroutines
- asyncio bridge
This will keep the code simpler and read more like a synchronous
application.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
Non-virtio nics get persistent names which require a 2 minute timeout
which slows the installer down. Use net.ifnames=0 in grub config to
handle non virtio nics getting persistent names until a fix arrives.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
Don't let user pass the same mount twice. TODO is to
include an error message widget and place the error
there instead of in the mountpoint widget value.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Remove the (1-4) since GPT partition doesn't have a limit
- Calculate the lastpartition value and handle the case where
we don't have any at first
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- Remove the error when converting sizes between input and initial value
there is a rounding error in the floating point convertion when
passing values between humanize() and dehumanize().
- Fix the error when using the full size of the disk as the first
partition and not accounting for the GPT bios size
- Implement percentage used in Filesystem Views
- Consolidate on unit keywords (single char only)
- use humanize() to append the correct unit size, remove all
hard-coded sizes when fetching size
- fix bug in calculating total disk size by only asking for the
largest available partition from parted.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
- storage config is now a dict, with "version: 1" and "config: <storage
config>"
- switched curtin branch to use to lp:curtin, because custom storage features
are now available there
Facility for non blocking async calls that provide a clean
way of handling exceptions/errors in threads without us
having to define a bunch of global exception handlers.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
The previous organization was in place to reduce the number of open
files when working on getting the demo into shape. Since we've completed
the demo revert back to our MVC model incorporating the latest changes
that were made during that time leading up to the demo.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>