Commit Graph

2535 Commits

Author SHA1 Message Date
Mathieu Trudel-Lapierre 1dddd0399e Move on to identity and then install (or login if in firstboot mode).
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-28 11:28:56 -04:00
Mathieu Trudel-Lapierre 5b86abca12 Use git+ssh and a newer snapshot revision to get probert.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-23 23:29:34 +03:00
Mathieu Trudel-Lapierre d4f1ed1951 Merge firstboot logic into subiquity proper; make it generic enough to work for both the installer and firstboot cases. 2016-06-23 23:27:09 +03:00
Ryan Harper 346d4fa37d Change subuiquity to run as firstboot for snappy.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2016-06-22 14:19:54 -05:00
Ryan Harper 2007d6401b add check for empty loopdev to geninstaller
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2016-06-22 13:30:27 -05:00
Ryan Harper c8123f9f38 Fix up issues with partition tables when not needed
- Don't include Disk entries in storage config unless they've been modified
- Make sure underlying devices don't include partition table unless needed

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2016-01-04 07:26:22 -06:00
Ryan Harper e9e951a8d7 Merge pull request #130 from CanonicalLtd/add-lvm-ux
Add lvm ux
2015-12-04 09:36:47 -06:00
Ryan Harper 362d253627 Merge remote-tracking branch 'origin' into add-lvm-ux 2015-12-04 09:31:28 -06:00
Ryan Harper f31977f310 Merge pull request #129 from CanonicalLtd/fix-geninstall-with-latest-curtin
Fix geninstall with latest curtin
2015-12-04 09:16:53 -06:00
Ryan Harper 6fcbd0f442 Apply some lint fixes
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-04 09:15:49 -06:00
Ryan Harper 52d61a52b5 Fix issues with new identity form
- When user did not specify ssh/github id, this broke our postinstall template
  Fix by only appending ssh-import-id if user specifies a value.
- Move hostname config into a separate part of the postinstall cloud-init
  userdata so cloud-init actually applies the hostname specified

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-04 09:11:18 -06:00
Ryan Harper eeb90373b5 Fix curtin install error detection and presentation
When curtin encountered an error, if the resulting message
was very large, this would prevent the progress screen from
displaying useful information and left the user believing the
install was still going on even when it had stopped.

Resolve this by applying some post processing on the curtin
error message to help user better spot the issue.  We also
update the Title, Header and Footer to indicate an error has
occurred.

Finally, left-align the progress output.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-04 09:07:21 -06:00
Ryan Harper 153f41c989 Fix installer to work with latest curtin
The latest curtin now does package dep checks during installation
which may install and enable things like lvm2 and mdadm.  These
packages trigger running daemons which prevent the unmounting of
filesystem when building the installer image.  Resolve this by
re-implementing curtin's [un]disable_daemon_in_root functions.

