Commit Graph

2105 Commits

Author SHA1 Message Date
Alexander Todorov
60daacfc38 New test: Build live-iso and boot with KVM
explicitly enables sshd for live-iso during testing

(cherry picked from commit eef11ef405)
2019-05-03 13:58:54 -07:00
Brian C. Lane
82aa9cdbc6 lorax-composer: Return UnknownBlueprint errors when using deleted blueprints
Reading a blueprint wasn't checking to see if it had been deleted so it
was returning the most recent commit before it had been deleted. This
allowed things like starting a compose with a blueprint that technically
doesn't exist.

One exception to this is the /changes/ route, it must be available so
that you can use the commit hash to undo a delete.

This also adds tests for the various operations.

Resolves: rhbz#1682113
(cherry picked from commit d32f477e0b)
2019-05-03 13:56:52 -07:00
Brian C. Lane
5c0f127b3c lorax-composer: Delete workspace copy when deleting blueprint
Also extends the blueprint delete test to also check the workspace.

(cherry picked from commit 26bd2c1378)
2019-05-03 13:56:38 -07:00
Alexander Todorov
3f000b1fe3 New test: Build qcow2 compose and test it with QEMU-KVM
(cherry picked from commit b936dfb198)
2019-05-03 13:55:41 -07:00
Brian C. Lane
27a7c247bf Automatic commit of package [lorax] release [30.18-1].
Created by command:

