Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-95550

Fix identification of boom managed boot entries [rhel-8.10.z]

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • rhel-8.10.z
    • boom-boot
    • None
    • rhel-storage-management
    • ssg_platform_storage
    • 2
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      List boot entries using the (unreleased) boom-1.3-4.el8_10

      What is the impact of this issue to you?

      boom list command produces noisy output, duplicates rescue entries in /boot/loader/entries

      Please provide the package NVR for which the bug is seen:

      boom-1.3-4.el8_10 (scratch build from private-bmr-RHEL-54220

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. boom list

      Expected results

      # boom list
      BootID  Version                       Name                     RootDevice           
      563ace5 4.18.0-513.5.1.el8_9.x86_64   Red Hat Enterprise Linux /dev/mapper/rhel-root
      e52ff8c 4.18.0-553.16.1.el8_10.x86_64 Red Hat Enterprise Linux /dev/mapper/rhel-root
      db7226f 5.14.0-427.28.1.el9_4.x86_64  Red Hat Enterprise Linux /dev/mapper/rhel-root
      af8c4bd 5.14.0-427.28.1.el9_4.x86_64  Red Hat Enterprise Linux /dev/rhel/root
      

      Actual results

      # boom list
      ERROR - Error unlinking entry file None: unlink: path should be string, bytes or os.PathLike, not NoneType
      BootID  Version                       Name                     RootDevice                            
      563ace5 4.18.0-513.5.1.el8_9.x86_64   Red Hat Enterprise Linux /dev/mapper/rhel-root                 
      e52ff8c 4.18.0-553.16.1.el8_10.x86_64 Red Hat Enterprise Linux /dev/mapper/rhel-root                 
      db7226f 5.14.0-427.28.1.el9_4.x86_64  Red Hat Enterprise Linux /dev/mapper/rhel-root                 
      af8c4bd 5.14.0-427.28.1.el9_4.x86_64  Red Hat Enterprise Linux /dev/rhel/root 
      

      With -V --debug=all the problem is easier to understand:

      # boom list -V --debug=all 
      INFO - Marking unknown boot entry as read-only: 72f7603c050245ef895994d0c3aa26de-4.18.0-513.5.1.el8_9.x86_64.conf
      INFO - Entry file name does not match boot_id: 72f7603c050245ef895994d0c3aa26de-0-rescue.conf
      INFO - Rewrote entry a82a4bd as /boot/loader/entries/72f7603c050245ef895994d0c3aa26de-a82a4bd-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      ERROR - Error unlinking entry file None: unlink: path should be string, bytes or os.PathLike, not NoneType
      INFO - Marking unknown boot entry as read-only: 72f7603c050245ef895994d0c3aa26de-4.18.0-553.16.1.el8_10.x86_64.conf
      INFO - Marking unknown boot entry as read-only: 72f7603c050245ef895994d0c3aa26de-5.14.0-427.28.1.el9_4.x86_64.conf
      INFO - Entry file name does not match boot_id: 72f7603c050245ef895994d0c3aa26de-a82a4bd-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      INFO - Rewrote entry f2452ae as /boot/loader/entries/72f7603c050245ef895994d0c3aa26de-f2452ae-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      ERROR - Error unlinking entry file None: unlink: path should be string, bytes or os.PathLike, not NoneType
      INFO - Entry file name does not match boot_id: 72f7603c050245ef895994d0c3aa26de-f2452ae-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      INFO - Rewrote entry 16c8ce6 as /boot/loader/entries/72f7603c050245ef895994d0c3aa26de-16c8ce6-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      ERROR - Error unlinking entry file None: unlink: path should be string, bytes or os.PathLike, not NoneType
      INFO - Entry file name does not match boot_id: 72f7603c050245ef895994d0c3aa26de-16c8ce6-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      INFO - Rewrote entry fe88c10 as /boot/loader/entries/72f7603c050245ef895994d0c3aa26de-fe88c10-0-rescue-72f7603c050245ef895994d0c3aa26de.conf
      ERROR - Error unlinking entry file None: unlink: path should be string, bytes or os.PathLike, not NoneType
      BootID  Version                       Name                     RootDevice            Options                                                                                                                                                                                                  MachineID 
      563ace5 4.18.0-513.5.1.el8_9.x86_64   Red Hat Enterprise Linux /dev/mapper/rhel-root root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M                                 72f7603c05
      e52ff8c 4.18.0-553.16.1.el8_10.x86_64 Red Hat Enterprise Linux /dev/mapper/rhel-root root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M                                 72f7603c05
      db7226f 5.14.0-427.28.1.el9_4.x86_64  Red Hat Enterprise Linux /dev/mapper/rhel-root root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet rd.plymouth=0 plymouth.enable=0 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M $tuned_params 72f7603c05
      af8c4bd 5.14.0-427.28.1.el9_4.x86_64  Red Hat Enterprise Linux /dev/rhel/root        root=/dev/rhel/root ro rd.lvm.lv=rhel/root resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/swap rhgb quiet rd.plymouth=0 plymouth.enable=0 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M                      72f7603c05
      

      Boom is attempting to repair entries that it thinks have a mismatched boot_id, this is due to inclusion of:

      commit 40d96634870e16ff3e719e16e432b7c9bf803181
      Author: Bryn M. Reeves <bmr@redhat.com>
      Date:   Tue May 14 10:46:07 2024 -0400
      
          boom.bootloader: repair boom entries with mismatched boot_id
          
          When loading a boom boot entry from a file name that does not match the
          boot_id re-write the entry so that it can be manipulated by future
          invocations of the boom command.
          
          Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
      

      But this is missing a pre-requisite that prevents this action being taken on system-managed boot entries:

      commit 9c03c2534b4b203ad1c6c27166c30ba57673eab5
      Author: Bryn M. Reeves <bmr@redhat.com>
      Date:   Tue May 14 10:43:14 2024 -0400
      
          boom.bootloader: make BOOM_ENTRIES_PATTERN more strict
          
          The original BOOM_ENTRIES_PATTERN regex matches the system-provided
          rescue entries on Red Hat systems, which is not intended:
          
          r"(\w*)-(\w{1,7})-([a-zA-Z0-9.\-_]*)" -> b1609d18cd704009b4e3f4142ec64eba-0-rescue.conf
          
          Make the regex more strict by only matching a 7 character boot_id and
          check for the trailing ".conf":
          
          r"(\w*)-([0-9a-f]{7,})-.*\.conf"
      

              rhn-support-bmr Bryn Reeves
              rhn-support-bmr Bryn Reeves
              Bryn Reeves Bryn Reeves
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: