RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1536214 - VDO Ansible module in the 6.1.0.114 package fails on modification operations
Summary: VDO Ansible module in the 6.1.0.114 package fails on modification operations
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: Bryan Gurney
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-18 22:15 UTC by Bryan Gurney
Modified: 2019-03-06 01:00 UTC (History)
4 users (show)

Fixed In Version: 6.1.0.142
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:50:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0871 0 None None None 2018-04-10 15:50:17 UTC

Description Bryan Gurney 2018-01-18 22:15:52 UTC
Description of problem:
The Ansible module for VDO (located in /usr/share/doc/vdo/examples/ansible/vdo.py of the vdo package) does not currently work with VDO 6.1.0.114, specifically after the introduction of the "auto" write policy.

Version-Release number of selected component (if applicable):
vdo-6.1.0.114-14.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install the vdo.py ansible module to the Ansible ".../modules/system" subdirectory of the system to run VDO, and a control system.
2. Copy one of the example playbooks from the /usr/share/doc/vdo/examples/ansible directory of the system with VDO to the control system, and create a playbook that uses a local username, acts on a block device existing on the system, and has various other parameters.  

Recommended sequence: use /usr/share/doc/vdo/examples/ansible/test_vdocreate.yml as a base for a creation playbook, /usr/share/doc/vdo/examples/ansible/test_vdoremove.yml as a base for a removal playbook, and a version of /usr/share/doc/vdo/examples/ansible/test_vdocreate.yml with the additional line "writepolicy: async" to act as a playbook to modify the write policy to async.

3. On the control system, after passwordless ssh has been established, execute "ansible-playbook <playbook_filename.yml>".

Actual results:
A playbook that results in a VDO volume being created or removed succeeds, but any playbook that results in a VDO modification displays a "fatal:" error containing "KeyError: 'Write policy'".

Expected results:
The Ansible playbook is able to create, modify, and remove a given VDO volume successfully.

Additional info:

Comment 2 Bryan Gurney 2018-02-06 14:46:08 UTC
Comment previously in BZ 1536522:

While working to resole bug 1536214 to get the VDO Ansible module working again, I found that an attempt to change the write policy fails due to the error "unrecognized arguments: --writePolicy=async".  This was previously successful, but is no longer a valid option (this is detailed in bug 1536166).

Comment 3 Bryan Gurney 2018-02-06 14:48:27 UTC
Comment previously in BZ 1536635:

After having fixed the problems that were preventing the VDO Ansible module from interacting with VDO (bug 1536214 and bug 1536522), I found that the module was running in a way that would always return a "changed" value of "True" if the state of deduplication or compression were changed, regardless of whether the operation actually did run.  This is incorrect; if the playbook tries to change something, and fails in a way that results in no change, it should show a "changed" return status for that task.

Comment 4 Bryan Gurney 2018-02-06 14:51:21 UTC
Comment previously in BZ 1536564:

While working to fix bug 1536214, I found that there are some cases where the VDO Ansible module may pass zero options to the "vdo modify" command.  This previously resulted in a return code 0 with no output, and no action taken, but with VDO 6.1.0.114, now seems to "fail" with a return code 2 and help screen.

Example of how this was found: use /usr/share/doc/vdo/examples/ansible/test_vdocreate.yml as a base for a creation playbook, /usr/share/doc/vdo/examples/ansible/test_vdoremove.yml as a base for a removal playbook, and a version of /usr/share/doc/vdo/examples/ansible/test_vdocreate.yml with the additional line "writepolicy: async" to act as a playbook to modify the write policy to async.

The failure mode seen:
The Ansible play fails with error text resembling the following error message from the VDO command:
usage: vdo modify [-h] (-a | -n <volume>) [--blockMapCacheSize <megabytes>]
                  [--blockMapPeriod <period>] [--readCache {disabled,enabled}]
                  [--readCacheSize <megabytes>]
                  [--vdoAckThreads <threadCount>]
                  [--vdoBioRotationInterval <ioCount>]
                  [--vdoBioThreads <threadCount>]
                  [--vdoCpuThreads <threadCount>]
                  [--vdoHashZoneThreads <threadCount>]
                  [--vdoLogicalThreads <threadCount>]
                  [--vdoPhysicalThreads <threadCount>] [-f <file>]
                  [--logfile <pathname>] [--verbose]
vdo modify: error: options must be specified from: --blockMapCacheSize, --blockMapPeriod, --readCache, --readCacheSize, --vdoAckThreads, --vdoBioRotationInterval, --vdoBioThreads, --vdoCpuThreads, --vdoHashZoneThreads, --vdoLogicalThreads, --vdoPhysicalThreads

Comment 6 Jakub Krysl 2018-02-09 11:07:02 UTC
with vdo.py ansible module from vdo-6.1.0.146-16 on server with the same version:

# ansible-playbook BZ1536214.yaml

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

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [storageqe-74.#####]

TASK [Create VDO volume vdo1] *************************************************************************************************************************************************************************************
changed: [storageqe-74.#####]

TASK [Change write policy of VDO volume vdo1 to async] ************************************************************************************************************************************************************
changed: [storageqe-74.#####]

TASK [Remove VDO volume vdo1] *************************************************************************************************************************************************************************************
changed: [storageqe-74.#####]

PLAY RECAP ********************************************************************************************************************************************************************************************************
storageqe-74.#####: ok=4    changed=3    unreachable=0    failed=0

Comment 9 errata-xmlrpc 2018-04-10 15:50:08 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-2018:0871


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