Commit Graph

2495 Commits

Author SHA1 Message Date
Alexander Todorov
04bc5e9e86 tests: Compare blueprints as TOML objects, not strings
this is to avoid differences in ordering and white space. The same
approach is used on rhel7-extras branch.
2020-07-23 10:20:47 -07:00
Alexander Todorov
eb7748236c tests: Remove lorax-composer specific checks 2020-07-23 10:20:47 -07:00
Alexander Todorov
1c218ecbae tests: Remove compose after we're done 2020-07-23 10:20:47 -07:00
Lars Karlitski
abcbbf3194 tests: don't use beakerlib in blueprint
b/c for osbuild-composer beakerlib is not included in the
distributions we test on.
2020-07-23 10:20:47 -07:00
Lars Karlitski
123827c90a tests: don't depend on internal state of composer 2020-07-23 10:20:47 -07:00
Alexander Todorov
7b08fa8838 tests: Do not rely on example blueprints
- avoids having to modify them in the first place so less changes
  to the SUT
- will help with transition to osbuild-composer backend
- each test which needs a blueprint either declares it on its own
  (some already do this) or may use a shared blueprints from the
  tests lib dir
2020-07-23 10:20:47 -07:00
Alexander Todorov
4dd7cf8798 tests: Special case compose types for osbuild-composer
- alibaba - will be added later
- google - will be added later, low priority b/c
  GCE doesn't fully support RHEL8
- live-iso - not supported for now
- ext4 & partitioned disk - removed from osbuild-composer
2020-07-23 10:20:47 -07:00
Alexander Todorov
d68e01b7e1 tests: Don't check example blueprints if we don't have to
ATM osbuild-composer doesn't ship example blueprints
2020-07-23 10:20:47 -07:00
Alexander Todorov
14a3c8d5a7 tests: Use BACKEND env variable instead of hard-coded values
- default BACKEND to lorax-composer
- pass BACKEND everywhere we need to
2020-07-23 10:20:47 -07:00
Alexander Todorov
f1c15c67e0 tests: Disable non-cli test scenarios b/c osbuild-composer
the image building functionality is now tested by the
osbuild-composer test suite. We weren't successfull at making this
test suite work with the 2 backends so decided to disabled these
scenarios instead. In the future they will likely be deleted.
2020-07-22 08:49:25 -07:00
Brian C. Lane
52fd0f823b Automatic commit of package [lorax] release [33.7-1].
Created by command:

/usr/bin/tito tag
2020-07-20 10:23:55 -07:00
Brian C. Lane
be2c9333fc Add log entry about dracut and /proc 2020-07-17 09:38:13 -07:00
Brian C. Lane
68c26bf87b Skip creating empty /proc/modules for dracut
Creating /proc/modules just quiets one dracut warning, it doesn't
actually effect the initrd that is created.

Now that mock is being run with netsharedpath set to exclude /proc is
causes problems for running lorax inside a mock, so just remove this to
prevent a crash when it doesn't exist.

Related: rhbz#1848201
2020-07-17 09:38:13 -07:00
Vendula Poncova
c2a3b7dbf3 lorax: Install fcoe-utils
Explicitly install the fcoe-utils package on the boot.iso.
It is a weak dependency of anaconda-install-env-deps.
2020-07-17 09:21:51 -07:00
Vendula Poncova
48b268dc9e lorax: Enable swap on zram
Install the zram-generator-defaults package on the boot.iso.
2020-07-17 09:21:51 -07:00
Michel Alexandre Salim
0b9841d5f7 Fix EFI booting for ISOs generated by mkksiso
If the original ISO contains both `efiboot.img` and `macboot.img`,
the current `xorrisofs` invocation does not configure `efiboot.img`
to be bootable, only `macboot.img`.

This fix uses `>=` to compare `efimode` against `EFIBOOT`, since
`MACBOOT` implies `EFIBOOT` as well.

This is similar to the logic for `mkisofs`.

Fixes #1046.

Generated image confirmed to work, when comparing the reports:

  `xorriso -indev $PATH_TO_ISO -report_el_torito cmd`

```
❯ diff -u ~/xorriso-report-{orig,new}.log
--- /home/michel/xorriso-report-orig.log        2020-07-15 20:01:01.405289018 -0700
+++ /home/michel/xorriso-report-new.log 2020-07-15 20:01:19.183555423 -0700
@@ -1,6 +1,6 @@
--volid 'Fedora-S-dvd-x86_64-32'
--volume_date uuid '2020042219432600'
--boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'/home/michel/Downloads/Fedora-Server-netinst-x86_64-32-1.6.iso'
+-volid 'Fedora-32-btrfs'
+-volume_date uuid '2020071602410900'
+-boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'/home/michel/src/github/michel-slm/luks-kickstarts/iso/Fedora-32-WS-20200715-3.iso'
 -boot_image any partition_cyl_align=on
 -boot_image any partition_offset=0
 -boot_image any partition_hd_cyl=64
@@ -14,12 +14,6 @@
 -boot_image any load_size=2048
 -boot_image any boot_info_table=on
 -boot_image any next
--boot_image any efi_path='/images/efiboot.img'
--boot_image any platform_id=0xef
--boot_image any emul_type=no_emulation
--boot_image any load_size=11462656
--boot_image isolinux partition_entry=gpt_basdat
--boot_image any next
 -boot_image any efi_path='/images/macboot.img'
 -boot_image any platform_id=0xef
 -boot_image any emul_type=no_emulation
```

