Bug 1541170

Summary: VDO Ansible module does not change block map cache size for existing volume
Product: Red Hat Enterprise Linux 7 Reporter: Bryan Gurney <bgurney>
Component: vdoAssignee: Bryan Gurney <bgurney>
Status: CLOSED ERRATA QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, jkrysl, limershe
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.1.1.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 09:38:49 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:

Description Bryan Gurney 2018-02-01 22:38:18 UTC
Description of problem:
After having created a VDO volume via the VDO Ansible module, if a playbook with a different "blockmapcachesize" value is executed with "ansible-playbook <blockmapcacheexpand_playbook>", where the "blockmapcacheexpand_playbook" file contains the line "blockmapcachesize:" with a size different from the currently configured size.

Version-Release number of selected component (if applicable):
Found in the version of the Ansible module from 6.1.0.98, after having applied the (still pending at this time) fixes from BZ 1536214, BZ 1536522, BZ 1536635, and BZ 1536564.

How reproducible:
100%

Steps to Reproduce:
1. Execute ansible-playbook against the target host with a playbook containing the following "vdo" section, to create a VDO volume on device /dev/md0:
  - name: Create VDO volume vdo1
    vdo:
      name: vdo1
      state: present
      device: /dev/md0
      logicalsize: 2T

2. Execute ansible-playbook against the same target host with a playbook containing the following "vdo" section, to modify the existing VDO volume "vdo1":
  - name: Create VDO volume vdo1
    vdo:
      name: vdo1
      state: present
      device: /dev/md0
      logicalsize: 2T
      blockmapcachesize: 5G


Actual results:
The play finishes with status "ok" and "changed=0".  The VDO volume retains its previous block map cache setting (the default is 128M).

Expected results:
The play finishes with status "ok" and "changed=1".  The VDO volume updates its configuration to the new block map cache setting (so long as it is possible in the current configuration).

Additional info:

Comment 2 Bryan Gurney 2018-02-02 14:45:58 UTC
To clarify the description: if a playbook is executed that would ideally modify the block map cache size, it would result in no change.  Ideally, this should result in a change.

Comment 6 Jakub Krysl 2018-09-18 14:24:18 UTC
# rpm -qa vdo
vdo-6.1.1.120-3.el7.x86_64

$ ansible-playbook BZ1541170.yaml                                                                                                                                                     

PLAY [vdoClients] *************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [storageqe-74.lab.eng.brq.redhat.com]

TASK [Create VDO volume vdo1] *************************************************************************************************************************************************************************************
changed: [storageqe-74.lab.eng.brq.redhat.com]

TASK [Change block map cache size] ********************************************************************************************************************************************************************************
changed: [storageqe-74.lab.eng.brq.redhat.com]

PLAY RECAP ********************************************************************************************************************************************************************************************************
storageqe-74.lab.eng.brq.redhat.com : ok=3    changed=2    unreachable=0    failed=0


# vdo stop --name vdo1; vdo start --name vdo1
Stopping VDO vdo1
Starting VDO vdo1
Starting compression on VDO vdo1
VDO instance 14 volume is ready at /dev/mapper/vdo1

# vdo status --name vdo1 | grep "block map cache size"
        block map cache size: 5368709120

Comment 8 errata-xmlrpc 2018-10-30 09:38:49 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