Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1544914 - boom should deal w/ user providing --rootlv /dev/vg/lv format
boom should deal w/ user providing --rootlv /dev/vg/lv format
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.5
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Bryn M. Reeves
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-13 13:09 EST by Corey Marthaler
Modified: 2018-04-10 11:25 EDT (History)
10 users (show)

See Also:
Fixed In Version: lvm2-2.02.177-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 11:25:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 None None None 2018-04-10 11:25 EDT

  None (edit)
Description Corey Marthaler 2018-02-13 13:09:52 EST
Description of problem:
The boom man page only shows examples of --roolv using the "vg/lv" format, but doesn't say "/dev/vg/lv" isn't allowed. Also, it appears boom deals with /dev/... with the --root-device option properly. 

[root@host-084 ~]# boom create --title "thin snapshot 1" --rootlv /dev/rhel_host-084/thin_snap1
Created entry with boot_id ad31c57:
  title thin snapshot 1
  machine-id fd56e7293a24478599960151915fe1e4
  version 3.10.0-847.el7.x86_64
  linux /vmlinuz-3.10.0-847.el7.x86_64
  initrd /initramfs-3.10.0-847.el7.x86_64.img
  options root=/dev//dev/rhel_host-084/thin_snap1 ro rd.lvm.lv=/dev/rhel_host-084/thin_snap1 rhgb quiet

[root@host-084 ~]# boom create --title "thin snapshot 1" --root-device /dev/rhel_host-084/thin_snap1
Created entry with boot_id 12b63e0:
  title thin snapshot 1
  machine-id fd56e7293a24478599960151915fe1e4
  version 3.10.0-847.el7.x86_64
  linux /vmlinuz-3.10.0-847.el7.x86_64
  initrd /initramfs-3.10.0-847.el7.x86_64.img
  options root=/dev/rhel_host-084/thin_snap1 ro  rhgb quiet