```
❯ diff -u ~/xorriso-report-{orig,new5}.log
--- /home/michel/xorriso-report-orig.log        2020-07-15 20:01:01.405289018 -0700
+++ /home/michel/xorriso-report-new5.log        2020-07-15 20:30:27.571644770 -0700
@@ -1,6 +1,6 @@
--volid 'Fedora-S-dvd-x86_64-32'
--volume_date uuid '2020042219432600'
--boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'/home/michel/Downloads/Fedora-Server-netinst-x86_64-32-1.6.iso'
+-volid 'Fedora-32-btrfs'
+-volume_date uuid '2020071603283100'
+-boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'./iso/Fedora-32-WS-20200715-5.iso'
 -boot_image any partition_cyl_align=on
 -boot_image any partition_offset=0
 -boot_image any partition_hd_cyl=64
@@ -17,7 +17,7 @@
 -boot_image any efi_path='/images/efiboot.img'
 -boot_image any platform_id=0xef
 -boot_image any emul_type=no_emulation
--boot_image any load_size=11462656
+-boot_image any load_size=11460608
 -boot_image isolinux partition_entry=gpt_basdat
 -boot_image any next
 -boot_image any efi_path='/images/macboot.img'
```

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
2020-07-16 08:48:58 -07:00
Alexander Todorov
0b5285a3e2 tests: Disable cloud-init status check
Fails on Fedora 32 and we are going to decommission this test
very soon, leaving only composer-cli related tests here. All image
building and verification tasks are already in the osbuild-composer
test suite!
2020-07-10 08:36:19 -07:00
Brian C. Lane
c080180885 Automatic commit of package [lorax] release [33.6-1].
Created by command:

/usr/bin/tito tag
2020-06-18 11:54:13 -07:00
Brian C. Lane
e91e38e29c lorax.spec: Add psmisc for fuser debugging of failed umounts in pylorax.imgutils
Fixes #1016
2020-06-18 11:53:18 -07:00
Brian C. Lane
03ff3bb53a composer-cli: Disable retry counter on connection timeout
urllib3 has a retry system that send the request again when the
connection fails, times out, is redircted, etc. This turns off retries,
which aren't very useful anyway.
2020-06-17 09:52:49 -07:00
Brian C. Lane
65d7397cf2 composer-cli: Change timeout to 5 minutes
In some cases osbuild-composer with an empty cache can take longer than
a minute to depsolve and start a compose.
2020-06-16 16:36:42 -07:00
Brian C. Lane
261e5af463 Automatic commit of package [lorax] release [33.5-1].
Created by command:

/usr/bin/tito tag
2020-06-11 09:45:07 -07:00
Brian C. Lane
432a558ad6 lorax-composer: Add deprecation notice to documentation
Related: rhbz#1844649
2020-06-11 09:37:12 -07:00
Brian C. Lane
bf1be846e5 composer-cli: Return a better error with no value
And add tests for the get_size function.
2020-06-11 09:36:32 -07:00
Brian C. Lane
9a17eba974 tests: Add tests for composer-cli compose start JSON POST 2020-06-11 09:36:32 -07:00
Brian C. Lane
a3c4fbb66c composer-cli: Update bash completion for start-ostree 2020-06-11 09:36:32 -07:00
Brian C. Lane
e9b088068c composer-cli: Add new start-ostree command
This is used to start an ostree build, it is only supported on
ostree-composer, and requires the ostree ref and parent. It may also
include --size and optionally be uploaded.
2020-06-11 09:36:32 -07:00
Brian C. Lane
d97687a496 composer-cli: Add support for --size to compose start
osbuild-composer can support user specified image sizes, this adds an
optional argument, after start, to specify the size in MiB. eg.

    composer-cli compose start --size 2048 example-http-server qcow2

This only works when the backend is not 'lorax-composer', when it is the
user will get a warning that it will be ignored.
2020-06-11 09:36:32 -07:00
Dan Horák
0dbfe28745 include generic.ins for s390 boot iso
Include the generic.ins file on the s390 boot iso, so it's directly bootable
on an LPAR. The full iso already had generic.ins included.
2020-06-09 09:58:58 -07:00
Martin Pitt
9b8e0e2335 test: Put VM image overlay into /var/tmp
At least in our CI, the default place to store VM runtime overlays
(testvm.get_temp_dir()) points to a tmpfs file, so that tests can put VM
overlays into RAM and are not affected by slow I/O. But that doesn't
work for composer, as it tends to produce huge overlays due to real-life
OS composed trees.

