Commit Graph

4695 Commits

Author SHA1 Message Date
Adam Stokes b3f09832d4 Merge pull request #39 from CanonicalLtd/fix-network-display
Fix network connection display
2015-09-08 16:03:36 -04:00
Ryan Harper a1abcb31ac Fix network connection display
- Adjust the size of the column with iface name, cap the max size
- Find and remove any set of 'Unknown' displays of info
- Replace the 'Checking' status with the current state of the connection
  For now, it will always be definitive since we check for connections
  upon boot.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-08 14:49:24 -05:00
Adam Stokes 0b5dd20f63 Additional disk models added
initial models for Ceph, iSCSI, RAID

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-08 11:13:16 -04:00
Adam Stokes 2f738c7ad8 Merge pull request #38 from CanonicalLtd/fix-no-nics
Fix no nics
2015-09-03 14:50:23 -04:00
Ryan Harper 8aedabef3b Add nonic example file
Test nonics with:  MACHINE=examples/nonics.json make

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 13:47:35 -05:00
Ryan Harper dfc9d02b02 Handle when we don't have any nics at all.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 13:46:51 -05:00
Ryan Harper 7c06be6d82 lint fixes for recent code
Fix up make lint for files we've touched.  Still some work to do for others

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 13:35:07 -05:00
Ryan Harper fb5e7b7e91 Fix 10 Gig network display
python3 likes to make floating point numbers when dividing a lot.
Fix with cast to int.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:53:08 -05:00
Ryan Harper 0fca368ba4 Update probert commit revno
Update probert revno to use newer network probing data.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:50:35 -05:00
Ryan Harper bcf4f37ea4 Fix typo in fetching ip source and provider
Copy and paste error on fetching ip source provider.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:49:21 -05:00
Ryan Harper d8814c6648 Update networking model and view to use new probert data
Probert now collects more information on ips, bonds and bridges
Use this information to display Network view closer to spec.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:47:17 -05:00
Adam Stokes 2ff52fdaec Add disk info view
Adds ability to view disk information via hdparm
if run as root, otherwise, will print error to
the ui (ie. permission denied.)

As a result updated the run_command routine
to be a little more robust.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-02 15:21:14 -04:00
Adam Stokes 11e76e85d2 add probert to ignore list
Gets pulled in externally, lets not commit it
twice by accident

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-02 14:08:39 -04:00
raharper 0991ac41cd Merge pull request #37 from CanonicalLtd/fix-max-partsize
Fix max partsize
2015-09-01 17:06:45 -05:00
Ryan Harper fbb8eb09fb Adjust partition alignment for GPT and curtin sgdisk
Curtin uses sgdisk to create partitions.  To avoid sgdisk
fixing alignment issues we ensure that all partitions are
1M aligned.

GPT partitions also require space at the end, reserve the
same number of sectors (1K, 2048 512b sectors) at the
start and end of the disk.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-01 17:01:07 -05:00
Ryan Harper 7ff3f549c2 Fix partition size selection and logging
- 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>
2015-09-01 11:28:23 -05:00
Adam Stokes 477dc6d783 Merge pull request #36 from CanonicalLtd/update-makefile-topdir
Update topdir Makefile targets
2015-09-01 11:13:47 -04:00
Ryan Harper 8d678ad353 Update topdir Makefile targets
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>
2015-09-01 10:04:24 -05:00
Adam Stokes 73a91728bc add more statusbar notifications
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 12:03:53 -04:00
Adam Stokes d149a0c014 Additional UI notifications and consolidate common attrs
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>
2015-08-31 11:55:46 -04:00
Adam Stokes cd14fb2bdb Use our signal class emitter
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 10:50:59 -04:00
Adam Stokes 4ff83aa99e add another machine json
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 09:37:39 -04:00
Adam Stokes e1739bb615 View progress output after identity panel
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 20:08:30 -04:00
Adam Stokes 8ac84169f5 fix lint warning
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 19:40:14 -04:00
Adam Stokes f5444088ee Merge pull request #34 from CanonicalLtd/use_human_units_everywhere
Fix issue with partition size inputs and units
2015-08-28 16:34:45 -04:00
Ryan Harper d3b7189328 Fix issue with partition size inputs and units
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>
2015-08-28 15:30:34 -05:00
Adam Stokes d78b255b0b Extend string editor to clear out on error
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>
2015-08-28 15:50:17 -04:00
Adam Stokes 6c18ad1697 Merge pull request #32 from CanonicalLtd/read_probert_data_from_file
Add new cli option to read machine probe data from file
2015-08-28 14:25:38 -04:00
Ryan Harper 8a0e9ebdfd Add new cli option to read machine probe data from file
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>
2015-08-28 13:22:29 -05:00
Adam Stokes 810306b586 Work out ability to run curtin multiple times
Add additional signals to handle calling curtin
multiple times from additional input views

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 11:06:59 -04:00
Adam Stokes 0823db3b03 Replace additional buttons with menu_btn wrapper
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 10:33:25 -04:00
Adam Stokes 6a74160dcf Update add partition view to align up properly
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 10:12:27 -04:00
Adam Stokes 5c9f70c80c Remove unused module
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 09:44:11 -04:00
Adam Stokes 0100ed708c Merge pull request #29 from CanonicalLtd/fix_add_partition_default_values
Valid partition size input on AddPartition View
2015-08-28 09:40:03 -04:00
Adam Stokes 8ab7e2dd0f Merge pull request #30 from CanonicalLtd/drop_pyparted
Drop python3-parted use
2015-08-28 09:21:53 -04:00
Ryan Harper a16c301eed Drop python3-parted use
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>
2015-08-27 14:26:37 -05:00
Adam Stokes 89f2081e30 Cleanup identity view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-27 10:28:48 -04:00
Ryan Harper ba3b97f9d8 Valid partition size input on AddPartition View
- 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>
2015-08-25 11:49:27 -05:00
Adam Stokes b10a9ade16 Merge pull request #28 from CanonicalLtd/dont_emit_boot_volume_in_storage_config
Filter out the disk the installer is running from so curtin doesn't f…
2015-08-24 22:53:04 -04:00
Ryan Harper 66ebf89944 Filter out the disk the installer is running from so curtin doesn't format the device during install preventing the reboot
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-24 17:34:55 -05:00
Adam Stokes 5aececa910 Update colors and button placements
To match specifications from design team.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-24 11:51:10 -04:00
Adam Stokes 092f330c8a Remove debug output of exec'd commands
Really just pollutes the log with results from the output
stream.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:58:40 -04:00
Adam Stokes 709ae2a51a Update install progress controller
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>
2015-08-23 23:55:45 -04:00
Adam Stokes 57347582db Keep the bg color consistent
Doesn't alter the bg color for the body as it will
inherit whatever current color is.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:54:20 -04:00
Adam Stokes 1dbb837fd2 Add python3-tornado to geninstaller reqs
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:52:48 -04:00
Adam Stokes f0af14b8fc Add generic asynchronous/synchronous run command
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:49:51 -04:00
Adam Stokes 0b7f217339 Switch to Tornado's event loop
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>
2015-08-23 18:48:52 -04:00
raharper d8a401447f Merge pull request #27 from CanonicalLtd/fix-nic-hang-wily
Fix psuedo-random hangs on make run
2015-08-21 15:03:10 -05:00
Ryan Harper 9836dd0cf2 Fix psuedo-random hangs on make run
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>
2015-08-21 14:56:30 -05:00
Adam Stokes d6da4bec97 Merge pull request #26 from CanonicalLtd/filesystem_partition_fixes_rebased
Filesystem partition fixes rebased
2015-08-21 15:01:34 -04:00