Update runinstaller to use 3 spare disks as virtio to enable
raid testing.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-04 09:01:19 -06:00
Ryan Harper 1c4f05fe91 Fix use of partitions in LVM and displaying them properly
The holders and tags were kept on the Disk object, however when
using partitions, this wasn't available since partitions are
represented by an action object.  Avoid this by hanging the
holders and tags off of the filesystem model directly, indexing
by device.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-02 09:40:17 -06:00
Ryan Harper 9af6f59f45 Allow unformatted partitions to have empty mounts
We should not require unformatted partitions to have a mount
point.  Fix valid_mount check.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-01 15:19:54 -06:00
Ryan Harper 44d7d87f27 Add LVM2 model and integrate with filesystem model
Enable Create Logical Volume (LVM2) option in filesystem view.
Implement backend for building and emitting LVM storage config.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-01 13:30:53 -06:00
Ryan Harper eb98687e86 Actions: Add LVM Volgroup and Partition objects
Add volgroup and partition action objects to emit
required lvm curtin storage configuration.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-30 15:28:52 -06:00
Adam Stokes 2bd7c2a00a Merge pull request #128 from CanonicalLtd/identity_ux_update
Identity ux update
2015-11-20 17:17:13 -05:00
Ryan Harper 0534ef1d72 cleanup identity ux and lint fixes
- fix make check
- Forgot colon after Confirm your password

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-20 16:05:23 -06:00
Ryan Harper 13c06bd5c1 Update identity UX
- Model inputs after Ubiquity layout
- Add Servername (hostname)
- Add SSH ID import (import from launchpad or github)
- Include information under important fields
- Drop old/unused hostname MVC files

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-20 16:00:10 -06:00
Ryan Harper e2902099e0 lint: fix up indentation found by make check
Missed a make check before merging a branch.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-20 09:57:14 -06:00
Ryan Harper d2bec60d54 Merge pull request #127 from CanonicalLtd/hide_menu_options_as_needed
Hide menu options as needed
2015-11-20 09:56:04 -06:00
Ryan Harper 9872bdfb94 Don't display partition menu options if not allow
- Skip add_partition entry for bcache, raid, and lvm devices
- Don't display Format entire partition if it's already been formated

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-19 18:31:30 -06:00
Ryan Harper 02f7aade37 Don't let invalid mounts appear in fstable
Missing return from error allowed invalid mounts
to appear in fs table.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-19 16:29:28 -06:00
Ryan Harper 35c5a0b279 Protect mountpoint from relative paths and duplicate pathsep
Use os.path.realpath() to clean up any path manipulations

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-19 16:28:36 -06:00
Adam Stokes 0d850d7a6d Merge pull request #126 from CanonicalLtd/make_buttons_fixed_size
Add fixed_X attribute to Padding class and apply to all buttons
2015-11-19 16:26:11 -05:00
Ryan Harper 13d46b38d2 Add fixed_X attribute to Padding class and apply to all buttons
The new fixed_X attribute will center and set a fixed size on the
widget wrapped.  This keeps the widget the same size no matter the
scale of the window.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-19 15:24:40 -06:00
Adam Stokes 0c58cc7e52 Merge pull request #125 from CanonicalLtd/bcache_allow_multi_backing_per_cache
Bcache allow multi backing per cache
2015-11-17 18:49:17 -05:00
Ryan Harper 83554513e1 Add Blockdev tags to indicate device usage
Allow installer to tag devices with purpose for display
in USED DISKS in the filesystem view.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-17 16:12:45 -06:00
Ryan Harper 71e2706455 Allow multiple backing devices per cache device
- Add backing/cache properties to Bcachedev class
- Add filesystem model method for listing bcache cache devices
- Update bcache view
  - Allow bcache cache devices to always be listed
  - Don't display existing bcache devices

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-17 15:02:23 -06:00
Adam Stokes 3ee97160ed Merge pull request #124 from CanonicalLtd/async_curtin_install
Async curtin install
2015-11-16 19:50:15 -05:00
Ryan Harper 65a1351c35 Fix hang during async install
We needed to add in a dummy stdin fd for the async run_command
Fix up the postinstall command
Add a check on tailing the install log file

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-16 17:30:29 -06:00
Ryan Harper e3d8f9003a Rework async curtin install commands
Return to spawning curtin in two stages, and include additional
signals and flags to control when we spawn the postinstall
config operation.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-16 14:59:59 -06:00
Ryan Harper b583b0e953 Merge pull request #122 from CanonicalLtd/logfile_permissions
Logfile permissions
2015-11-16 08:37:33 -06:00
Adam Stokes 9c28c27201 Merge pull request #123 from CanonicalLtd/add_bcache_ux
Add bcache ux
2015-11-13 16:21:18 -05:00
Ryan Harper 75a3171d57 Fix up blockdev holder support to mark raid and bcache holders
Fixing this prevents devices that are part of a bcache from being
presented as available.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 13:42:36 -06:00
Ryan Harper 0385e754ab Initial working bcache UX connected to fs model
Panel up and adds a bcache device.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 12:29:18 -06:00
Ryan Harper d786676366 Line up usage of BcacheAction, Bcachedev and model
Ensure they all use backing_dev, cache_dev parameter ordering
Added properties to BcacheAction for involved devices

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 10:59:38 -06:00
Ryan Harper 040382ac21 Implment add_bcache_device to filesystem model
Very similiar to adding a raid device, bcache has
fewer inputs and calculations.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 10:27:57 -06:00
Ryan Harper e2d9ea0f50 Update BcacheAction object
Add __eq__ method and use action_id as parameter.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 10:10:33 -06:00
Ryan Harper d7585f0506 Rename logdir and logfile to be more specific
logdir -> .subiquity
logfile -> subiquity-debug.log

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 09:41:02 -06:00
Ryan Harper cdfe2779b8 Handle PermissionError on logfile gracefully
Don't stacktrace the error, print it out nicely.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-13 08:36:29 -06:00
Ryan Harper bd31dea5c6 Fix lint in actions.py
make check missed when fixing wiping superblock by default

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-11 09:34:20 -06:00
Ryan Harper 67a174453f Bump subiquity version for release
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-11 09:33:39 -06:00
Ryan Harper 6f0a7cbbbb NetAction should initialize params and subnets
We initialized params and subnets to empty lists.
Params is expected to be a dictionary while subnets
is a list.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-11 08:36:52 -06:00
Ryan Harper cca4ff1fbe Always wipe disks by default
Update DiskAction to defaulting to wipe the superblock

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-10 22:49:34 -06:00
Ryan Harper cebce4db6c Fix add-raid-dev signal
Rework of the menu signals broke add-raid-dev by mapping a
menu signal to a completion signal.  Revert add-raid-dev back
to non-menu signal to fix.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-10 22:32:59 -06:00
Ryan Harper e48ba70501 Merge pull request #121 from CanonicalLtd/add_bonding_ux
Add initial bonding UX panels and model connections
2015-11-10 22:12:12 -06:00
Ryan Harper 408cdbfb71 Add initial bonding UX panels and model connections
We now have a bonding UX panel, modeled after the raid menu
where we have a list of interfaces and a radiobox for
selecting the bond mode.  This calls into the network
model to add the bond interface.

- Update the network view to only display the Bond option if we have
more than one interface that is available (ie, not already part of
a bond).
- Also update the bond info to include the bond interface composition
in the hardware info such that it displays according to spec
- Add iface_is_bonded_slave to model
- Update network model info dict to include bond_{slave,master}.  This
helps us display the (Bonded) attribute for slaves, but not the primary
bond iface.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-09 15:34:43 -06:00
Adam Stokes 70a6ef3f5b Merge pull request #120 from CanonicalLtd/network-ux-update
Network ux update
2015-11-06 15:39:41 -05:00