606 Commits
Author SHA1 Message Date
Mark D Horn 8a7e4b486c Remove delay before PXE service
Initially the service was written to be a one-shot service
hence the need for the delay to ensure a stable network before
starting the service. Since the service was rewritten to run
in an infinite loop until installation succeeds, the delay is
no longer needed.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.7
2019-12-13 16:49:23 -08:00
Mark D Horn be11cbca1e storage: remove logical volumes during wipe
Fixes: #623

If a whole disk is used that contains logical volumes, they
need to be removed before re-using the disk.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-11 15:01:51 -08:00
Mark D Horn 767ffb8040 Fix test case variable case
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-11 12:55:19 -08:00
Mark D Horn b9970047f9 Allow skipping swupd configuration file copy
Fixes: #600

Only copy the swupd configuration files from the host to the target
by default when running the interactive installer (gui or tui).
Otherwise, observe the setting from the configuration YAML or the
command line (highest) argument.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-11 10:47:05 -08:00
Mark D Horn 5ab5ce365d vendor with rollback on gotk3
Revert back to when the required gotk3 bug fix was introduced.
https://github.com/gotk3/gotk3/pull/366

Also picks up new release of runes

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-05 17:35:37 -08:00
Mark D Horn b4d50fade3 gui: Fix disk selection
Fixes: #614

Ensure we retain the selected disk from the chooser box
during refresh like setting an encryption password.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-05 17:35:37 -08:00
Mark D Horn 59c3237b5d gui: disk: Fix rescan content
Ensure clicking Rescan button updates the contents of
the chooser boxes for media selection.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-05 17:35:37 -08:00
Mark D Horn 288373c832 vendor: update all of the packages
This should cause a minor version bump needs extra testing.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-02 14:17:11 -08:00
Mark D Horn 4c4de4c948 storage: Make mounted checks recursive
This will find sub-vols like LVM which might be mounted.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-02 09:57:35 -08:00
Mark D Horn 838d56ea29 storage: Remove parent reference
This was unused and problematic to maintain

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-02 09:57:35 -08:00
Mark D Horn a4f83fd0fe model: controller: Keep Image default
--keep-image defaults to true, we only try to remove an
image file if it is set to false.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.6
2019-11-26 14:50:47 -08:00
Mark D Horn f2e376e179 Ignore flags when installing onto physical media
Ignore the --iso and --keep-image flags for the massinstaller
when installing onto physical media as they do not logically apply.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.5
2019-11-25 17:23:40 -08:00
Mark D Horn a9befd5b40 gui: tui: Check for invalid interactive options
Ensure we do not allow the user to set options, either
via command line or in the default configuration file,
which would not be valid during an interactive installation.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-25 17:23:40 -08:00
Mark D Horn 44363205b5 storage: Add RAID type to known list
Enable parsing of RAID types even though they are not
currently support installation targets.

Fixes: #609

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-25 17:23:15 -08:00
Mark D Horn a46992d460 model: Refactor to enable command line overrides
Enable conversion from JSON to YAML to have values overridden by
the command line arguments.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.4
2019-11-19 18:18:05 -08:00
Mark D Horn b7a52f2d67 controller: Keep image if disabling ISO
If an ISO can not be generated due to multiple kernels, then
ensure that we keep the raw image file.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 18:18:05 -08:00
Mark D Horn 13f3872640 Revert "mixer: Add image template for use by mixer"
This reverts commit 0683fdfc64.

Mixer will instead use the --template command line options
in combination with --bundles option to create a default
YAML configuration file instead of modifying a published template.
2019-11-19 18:18:05 -08:00
Mark D Horn dc513d49e3 args: Add Bundles command line option
Allow the user to override the default set of bundles on
the command line. This comma-separated list will override
either the default built-in bundle list or the bundle list
from a specified configuration file.

Note that the installer will still augment this list with
any RequiredBundle which is needed due to option selections
such as choosing a non-default keyboard or language, enabling
telemetry, or adding additional users.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 18:18:05 -08:00
Mark D Horn 200d9313f1 args: Add Template generation mode
Add new --template (-T) command mode which will generate
a YAML configuration file.

Attempt to improve test coverage.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 18:18:05 -08:00
Mark D Horn 2afeff5721 model: Warning on extra kernels for json to yaml
When converting an ister JSON configuration file to a
clr-installer YAML configuration file, we want to ensure
a single kernel is set. Additional kernel result in a
warning as ISO mainly due to ISO generation limitation
in the code.

Add new coverage test for multiple kernels.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 18:18:05 -08:00
Mark D Horn 446d8ef177 scripts: Community link moved
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 17:39:43 -08:00
Reagan Lopez eb828da9de Skip ISO generation if additional kernels are present
Currently, ISO image generation supports only a single kernel.
Hence, skip ISO generation if multiple kernel bundles are present.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-11-19 11:06:17 -08:00
Mark D Horn 44840cff7c pxe: Block service if no config file
Do not start the clr-installer provisioning service if there
was no configuration file supplied on the kernel command line.

