The bootloader plugin needs patched BLS entries with the TuneD variables.
It seems variables in the BLS entries is grub extension which is not
described in the BLS specification. It can cause boot problems with e.g.
systemd-boot, thus add variables to BLS entries only if the BLS entries
were generated by grub.
Resolves: rhbz#2323514
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Currently the 92-tuned.install kernel-install plugin modifies all
BLS snippets that match the KERNEL_INSTALL_MACHINE_ID passed to
the script.
This makes sense for the system managed entries but it conflicts
with entries that are managed by the boom boot manager: boom will
propagate these options if they are present when the entry is set
up, but the files should not be modified outside boom's control
since this will cause the boom boot identifier to change.
Boom boot entries include the boot_id in the file name pattern:
%{machine_id}-%{boot_id}-%{version}.conf
Compared to the system managed entries which use:
%{machine_id}-%{version}.conf
Modify 92-tuned.install to skip this change for files that match
the boom naming convention.
Rather than rely on the presence of '-' (which may appear in some
kernel builds, especially custom or debug kernels), use a regular
expression to match the 7-character or greater SHA1 hash that
appears in boom BLS snippet file names and the remaining structure
of the file name.
A paired change is made to the tuned.spec %postun script to apply
the same scope to the logic that reverts these changes on removal.
This gives the correct behaviour for me of continuing to add the
$tuned_... references to the system managed entries where needed,
but without causing unexpected changes to the boom boot entries.
The spec file also correctly reverts the change for the same set
of entries when %postun is executed.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Currently the 92-tuned.install kernel-install plugin adds the tuned params
to the BLS config files in s390x machines. But the zipl bootloader doesn't
have support for variables, which leads to cmdlines like the following:
root=/dev/mapper/rhel-root crashkernel=auto rd.dasd=0.0.541f rd.dasd=0.0.551f
rd.dasd=0.0.561f rd.dasd=0.0.571f rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap
cio_ignore=all,!condev rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portno=0
$tuned_params BOOT_IMAGE=0
Don't modify the BLS snippet since the zipl bootloader doesn't support the
variables and just make the script to exit if the architecture is s390x.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>