Use /var/tmp/ instead, which is meant for large files.

Also simplify the VirtMachine invocation -- if `identity_file` is None,
that's fine -- it's the default value of that argument anyway.
2020-06-02 09:19:20 -07:00
Brian C. Lane
fa98321942 Automatic commit of package [lorax] release [33.4-1].
Created by command:

/usr/bin/tito tag
2020-06-01 14:16:32 -07:00
Brian C. Lane
3c745aed8d Revert "lorax: Remove vmlinuz from install.img /boot"
This reverts commit 6025da1421.

It ends up that using the install.img with qemu and PXE and fips=1 is a
common use case. Without vmlinuz in the install.img rootfs it has
nothing to run the check against.

Related: rhbz#1782737
2020-06-01 13:49:22 -07:00
Brian C. Lane
4b1a4f8f16 composer-cli: Add osbuild-composer to connection failure message 2020-06-01 11:27:57 -07:00
Brian C. Lane
f5de2de821 composer-cli: Update docs to mention osbuild-composer and debug options 2020-05-28 15:10:58 -07:00
Brian C. Lane
019cac8a7c lorax-composer: Check compose/status for invalid characters 2020-05-28 14:23:57 -07:00
Brian C. Lane
9a76c20c6b lorax-composer: deleting an unknown workspace should return an error
This changes the workspace delete behavior to match osbuild-composer's,
returning an error if the workspace doesn't exist.
2020-05-28 11:57:21 -07:00
Brian C. Lane
74f8cd4f34 lorax-composer: Check for valid characters in the undo commit
Return an error 400 with INVALID_CHARS if the commit characters are not
in the allowed list.
2020-05-28 09:39:23 -07:00
Dan Horák
564f78e629 drop 32-bit support from ppc live image grub.cfg
Seems petitboot can't properly parse the live image grub config on ppc, thus
booting fails on bare-metal. Fix the problem by removing the obsolete 32-bit
entries.
2020-05-19 14:10:50 -07:00
Brian C. Lane
f83ae2fed3 mksquashfs: Catch errors with mksquashfs and report them
The host system can run out of space while running mksquashfs, and while
this is logged to program.log it isn't detected by lorax or
livemedia-creator so it will continue running, possibly reporting
unrelated errors and causing confusion.

This adds checks for the return status when calling mksquashfs, logs it
to the log, and either exits or raises an error immediately.
2020-05-07 14:35:55 -07:00
Brian C. Lane
b97dea0450 Automatic commit of package [lorax] release [33.3-1].
Created by command:

/usr/bin/tito tag
2020-05-05 14:36:27 -07:00
Alexander Todorov
2e585c98f3 Don't use f-string without interpolation
resolves pylint W1309(f-string-without-interpolation)
2020-05-01 10:43:07 -07:00
Brian C. Lane
26e3bc555a lmc-no-virt: Add requirement on anaconda-install-env-deps
This makes sure that anaconda has all the expected modules available,
eg. libblockdev-plugins-all
2020-04-28 13:48:51 -07:00
Brian C. Lane
6fdb09f9e2 rsyslog: Disable journal ratelimits during install
Every log entry is sacred

Resolves: rhbz#1752754
2020-04-28 13:47:57 -07:00
Brian C. Lane
cb639fc30f Automatic commit of package [lorax] release [33.2-1].
Created by command:

/usr/bin/tito tag
2020-04-28 12:16:15 -07:00
Brian C. Lane
0f3b517f51 New lorax documentation - 33.2 2020-04-28 11:52:52 -07:00
Matej Marusak
0c44e84cdb
test: Work around invalid fedora baseurls
In the newest Fedora 31 refresh (and in Fedora 32) `baseurl` in repos
contains `download.example`. That is of course not a valid domain.

Closes #1001
2020-04-27 12:05:09 +02:00
Brian C. Lane
c9c1283c56 lorax: Add --skip-branding cmdline argument
Also document how branding currently works. See docs/lorax.rst

Resolves: rhbz#1826479
2020-04-21 15:57:54 -07:00
Chris Roberts
1d5a0a378b Update datastore for VMware testing
This change is needed for VMWare testing due to changes in the storage,
and the datastore we used before is not available for the time being.
2020-04-15 12:25:27 +03:00
Brian C. Lane
b992350f6b Automatic commit of package [lorax] release [33.1-1].
Created by command:

/usr/bin/tito tag
2020-03-30 10:13:16 -07:00
Brian C. Lane
6025da1421 lorax: Remove vmlinuz from install.img /boot
The kernel in /boot is not needed. Keep the .vmlinuz*hmac file so that
fips mode can check it (this requires dracut-050 or later).

Related: rhbz#1782737
2020-03-26 08:17:51 -07:00