/bin/tito tag
2019-04-05 15:55:51 -07:00
Brian C. Lane
2861bdb95e lorax-composer: pass customization.kernel append to extra_boot_args
This allows iso builds to include the extra kernel boot parameters by
passing them to the arch-specific live/*tmpl template.

Also adds tests to make sure it is written to config.toml in the build
metadata.

(cherry picked from commit 5dea308080)
2019-04-05 15:41:44 -07:00
Brian C. Lane
4c0e632b93 Improve logging for template syntax errors
The shlex splitting can fail, resulting in error messages like:

ERROR livemedia-creator: No closing quotation

without any context in the log files. This logs the line that failed to
be split and expanded.

(cherry picked from commit f9665940bb)
2019-04-05 15:41:44 -07:00
Brian C. Lane
48548722b3 Add extra boot args to the livemedia-creator iso templates
This adds a new livemedia-creator argument, --extra-boot-args, which can
be used to add arguments to the kernel command-line in the templates.

(cherry picked from commit 235813212f)
2019-04-05 15:41:44 -07:00
Brian C. Lane
c5f4dfe113 lorax-composer: Add the ability to append to the kernel command-line
Sometimes it is necessary to modify the kernel command-line of the
image, this adds support for a [customizations.kernel] section to the
blueprint:

[customizations.kernel]
append = "nosmt=force"

This will be appended to the kickstart's bootloader --append argument.

Includes tests for modifying the bootloader line, the kickstart
template, and examining the final-kickstart.ks created for a compose.

(cherry picked from commit 59464286f9)
2019-04-05 15:41:38 -07:00
Brian C. Lane
9381205bbd Add -iso-level 3 when the install.img is > 4GiB
xorrisofs needs to use iso-level 3 when creating images with large
files. This adds tests to all the relevant templates, just like we used
to do for udf and mkisofs.

(cherry picked from commit 2264496fe85cedae77af35b509b140a5811d5743)
2019-04-05 15:30:44 -07:00
Brian C. Lane
ae07d8d888 qemu wasn't restoring the terminal if it was terminated early
You would need to run reset to regain control of your terminal after
this happened, so this turns off the monitor and serial port mux to
stdout.

(cherry picked from commit 1accce819afac96a6d58f24a4908a4913e46624c)
2019-04-05 15:30:44 -07:00
Brian C. Lane
79c38687f3 Switch the --virt-uefi method to use SecureBoot
This updates the qemu arguments so that it will actually work, and
switches to using SecureBoot OVMF firmware.

(cherry picked from commit f2b19cfcf7e23dfdb7176fcb1fa8b0335da5aa9a)
2019-04-05 15:30:44 -07:00
Brian C. Lane
2feaef22dd Automatic commit of package [lorax] release [30.17-1].
Created by command:

/bin/tito tag
2019-03-15 12:33:15 -07:00
Brian C. Lane
d513747384 tests: Make it easier to update version globs
Use constants so we won't have to edit a dozen places in the test when
the package versions are bumped.

Also switch to using Fedora 31 GPG key now that it has branched for
Fedora 30.
2019-03-15 12:20:02 -07:00
Brian C. Lane
176ca0a137 Update ppc64le isolabel to match x86_64 logic
It was substituting _ which didn't match what pungi uses for creating
the DVD. Make things consistent and use - as the replacement character.

Resolves: rhbz#1687882
(cherry picked from commit 372bef945f)
2019-03-15 11:59:53 -07:00
Brian C. Lane
379f088459 Add blacklist_exceptions to multipath.conf
Resolves: rhbz#1685363
(cherry picked from commit b1407900ac)
2019-03-15 11:59:53 -07:00
Brian C. Lane
11955f0550 Automatic commit of package [lorax] release [30.16-1].
Created by command:

/bin/tito tag
2019-02-25 14:43:09 -08:00
Brian C. Lane
fc9ccb51ee Fix pylint problems with vmware_list_vms.py 2019-02-25 14:38:37 -08:00
Brian C. Lane
a7e96ab828 Makefile: Make the .test-results directory
podman won't run if it is missing.
2019-02-25 14:37:57 -08:00
Brian C. Lane
f3c147448a Add a ppc64le template for live iso creation 2019-02-25 13:49:12 -08:00
Brian C. Lane
3b8de2a233 Move the package requirements for live-iso setup out of the template
In order to support iso creation on multiple arches with the templates
we need to be able to select different packages based on arch.
lorax-composer uses the arch-specific Lorax templates in order to
generate the output iso so this patch:

1. Creates a new template and type to parse it, live-install.tmpl
   which contains only installpkg commands and #if clauses for arch
2. Removes bootloader related packages from the live-iso.ks
3. Remove dracut-config-rescue exclusion because it can cause problems
   with some blueprints.
4. Switch logo requirement to system-logos which is satisfied by
   generic-logos or fedora-logos. This prevents conflicts when a blueprint
   installs fedora-release-workstation.

So in the future, if x86.tmpl, etc. need a new package to support
creating the iso it should be added to the correct section in
./share/live/live-install.tmpl
2019-02-25 13:49:12 -08:00
Brian C. Lane
822bc7ac68 Remove exclusions from lorax-composer templates
If a package is excluded in the template and later added by a blueprint
or dependency, anaconda will fail to finish the installation. So remove
the -dracut-config-rescue exclusion and instead remove the rescue
artifacts in %post
2019-02-25 13:49:12 -08:00
Brian C. Lane
6c5e89ed14 Add LiveTemplateRunner to parse per-arch live-iso package requirements
This template runner only uses the installpkg command to gather a list
of package NEVRA to be installed to support live iso creation.
2019-02-25 13:49:12 -08:00
Brian C. Lane
8eaad3bc5e Move the run part of LoraxTemplateRunner into new TemplateRunner class
This will make it easier to add a new subclass that only handles
installpkg for use with livemedia-creator and lorax-composer iso
creation.
2019-02-25 13:49:12 -08:00
Brian C. Lane
a0ff34dcb1 lorax-composer: Use reqpart --add-boot for partitioned disk templates
Some platforms, like ppc64, require that the /boot partition be present.
It doesn't hurt to have it there on other platforms so instead of trying
to add per-arch kickstart templates just use reqpart --add-boot
everywhere.
2019-02-25 13:49:12 -08:00
Brian C. Lane
b47554d716 livemedia-creator: Add support for reqpart kickstart command
reqpart can be used to make kickstarts more platform agnostic, creating
needed partitions without lmc having to keep track of the arch-specific
needs. eg. ppc64 needs prepboot and /boot

This increases the size of the disk based on whether reqpart or
reqpart --add-boot is in the kickstart.

Note that this is only valid for partitioned disk output types, not
for filesystem images or live iso output.
2019-02-25 13:49:12 -08:00
Brian C. Lane
d27b4fcbd4 Make the lorax-composer ks templates more generic
Some platforms do not have grub2, and some require other partitions.

Anaconda will add platform specific partitions if the 'reqpart' command
is included, and it will add bootloader specific packages to the list if
they are needed.
2019-02-25 13:49:12 -08:00
Jan Stodola
ce110afd22 Add script for removing old artifacts from VMware 2019-02-25 11:40:03 +02:00
Brian C. Lane
28bd68793b tests: Fix makeFakeRPM calls 2019-02-21 10:10:11 -08:00
Brian C. Lane
6443f34337 Drop _unique_dicts function
It is not actually needed. projects_info deduplicates the package list,
placing other builds into the builds list instead of making a new
package entry. So it returns a sorted and deduped list of packages, as
expected.
2019-02-21 08:59:29 -08:00
Brian C. Lane
2272b2b189 Update bash to 5.0.*
so that the tests will pass again on rawhide.
2019-02-21 08:55:23 -08:00
Brian C. Lane
9041174142 Add some extra cancel_func protection to QEMUInstall
In livemedia-creator's usage of this it can never pass in None, but if
someone were to import the library and use it, it would crash with
NoneType. So add the extra checks to make sure cancel_func isn't None,
just in case.
2019-02-21 08:54:46 -08:00
Jiri Konecny
d64a320ba1 Remove unsupported anaconda-docker-addon (#619)
It is failing to load on Fedora for quite some time and there no-one
complaining about this so it would be easier to disable it instead of
fixing it.
2019-02-21 08:44:29 -08:00
Yuval Turgeman
1c731b5618 installer: make sure cancel_func has a value (#612)
When using LMC to virt-install a system to an image, cancel_func is not
provided in run_creator, causing a TypeError (NoneType object is not
callable).

Signed-off-by: Yuval Turgeman <yturgema@redhat.com>
2019-02-19 08:09:36 -08:00
Alexander Todorov
ea78cce882
New test: Verify tar images with Docker and systemd-nspawn
- on some arches (also Fedora x86_64) systemd-nspawn may not be
  available
- delete composes from other tests in rlPhaseStartCleanup because
  we're seeing the tar compose kind of hanging in Jenkins and that
  test script is executed last so the slave may be running out of
  disk space. Be a good citizen and clean up after the previous
  tests.
2019-02-18 19:14:56 +02:00
Alexander Todorov
c95d7084a6 Update OpenStack flavor and network settings in tests
b/c we've migrated to Upshift we must use different instance type,
specify the desired network to connect to and update how we get
the ip address of the launched VM.
2019-02-16 01:19:43 +02:00
Brian C. Lane
387a71e4cd Automatic commit of package [lorax] release [30.15-1].
Created by command:

/bin/tito tag
2019-02-15 10:41:03 -08:00
Brian C. Lane
7e78dc368f Remove 3G minimum from lorax-composer
The reason for the 3G minimum was because anaconda had a bug with how it
calculated minimum disk size when using kickstart. The gix for this has
been in Anaconda since 29.19-1, so we can now remove our limit and
create somewhat smaller disk images.
2019-02-14 15:20:50 -08:00
sharkcz
d35232d9cc drop Apple/HFS bits from the templates (#602)
Drop the remaining non-ppc64le bits from the templates. Make the ISO creation
work with xorriso.

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1676411
2019-02-12 10:14:32 -08:00
Brian C. Lane
301cb15120
Merge pull request #587 from larskarlitski/unshare-anaconda
installer: Run anaconda in a mount and pid namespace
2019-02-12 09:34:48 -08:00
Brian C. Lane
7f562db31f Move manpages into the correct subpackages 2019-02-12 09:33:46 -08:00
Lars Karlitski
6961dce08b installer: Run anaconda in a mount and pid namespace
Anaconda can leave child processes and mounts around when it crashes or
is canceled before finishing. It also sometimes unmounts unrelated file
systems (https://github.com/rhinstaller/anaconda/issues/1791).

Run it in a mount and pid namespace to clean up after it.
2019-02-12 10:30:58 +01:00
Chris Lumens
022e9eba3e Run as root/weldr by default.
We need to be root to read the certificates that give access to the
package repos.  Right now, the alternative seems to be changing
permissions on the certs themselves, which seems less good.  We're
running anaconda as root anyway.
2019-02-11 16:20:39 -08:00
Lars Karlitski
e194b5926c Pass ssl certificate options to anaconda
If a repository has `sslcacert`, `sslclientcert`, or `ssclientkey` set,
pass them to anaconda through the kickstart file. This is mostly the
case when using RHEL repositories that are accessed through a
subscription.
2019-02-11 16:20:39 -08:00
Brian C. Lane
2af0973155 Drop auth from the kickstart examples
System defaults should be sufficient these days.
2019-02-11 16:00:15 -08:00
Alexander Todorov
5dc895fbee Keep OpenStack VMs with Tag keep_me
so we can have some systems for debugging
2019-02-08 22:02:41 +01:00
Jiri Kortus
57be7313c4 Make sure compose build tests run with SELinux in enforcing mode 2019-02-06 18:54:16 +01:00
Alexander Todorov
20ebfce164 Update with instructions about commit log referencing Bugzilla
do not merge in rhel7 and rhel8 branches if commit log isn't
referencing an approved bug!
2019-02-06 15:03:41 +02:00
Jan Stodola
f26fcba902 Add script for removing old artifacts from Azure 2019-02-06 09:38:18 +01:00
Jan Stodola
8a8802aab7 Use existing storage account
To avoid creating a new storage account for every new VM.
2019-02-05 21:03:57 +01:00