As this service has already masked the getty for this tty, no
login prompt will be available on this terminal. The use will
have to switch to a different virtual terminal for login access.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-14 13:54:16 -08:00
John 6f317e1a86 scripts: Add pxe reference script
This script creates the pxe image that is later processed into the
initrd for network installing with pxe.

Signed-off-by: John Akre <john.w.akre@intel.com>
2.3.3
2019-11-06 13:28:47 -08:00
Mark D Horn b80f568c70 args: Drop auto test coverage
Much of the new networking retry code is difficult to
test/emulate in a test environment -- as such, reducing requirement.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn af49072ac4 boot: use image mode
We should be using image mode when invoking clr-boot-manager
as we want changes implemented on the target image.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 235b054c04 Ensure we remove lockfile when rebooting
Calling reboot means a race if defer functions will get
called before the process is shutdown.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn f74a0d1c46 args: Add retry to conf download
Fixes: #591

When attempting to download a configuration file supplied by
the kernel command line, keep trying forever. This is generally
used by a network boot installation.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 6ab2c723c9 mass: Enable automatic reboots
Do not wait for user input for requested reboots.
Instead offer a short countdown which can be aborted
by an interactive user if enabled by mistake.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 5f9f92f179 Fix spacing in makefile
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 3723f04da6 args: Provide clear url download error
Include a message about what URL we failed to download as well
as an exit status number.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 9676538080 Add provisioning service for PXE installs
Used by PXE installations to start the install at boot-time.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
John Akre 1deccf4e8c args: Create function for boolean flag checks
To reduce cyclomatic complexity, the boolean command line argument checks
were moved to a new function.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-11-04 09:06:25 -08:00
John Akre 53db1a1fd9 swupd: Support skipping optional bundles
Optionally included bundles (also-add) can now be omitted from the
install target by passing the --swupd-skip-optional flag or by setting
the swupdSkipOptional field in the config file.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-11-04 09:06:25 -08:00
Mark D Horn 8e30452da1 travis: test building an image
Build a baseline image as part of regression.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-30 11:05:23 -06:00
Mark D Horn 137ad30917 test: Add new image generation test
This is a baseline test to know we can install to an image.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-30 11:05:23 -06:00
Mark D Horn 0683fdfc64 mixer: Add image template for use by mixer
This really should be released with the mixer tool instead,
but following the methodology from ister.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-28 11:06:28 -06:00
John Akre 0f9f5b566a swupd: Remove totalSteps from JSON
Remove totalSteps from swupd JSON message to align with swupd's removal
of this entry.

Signed-off-by: John Akre <john.w.akre@intel.com>
2.3.2
2019-10-16 09:15:42 -07:00
John Akre 1dd110db26 swupd: Add new progress bar steps
Added support for new progress bar steps reported by swupd.
Additionally, the install step for check_files_hash was updated to
differentiate it from validate_fullfiles.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-16 09:15:21 -07:00
John Akre fe52e7046e swupd: Support indeterminate progress bars
When swupd outputs a -1 StepCompletion value, an indeterminate progress
bar is created for that step. Otherwise, a multi-step progress bar will
be created.

Fixes: #516

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-16 09:15:21 -07:00
John Akre c7fae814b5 swupd: Concatenate printPrefix with description
Now printPrefix is concatenated into the progress bar description. The
printPrefix is only intended for the mass installer, so it is removed
from the gui/tui progress bar descriptions.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-16 09:15:21 -07:00
John Akre 190ad0b6bc travis: Remove telemctl
Telemetry is now optional for the installer and the telemctl binary is
not present in the docker container, so removing the call to telemctl.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-14 16:35:42 -07:00
Mark D Horn e4f9e947b4 utils: Add new tests to coverage
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-11 14:06:01 -07:00
Mark D Horn 65244af8b0 utils: Add unit test for variable expansion
Also correct a comment in the code

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-11 14:06:01 -07:00
Tom Lanyon c332005e4e Fix early exit in utils.ExpandVariables
ExpandVariables was returning early, upon first variable expansion, instead of expanding all available variables.

Also removed unnecessary strings.Contains check as strings.ReplaceAll performs a similar check internally before operating.
2019-10-11 09:50:14 -07:00
John Akre e4bbebaa36 tui: Move manage user to required tab
Creating an admin user is now a requirement for an install, so the
manage user page has moved to the required tab. Additionally, the manage
user page requires at least one admin user to enable the confirm button.

Fixes: #544

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
John Akre 67fcb71f77 tui: Create admin users by default
The admin checkbox is set by default when creating a new user.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
John Akre bc3c1daa83 tui: Enable install button after requirements done
Now, the install button is enabled when all of the required pages are
completed.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
Mark D Horn 0dcc486b91 tui: Set done when media selected
The media page was not set done correctly when advanced
partitioning was used.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-10 14:37:41 -07:00
Mark D Horn a3ac0ad7a4 args: Allow setting version on command line
We were only support version from the YAML file, now support
setting directly on the command line for swupd.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.1
2019-10-08 16:45:11 -07:00