Bug 1872356
| Summary: | Leapp upgrade may lead to the grub prompt | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Christophe Besson <cbesson> |
| Component: | leapp-repository | Assignee: | Dominik Rehák <drehak> |
| Status: | CLOSED ERRATA | QA Contact: | Alois Mahdal <amahdal> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.8 | CC: | drehak, fkrska, mkluson, pstodulk |
| Target Milestone: | rc | Keywords: | Reproducer |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | leapp-repository-0.13.0-1.el7_9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-02-16 08:59:00 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1818077, 1818088 | ||
|
Description
Christophe Besson
2020-08-25 14:35:51 UTC
Hi Christopher, the problem seems to be in the comment following GRUB_CMDLINE_LINUX, rather than the newlines. This pattern works for the file you provided: ~~~ pattern = r'GRUB_CMDLINE_LINUX="[^"]+"(?!(\s*$)|(\s+GRUB+#))' ~~~ I'm still wondering about some edge cases - can the variable values be multiline? What if there are comments in the middle of them - can those be ignored or are they part of the value? Hmm strange, I'm almost sure it didn't work, that's why I suggested the customer to remove blank lines and comments and it worked.
> can the variable values be multiline? What if there are comments in the middle of them - can those be ignored or are they part of the value?
I think it's one line per variable, like in shell.
If value contains a space, double-quotes are needed.
If there is a # outside of a double-quote, everything on the right is stripped out.
To my opinion, using grub2-mkconfig is the best way to validate that thing.
Fixed in upstream. https://github.com/oamg/leapp-repository/commit/eb0011477e156a5a5274d716b79c8c1e4d223664 The bug was verified on versions: leapp-0.12.0-1.el7_9.noarch leapp-repository-0.13.0-2.el7_9.noarch Tests: [tmeta.tc.@bootloader/edgjunk-blockcmt_post] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543951 - PASS [tmeta.tc.@bootloader/edgjunk-blockcmt_pre] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543952 - PASS [tmeta.tc.@bootloader/edgjunk-inlinecmt_post] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543955 - PASS [tmeta.tc.@bootloader/edgjunk-inlinews_pre] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543958 - PASS [tmeta.tc.@bootloader/edgjunk-inlinews_post] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543957 - PASS [tmeta.tc.@bootloader/edgjunk-emptyline_pre] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543954 - PASS [tmeta.tc.@bootloader/edgjunk-emptyline_post] Test run (x86_64 only): https://beaker.engineering.redhat.com/recipes/9543953 - PASS 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 |