Bug ID 1148809
Summary yast2 bootloader fails when lvmcache is in use
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component YaST2
Assignee yast2-maintainers@suse.de
Reporter aspiers@suse.com
QA Contact jsrain@suse.com
Found By ---
Blocker ---

[ Originally reported at: https://github.com/openSUSE/libstorage-ng/issues/664
]

I added an lvmcache cachepool to the LV for my root filesystem, and now YaST's
bootloader module fails due to not being able to detect the root filesystem.

How to reproduce:

1. Start with lvmcache disabled (i.e. normal LVM / filesystem, backed by
mdraid)
2. Observe `yast2 bootloader` works fine
3. Activate the cache LV which I previously setup:

       lvconvert --type cache --cachepool system/cache-root system/root

4. Run `yast2 bootloader` again
5. Observe that an Error dialog pops up, filled with a) lots of (apparently
harmless) warnings about an fd leak, and b) an error right at the end showing
that it cannot find the disk by LVM UUID:

       Execution of command "[["/usr/bin/grub2-editenv", "list"]]" failed. Exit
code: 1 Error output: File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 7 (pipe:[4428632]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 8
(pipe:[4428632]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv File descriptor 9 (pipe:[4428633]) leaked on vgs
invocation. Parent PID 18319: /usr/bin/grub2-editenv File descriptor 10
(pipe:[4428633]) leaked on vgs invocation. Parent PID 18319:
/usr/bin/grub2-editenv /usr/bin/grub2-editenv: error: disk
`lvmid/m4f2UJ-widt-pyk9-QkKY-KyJQ-pbwq-V8zzwL/MsUIK0-r51d-MJck-aQwk-ZiAS-A2BI-XdT2vl'
not found.

6. Click OK (the only available button) on this dialog
7. Now I see the same dialog I originally reported at the top of this issue.
8. Click `Continue`
9. Observe another dialog:

       Probing file system with UUID cad8b62c-88e5-4c19-ad24-06e75c0a8987
failed

       Unexpected situation found in the system.

       Click below to see more details (English only).

       Continue despite the error?

                  Continue   Abort  Details

10. Clicking `Details` shows:

       device not found, name:/dev/mapper/system-root

11. Click `OK` then `Continue` to continue despite the error
12. Observe another error dialog:

        Internal error. Please report a bug report with logs.
        Run save_y2logs to get complete logs.

        Caller: /usr/share/YaST2/modules/BootStorage.rb:246:in `detect_disks'

        Details: Missing '/' mount point

13. Click `OK` and yast exits.

Clearly there is some side effect of attaching the cache LV which somehow
confuses the disk detection code.  I see in the error above that it's looking
for
`lvmid/m4f2UJ-widt-pyk9-QkKY-KyJQ-pbwq-V8zzwL/MsUIK0-r51d-MJck-aQwk-ZiAS-A2BI-XdT2vl`,
which seems to correspond OK to the uuids shown here:

    # dmsetup info system-root
    Name:              system-root
    State:             ACTIVE
    Read Ahead:        1024
    Tables present:    LIVE
    Open count:        1
    Event number:      0
    Major, minor:      254, 0
    Number of targets: 1
    UUID: LVM-m4f2UJwidtpyk9QkKYKyJQpbwqV8zzwLMsUIK0r51dMJckaQwkZiASA2BIXdT2vl

    # lvdisplay system/root
      --- Logical volume ---
      LV Path                /dev/system/root
      LV Name                root
      VG Name                system
      LV UUID                MsUIK0-r51d-MJck-aQwk-ZiAS-A2BI-XdT2vl
      LV Write Access        read/write
      LV Creation host, time install, 2018-12-31 13:15:41 +0000
      LV Cache pool name     cache-root
      LV Cache origin name   root_corig
      LV Status              available
      # open                 1
      LV Size                500.00 GiB
      Cache used blocks      0.04%
      Cache metadata blocks  6.47%
      Cache dirty blocks     0.00%
      Cache read hits/misses 2 / 15
      Cache wrt hits/misses  653 / 572
      Cache demotions        0
      Cache promotions       336
      Current LE             128000
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     1024
      Block device           254:0


You are receiving this mail because: