RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1704263 - zipl fails the BLS title field contains trailing spaces and is set as default
Summary: zipl fails the BLS title field contains trailing spaces and is set as default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: s390utils
Version: 8.1
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Dan Horák
QA Contact: Vilém Maršík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-29 12:59 UTC by Javier Martinez Canillas
Modified: 2020-11-04 02:01 UTC (History)
1 user (show)

Fixed In Version: s390utils-2.6.0-29.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:58:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
zipl-remove-trailing-spaces-from-the-fields-defined-.patch (4.61 KB, patch)
2019-05-03 13:10 UTC, Javier Martinez Canillas
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4537 0 None None None 2020-11-04 01:59:13 UTC

Description Javier Martinez Canillas 2019-04-29 12:59:06 UTC
Description of problem:

If the 'title' field in a BLS file contains trailing spaces and it's set as the default entry, zipl fails since isn't able to find the entry with that title.

Version-Release number of selected component (if applicable):

s390utils-base-2.6.0-14.el8.s390x

How reproducible:


Steps to Reproduce:
1. Append a space to the title field of a BLS entry, i.e: /boot/loader/entries/$(cat /etc/machine-id)-$(uname -r).conf.
2. Set that entry as the default, i.e: grubby --set-default /boot/vmlinuz-$(uname -r
3. Run zipl.

Actual results:

zipl fails with the following error:

Error: Config file '/etc/zipl.conf': Line 6: no such section 'Red Hat Enterprise Linux (4.18.0-80.20.el8.s390x) 8.1 (Ootpa)'

Expected results:

It should succeed and print something like the following message:

Adding #1: IPL section 'Red Hat Enterprise Linux (4.18.0-80.20.el8.s390x) 8.1 (Ootpa)' (default)

Additional info:

Removing the trailing space from the BLS title field makes it work again.

Comment 1 Javier Martinez Canillas 2019-05-03 13:10:25 UTC
Created attachment 1562439 [details]
zipl-remove-trailing-spaces-from-the-fields-defined-.patch

Proposed a fix upstream: https://github.com/ibm-s390-tools/s390-tools/pull/62
and attached a patch to the s390utils package.

Tested by adding a trailing space at the end of a BLS title field value, it fails with the current zipl but works with the patched one: 

# rpm -qf /usr/sbin/zipl
s390utils-base-2.6.0-14.el8.s390x

# grubby --set-default /boot/vmlinuz-4.18.0-80.20.el8.s390x
The default is /boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-4.18.0-80.20.el8.s390x.conf with index 0 and kernel /boot/vmlinuz-4.18.0-80.20.el8.s390x                                                                                

# zipl --dry-run
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-4.18.0-80.20.el8.s390x.conf'
Using BLS config file '/boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-0-rescue.conf'
Error: Config file '/etc/zipl.conf': Line 6: no such section 'Red Hat Enterprise Linux (4.18.0-80.20.el8.s390x) 8.1 (Ootpa)'

# dnf update s390utils-base -y

# rpm -qf /usr/sbin/zipl
s390utils-base-2.6.0-15.el8.s390x

 zipl --dry-run
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-4.18.0-80.20.el8.s390x.conf'
Using BLS config file '/boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-0-rescue.conf'
Starting dry-run, target device contents will NOT be modified
Building bootmap in '/boot'
Building menu 'zipl-automatic-menu'
Adding #1: IPL section 'Red Hat Enterprise Linux (4.18.0-80.20.el8.s390x) 8.1 (Ootpa)' (default)
Adding #2: IPL section 'Red Hat Enterprise Linux (0-rescue-f871a0cf218348c5ba921f61c92b7eac) 8.1 (Ootpa)'
Preparing boot device: dasda (0120).
Done.

Comment 4 Dan Horák 2020-05-28 08:27:36 UTC
marking as TestOnly, the fix goes in via the zipl rebase in bug 1821250

Comment 6 Vilém Maršík 2020-07-17 09:25:35 UTC
Reproduced on 8.2.0 with s390utils-base-2.6.0-28.el8.s390x :
# vim /boot/loader/entries/8aeefdf575dc463f81b78413bfa6bfd4-4.18.0-193.el8.s390x.conf
# grubby --set-default /boot/vmlinuz-$(uname -r)
The default is /boot/loader/entries/8aeefdf575dc463f81b78413bfa6bfd4-4.18.0-193.el8.s390x.conf with index 0 and kernel /boot/vmlinuz-4.18.0-193.el8.s390x
# zipl
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/8aeefdf575dc463f81b78413bfa6bfd4-4.18.0-193.el8.s390x.conf'
Using BLS config file '/boot/loader/entries/8aeefdf575dc463f81b78413bfa6bfd4-0-rescue.conf'
Error: Config file '/etc/zipl.conf': Line 7: no such section 'Red Hat Enterprise Linux (4.18.0-193.el8.s390x) 8.2 (Ootpa)'

Comment 7 Vilém Maršík 2020-07-17 13:00:41 UTC
Looks fixed on RHEL-8.3.0-20200717.n.0:
# ls /boot/loader/entries/$(cat /etc/machine-id)-$(uname -r).conf
/boot/loader/entries/b5fb72ad9abc43999460975d68045748-4.18.0-226.el8.s390x.conf
# vim /boot/loader/entries/b5fb72ad9abc43999460975d68045748-4.18.0-226.el8.s390x.conf
# grubby --set-default /boot/vmlinuz-$(uname -r)
The default is /boot/loader/entries/b5fb72ad9abc43999460975d68045748-4.18.0-226.el8.s390x.conf with index 0 and kernel /boot/vmlinuz-4.18.0-226.el8.s390x
# zipl
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/b5fb72ad9abc43999460975d68045748-4.18.0-226.el8.s390x.conf'
Using BLS config file '/boot/loader/entries/b5fb72ad9abc43999460975d68045748-0-rescue.conf'
Building bootmap in '/boot'
Building menu 'zipl-automatic-menu'
Adding #1: IPL section 'Red Hat Enterprise Linux (4.18.0-226.el8.s390x) 8.3 (Ootpa)' (default)
Adding #2: IPL section 'Red Hat Enterprise Linux (0-rescue-b5fb72ad9abc43999460975d68045748) 8.3 (Ootpa)'
Preparing boot device: dasda (0120).
Done.

Comment 10 errata-xmlrpc 2020-11-04 01:58:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (s390utils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4537


Note You need to log in before you can comment on or make changes to this bug.