Bug 1564181 - vdo create --vdoSlabSize allows 0
Summary: vdo create --vdoSlabSize allows 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vdo
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joseph Chapman
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-05 14:58 UTC by Jakub Krysl
Modified: 2019-03-06 02:06 UTC (History)
5 users (show)

Fixed In Version: 6.1.1.79
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:39:22 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3094 0 None None None 2018-10-30 09:39:50 UTC

Description Jakub Krysl 2018-04-05 14:58:51 UTC
Description of problem:
vdo create --vdoSlabSize=0 seems to use defautl slab size (2G), but there is no mention about it in manpage or help.
manpage:
       --vdoSlabSize=megabytes
              Specifies the size of the increment by which a VDO is grown. Using a smaller size constrains the total maximum physical size that can be accommodated.  Must be a power of two between 128M and 32G.  Using a value with a S (sectors), B (bytes), K (kilo‐bytes), M (megabytes), G (gigabytes), T (terabytes), P (petabytes) or E (exabytes) suffix is optional. If no suffix is used, the value will be interpreted as megabytes. The default is 2G.

--help:
  --vdoSlabSize <megabytes>
                        Specifies the size of the increment by which a VDO is
                        grown. Using a smaller size constrains the total
                        maximum physical size that can be accommodated. Must
                        be a power of two between 128M and 32G; the default is
                        2G. Using a value with a S(ectors), B(ytes),
                        K(ilobytes), M(egabytes), G(igabytes), T(erabytes),
                        P(etabytes) or E(xabytes) suffix is optional. If no
                        suffix is used, the value will be interpreted as
                        megabytes.

Note: Some values allow using '0' as default, but I cannot see the merit in it. imho it just gives some confusion and makes the manpage unnecessary longer.

Version-Release number of selected component (if applicable):
vdo-6.1.0.149-16.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# vdo create --device=/dev/mapper/mpathb --name=vdo_test --vdoSlabSize 0

Actual results:
Creating VDO vdo_test
Starting VDO vdo_test
Starting compression on VDO vdo_test
VDO instance 134 volume is ready at /dev/mapper/vdo_test

Expected results:
ValueError: --vdoSlabSize must be a power of two between 128M and 32G

Additional info:

Comment 2 Andy Walsh 2018-04-05 15:03:04 UTC
At the very least, we should be consistent.  If other options allow '0' to imply the 'default', then this should as well.  It should also be documented, if it is not.

My general preference is that we shouldn't allow '0' to imply 'default', but I think that merits a larger discussion.

Comment 3 Louis Imershein 2018-04-05 20:08:49 UTC
(In reply to Andy Walsh from comment #2)
> At the very least, we should be consistent.  If other options allow '0' to
> imply the 'default', then this should as well.  It should also be
> documented, if it is not.
> 
> My general preference is that we shouldn't allow '0' to imply 'default', but
> I think that merits a larger discussion.

I agree with Andy, to the user,  0 != default

Comment 5 Jakub Krysl 2018-07-09 09:43:02 UTC
Tested on:
RHEL-7.6-20180626.0
kernel-3.10.0-915.el7
kmod-vdo-6.1.1.99-1.el7
vdo-6.1.1.99-2.el7

# vdo create --name vdo --device /dev/sdb --vdoSlabSize 0
usage: vdo create [-h] -n <volume> --device <devicepath>
                  [--activate {disabled,enabled}]
                  [--blockMapCacheSize <megabytes>]
                  [--blockMapPeriod <period>]
                  [--compression {disabled,enabled}]
                  [--deduplication {disabled,enabled}]
                  [--emulate512 {disabled,enabled}] [--force]
                  [--indexMem <gigabytes>] [--readCache {disabled,enabled}]
                  [--readCacheSize <megabytes>]
                  [--sparseIndex {disabled,enabled}]
                  [--vdoAckThreads <threadCount>]
                  [--vdoBioRotationInterval <ioCount>]
                  [--vdoBioThreads <threadCount>]
                  [--vdoCpuThreads <threadCount>]
                  [--vdoHashZoneThreads <threadCount>]
                  [--vdoLogicalSize <megabytes>]
                  [--vdoLogicalThreads <threadCount>]
                  [--vdoLogLevel {critical,error,warning,notice,info,debug}]
                  [--vdoPhysicalThreads <threadCount>]
                  [--vdoSlabSize <megabytes>]
                  [--writePolicy {async,sync,auto}] [-f <file>]
                  [--logfile <pathname>] [--verbose]
vdo create: error: argument --vdoSlabSize: must be a power of two between 128M and 32G

Comment 7 errata-xmlrpc 2018-10-30 09:39:22 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, 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-2018:3094


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