[root@host-084 ~]# boom create --title "thin snapshot 1" --root-device /dev/vda2
Created entry with boot_id 91cd04f:
  title thin snapshot 1
  machine-id fd56e7293a24478599960151915fe1e4
  version 3.10.0-847.el7.x86_64
  linux /vmlinuz-3.10.0-847.el7.x86_64
  initrd /initramfs-3.10.0-847.el7.x86_64.img
  options root=/dev/vda2 ro  rhgb quiet

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 3 Marian Csontos 2018-02-14 04:02:59 EST
(In reply to Corey Marthaler from comment #0)
> Description of problem:
> The boom man page only shows examples of --roolv using the "vg/lv" format,
> but doesn't say "/dev/vg/lv" isn't allowed. Also, it appears boom deals with
> /dev/... with the --root-device option properly. 

It does not.

> 
> [root@host-084 ~]# boom create --title "thin snapshot 1" --rootlv
> /dev/rhel_host-084/thin_snap1
> Created entry with boot_id ad31c57:
>   title thin snapshot 1
>   machine-id fd56e7293a24478599960151915fe1e4
>   version 3.10.0-847.el7.x86_64
>   linux /vmlinuz-3.10.0-847.el7.x86_64
>   initrd /initramfs-3.10.0-847.el7.x86_64.img
>   options root=/dev//dev/rhel_host-084/thin_snap1 ro
> rd.lvm.lv=/dev/rhel_host-084/thin_snap1 rhgb quiet
> 
> [root@host-084 ~]# boom create --title "thin snapshot 1" --root-device
> /dev/rhel_host-084/thin_snap1
> Created entry with boot_id 12b63e0:
>   title thin snapshot 1
>   machine-id fd56e7293a24478599960151915fe1e4
>   version 3.10.0-847.el7.x86_64
>   linux /vmlinuz-3.10.0-847.el7.x86_64
>   initrd /initramfs-3.10.0-847.el7.x86_64.img
>   options root=/dev/rhel_host-084/thin_snap1 ro  rhgb quiet

rd.lvm.lv is missing here ^

> 
> [root@host-084 ~]# boom create --title "thin snapshot 1" --root-device
> /dev/vda2
> Created entry with boot_id 91cd04f:
>   title thin snapshot 1
>   machine-id fd56e7293a24478599960151915fe1e4
>   version 3.10.0-847.el7.x86_64
>   linux /vmlinuz-3.10.0-847.el7.x86_64
>   initrd /initramfs-3.10.0-847.el7.x86_64.img
>   options root=/dev/vda2 ro  rhgb quiet
> 

Shall we open a separate bug for --root-device with LV?

Should --root-device try to identify the device, and if it is LV (or btrfs, or...) use proper kernel options? What is the component which sets kernel options (rd.lvm.lv, rd.luks.uuid,...) for root FS during installation? And shall boom use the same? RFE?
Comment 4 Marian Csontos 2018-02-14 04:13:52 EST
Could we get a blocker for this?

Risks: None. boom is new package, so we should get as much fixes as QE is reporting.

Benefits: Less reports from customers/users.
Comment 5 Bryn M. Reeves 2018-02-14 05:24:32 EST
We should have both in 7.5 imho: they're oversights that got missed during the last weeks of development and both should be handled (by a similar logic: the infrastructure for this is already there).
Comment 6 Bryn M. Reeves 2018-02-14 07:14:27 EST
commit e87835deba2036238d29ab0c566a0cf3b1c6b39c
Author: Bryn M. Reeves <bmr@redhat.com>
Date:   Wed Feb 14 11:09:25 2018 +0000

    boom: attempt to parse LV name from --root-device
    
    If --root-device is given, but --root-lv is not, attempt to parse
    the LVM2 logical volume name from the device string passed for
    --root-device. If this fails it is a non-LVM device and no error
    is reported (unless it fails the device presence check).
    Otherwise the parsed name is taken as the value of --root-lv and
    passed to the rd.lvm.lv parameter in generated boot entries.
    
    Signed-off-by: Bryn M. Reeves <bmr@redhat.com>

commit e22d937babff32560d1aa613afc5ba408aad749a
Author: Bryn M. Reeves <bmr@redhat.com>
Date:   Wed Feb 14 11:02:58 2018 +0000

    boom: allow /dev/vg/lv notation for --root-lv
    
    Allow the use of the /dev prefix when specifying an LVM2 logical
    volume (permitted by the LVM2 tools) and automatically remove
    it when specifying rd.lvm.lv.
    
    Also attempt to check that the LV name is in a valid format and
    generate an error if the --rootlv and --rootdevice arguments do
    not match.
    
    Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Comment 8 Corey Marthaler 2018-02-14 18:31:40 EST
Fix verified in the latest rpms.

3.10.0-848.el7.x86_64

lvm2-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-libs-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-cluster-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-lockd-2.02.177-3.el7    BUILT: Wed Feb 14 06:52:14 CST 2018
lvm2-python-boom-0.8.4-3.el7    BUILT: Wed Feb 14 07:10:51 CST 2018


[root@mckinley-03 ~]# boom create --title "thin snapshot 1" --root-device /dev/snapper/boom_snap
Created entry with boot_id aaec6db:
  title thin snapshot 1
  machine-id 99c24df6ee1b4f758788b62052ae1b4b
  version 3.10.0-848.el7.x86_64
  linux /vmlinuz-3.10.0-848.el7.x86_64
  initrd /initramfs-3.10.0-848.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet

[root@mckinley-03 ~]# boom create --title "thin snapshot 1" --root-device /dev/dev/dev/snapper/boom_snap
Device '/dev/dev/dev/snapper/boom_snap' not found.
Creating an entry with no valid root device requires --no-dev

[root@mckinley-03 ~]# boom create --title "thin snapshot 1" --root-lv /dev/snapper/boom_snap
snapper/boom_snap
Entry already exists (boot_id=aaec6db).

[root@mckinley-03 ~]# boom create --title "thin snapshot 2" --root-lv /dev/snapper/boom_snap
snapper/boom_snap
Created entry with boot_id b70d91f:
  title thin snapshot 2
  machine-id 99c24df6ee1b4f758788b62052ae1b4b
  version 3.10.0-848.el7.x86_64
  linux /vmlinuz-3.10.0-848.el7.x86_64
  initrd /initramfs-3.10.0-848.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet

[root@mckinley-03 ~]# boom create --title "thin snapshot 3" --root-lv snapper/boom_snap
snapper/boom_snap
Created entry with boot_id 7104851:
  title thin snapshot 3
  machine-id 99c24df6ee1b4f758788b62052ae1b4b
  version 3.10.0-848.el7.x86_64
  linux /vmlinuz-3.10.0-848.el7.x86_64
  initrd /initramfs-3.10.0-848.el7.x86_64.img
  options root=/dev/snapper/boom_snap ro rd.lvm.lv=snapper/boom_snap rhgb quiet
Comment 11 errata-xmlrpc 2018-04-10 11:25:23 EDT
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, 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/RHEA-2018:0853

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