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 1901002 - Invalid syntax in 50-do-upgrade.sh
Summary: Invalid syntax in 50-do-upgrade.sh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: leapp-repository
Version: 7.9
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Leapp team
QA Contact: Alois Mahdal
URL:
Whiteboard:
Depends On:
Blocks: 1818077 1818088
TreeView+ depends on / blocked
 
Reported: 2020-11-24 08:50 UTC by Renaud Métrich
Modified: 2023-12-15 20:08 UTC (History)
3 users (show)

Fixed In Version: leapp-repository-0.13.0-1.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-16 08:59:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Renaud Métrich 2020-11-24 08:50:22 UTC
Description of problem:

When the initramfs-upgrade image boots, the following syntax error is hit in 50-do-upgrade.sh:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[   29.124153] upgrade[542]: //lib/dracut/hooks/upgrade/50-do-upgrade.sh: line 17: [: missing `]'
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

The corresponding code is below, clearly the "&&" operator is missing for /dev/mapper line 17:

/usr/lib/dracut/hooks/upgrade/50-do-upgrade.sh:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
 14 export NEWROOT=${NEWROOT:-"/sysroot"}
 15 
 16 NSPAWN_OPTS="--capability=all --bind=/sys --bind=/dev --bind=/dev/pts --bind=/run/systemd --bind=/proc"
 17 [ -d /dev/mapper ] NSPAWN_OPTS="$NSPAWN_OPTS --bind=/dev/mapper"
 18 export NSPAWN_OPTS="$NSPAWN_OPTS --bind=/run/udev --keep-unit --register=no --timezone=off --resolv-conf=off"
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------


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

leapp-repository-0.12.0-2.el7_9.noarch

How reproducible:

Always

Comment 2 Petr Stodulka 2020-11-24 14:57:03 UTC
Hi Renaud. Thanks for the report. It will be for sure fixed in the next release. Here is upstream PR with the fix:
- https://github.com/oamg/leapp-repository/pull/619

Comment 7 Alois Mahdal 2021-02-15 17:27:01 UTC
Unfortunately we haven't been able to pin-point what exactly the line affected by the syntax error did.

We know:
 *  The intent of the line is to bind mount /dev/mapper inside upgrade initramfs.

 *  Therefore, it's related to LVM and other /dev/mapper relared tech.

 *  On most configurations, the syntax error just causes the line to be effectively skipped.
    
 *  It's been reported that with some configurations (we don't know the details, though), the syntax
    error will cause the Dracut module to quit completely.

One suggested test case was to use LVM partitioning with separate /var and /var/log messages and check for presence of upgrade log after the FirstBoot.  This, however, worked fine regardless of the fix.


Previously, the regression test suite maintained by OAMG-QE had no LVM coverage.  What we did now was that we added several test cases with LVM with separate /usr, /var, /var/log and combinations of thereof, for RHEL-7/x86_64.  All these test cases have passed with

  - leapp-0.12.0-1.el7_9
  - leapp-repository-0.13.0-2.el7_9

Under the current circumstances we find it enough for SanityOnly verification.

---> VERIFIED/SanityOnly

Comment 9 errata-xmlrpc 2021-02-16 08:59:00 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 (leapp and leapp-repository 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-2021:0569


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