Bug 1821764

Summary: VDO volume creation fails with 'maxDiscardSize' option
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: SATHEESARAN <sasundar>
Component: gluster-ansibleAssignee: Gobinda Das <godas>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.5CC: asakthiv, godas, pprakash, puebele, rhs-bugs, sabose, sasundar, sheggodu
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.5.z Batch Update 2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gluster-ansible-infra-1.0.4-8.el8rhgs Doc Type: Bug Fix
Doc Text:
VDO volume creation fails when you set a maxDicardSize parameter, as the VDO Ansible module does not have a maxDiscardSize parameter implemented. With this fix, maxDiscardSize parameter value is set in all VDO volumes. VDO volumes are now created successfully.
Story Points: ---
Clone Of: 1821763 Environment:
rhhiv, rhel8
Last Closed: 2020-06-16 05:57:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1821763    

Description SATHEESARAN 2020-04-07 14:32:18 UTC
Description of problem:
-----------------------
VDO volume creation fails with 'maxDiscardSize' option set to 16M. This is because VDO ansible module doesn't provide that option while creating the VDO volume

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
ansible-2.9.6
gluster-ansible-infra-1.0.4-7

How reproducible:
-----------------
Always

Steps to Reproduce:
--------------------
1. Start RHHI-V deployment from cockpit, opting for VDO volume

Actual results:
----------------
VDO volume creation fails

Expected results:
------------------
VDO volume creation should be successful

Comment 2 SATHEESARAN 2020-04-08 05:07:12 UTC
VDO module - https://docs.ansible.com/ansible/latest/modules/vdo_module.html -  doesn't have an option 'maxDiscardSize' available for VDO volume creation.

So, to fix this one solution is to allow creation of VDO volume without, 'maxDiscardSize', modify the option later, then restart VDO volume.

The steps include:
1. Remove 'maxDiscardSize' from the existing VDO create options
2. Add a task to modify VDO option 'maxDiscardSize' to 16M for all VDO volumes
3. Stop all VDO volumes
4. Start all VDO volumes

Example ansible playbook:

- name: Set VDO maxDiscardSize as 16M
  command: "vdo modify -a --maxDiscardSize 16M"

- name: Restart all VDO volumes
  command: "vdo {{item}} -a"
  with_items:
  - stop
  - start

Comment 6 SATHEESARAN 2020-04-17 17:06:13 UTC
Tested with gluster-ansible-infra-1.0.4-8.el7rhgs with the following steps:

1. Start hyperconverged deployment from web console (cockpit)
2. Provide the proper values for host
3. Go with the default volumes
4. Enable 'Dedupe & compression' for the bricks
5. Complete the deployment

VDO creation is completed successfully and it has maxDiscardSize set to 16M

[root@ ]# dmsetup table | grep -i  discard
vdo_luks_sdc: 0 4194304000 vdo V2 /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-0708c9c1e3024ff68aafd5633b56d14b-luks_sdc 52424704 4096 32768 16380 on auto vdo_luks_sdc maxDiscard 4096 ack 1 bio 4 bioRotationInterval 64 cpu 2 hash 1 logical 1 physical 1

[root@ ]# vdo status | grep -i 'discard size'
    Max discard size: 16M

Comment 8 Gobinda Das 2020-06-11 12:29:14 UTC
RDT looks good to me.

Comment 10 errata-xmlrpc 2020-06-16 05:57:32 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/RHEA-2020:2575