Bug 1790983

Summary: 'vdo status --verbose' can report incorrect configurations with online volumes
Product: Red Hat Enterprise Linux 8 Reporter: Andy Walsh <awalsh>
Component: vdoAssignee: Susan LeGendre-McGhee <slegendr>
Status: CLOSED ERRATA QA Contact: Filip Suba <fsuba>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: awalsh, fsuba, slegendr
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.2.3.98 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:01:16 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:
Attachments:
Description Flags
Full Issue Reproduction Log none

Description Andy Walsh 2020-01-14 16:09:05 UTC
Description of problem:
A new Github issue came in where a user was asking about changing the "indexSparse" setting in /etc/vdoconf.yml (which is unsupported, but not impossible) to change the size of their index.  I decided to try this to see what effect this change had on the volume.  I created a fresh VDO volume, wrote some data, stopped the volume, edited the config file from a 0.25/dense index to now say it is 0.25/sparse, and then started the volume.  Everything came up fine, and deduplication was working.  When I run `vdo status --verbose`, the output indicates that the index is Sparse, which is not the case.  If I run `vdodumpconfig` against my backing device, the correct setting is displayed.

This bug is intended to adjust the behavior of VDO Manager to properly report configurations from `vdodumpconfig` when that is available, and only report the contents of /etc/vdoconf.yml when the live-data is not available.  There may be other values that are also affected by this.  Those should be adjusted as well if they are discovered.

Version-Release number of selected component (if applicable):
vdo-6.2.2.33-12.el8

How reproducible:
100%

Steps to Reproduce:
1. Create a VDO volume with default index settings (0.25/dense) `vdo create --name vdo0 --device /dev/loop0 --indexMem 0.25 --sparseIndex disabled`
2. Observe index setting `vdo status --verbose | grep 'Index sparse'`
3. Stop VDO volume `vdo stop --name vdo0`
4. Edit /etc/vdoconf.yml, changing "indexSparse: disabled" to "indexSparse: enabled"
5. Start VDO volume `vdo start --name vdo0`
6. Observe incorrect index setting `vdo status --verbose | grep 'Index sparse'`
7. Observe correct index setting `vdodumpconfig /dev/loop0 | grep sparse:`

Actual results:
[root@host-10-0-136-207 ~]# vdo status --verbose | grep 'Index sparse'
    Index sparse: enabled

Expected results:
[root@host-10-0-136-207 ~]# vdo status --verbose | grep 'Index sparse'
    Index sparse: disabled

Additional info:
This has no effect on the operation of the VDO volume, but should someone go in and modify this file, it can lead to confusion about its configuration.

Comment 1 Andy Walsh 2020-01-14 16:15:41 UTC
Created attachment 1652245 [details]
Full Issue Reproduction Log

Attached the full console output of the reproduction of this issue.

Comment 5 Andy Walsh 2020-06-18 19:37:21 UTC
This code has been updated and can be found in the latest version available.

Comment 6 Filip Suba 2020-07-22 09:39:13 UTC
Verified with vdo-6.2.3.107-14.el8.

Comment 9 errata-xmlrpc 2020-11-04 02:01:16 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 (kmod-kvdo 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-2020:4551