Bug 1536515 - VDO Ansible module does not meet upstream Ansible code conventions
Summary: VDO Ansible module does not meet upstream Ansible code conventions
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vdo
Version: 7.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Bryan Gurney
QA Contact: Jakub Krysl
Depends On:
TreeView+ depends on / blocked
Reported: 2018-01-19 14:55 UTC by Bryan Gurney
Modified: 2019-08-06 13:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-06 13:08:04 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2233 None None None 2019-08-06 13:08:14 UTC

Description Bryan Gurney 2018-01-19 14:55:19 UTC
Description of problem:
In a (still pending) pull request to upstream Ansible (at https://github.com/ansible/ansible/pull/32267 ), the following issues were identified with the vdo.py Ansible module:

- If at all possible, options that appear to be boolean options should be boolean.  If there is a valid reason that said options should not be boolean, they should be documented in the "options" section of the DOCUMENTATION section.

- Any returned variables shall be documented in the RETURN section.  (The VDO module is using JSON variables for diagnostic, which are only visible in "ansible-playbook -vvv" execution.)  Using the "module.debug()" or "module.log()" function is strongly encouraged for module logging.

- In a November 20 update to the ansible-test suite, the "code-smell/no-underscore-variable.sh" test failed on numerous lines with the error "underscore used as a variable".

- Any items in the dictionary module_args that are "default=None", "type=str", or "required=false" are default values, and should not be specified in the definition of module_args.

Version-Release number of selected component (if applicable):

Comment 2 Louis Imershein 2018-01-19 18:04:08 UTC
At this point it seems clear to me that we're not making it into the Ansible package for this release.  So I recommend we stick with having our module in the vdo rpm for now.  As such, these changes only need to be made to the upstream contribution and don't need to be in 7.5 - i.e. we need to fix this, but we don't need an exception for 7.5.

Comment 4 Bryan Gurney 2018-08-03 20:36:16 UTC
The pull request for the VDO Ansible module (referenced above) was accepted on January 31, 2018, and Ansible 2.5 ships with the VDO Ansible module.

Comment 6 corwin 2018-12-04 19:47:24 UTC
Bryan, has this been fixed?

Comment 7 Bryan Gurney 2018-12-06 03:12:01 UTC
No, this has not yet been fixed in the Ansible VDO module in the vdo package.  

However, Ansible 2.5 has been released since March 2018, therefore the version of the VDO module with these fixes is already present in Ansible.

Comment 11 Bryan Gurney 2019-03-19 20:09:42 UTC
Since the VDO Ansible module has been upstream, the vdo.py module will be removed from the VDO package.

It will be available in ansible 2.5 or greater.

Comment 16 Jakub Krysl 2019-05-29 11:36:49 UTC
# rpm -qa vdo

# rpm -ql vdo | grep ansible

# cat /usr/share/doc/vdo/examples/ansible/README.txt 
This directory contains example playbooks for the "vdo" module in Ansible,
which can be used to create and remove VDO volumes, modify configuration
options, and start and stop VDO volumes.

The Ansible "vdo" module can be found in Ansible, version 2.5 or greater.
General information on Ansible can be found at http://docs.ansible.com/

To run a playbook:

1. On the control system, set up a passwordless SSH session via the
   "ssh-agent bash" and "ssh-add" commands.

2. Specify the managed hosts and groups by adding them to the
   /etc/ansible/hosts file on the control system.

3. Using the "hosts" value, construct a playbook detailing the desired state
   of the VDO volume.

4. When ready, execute "ansible-playbook <playbook.yml>".  For additional
   diagnostic output, run "ansible-playbook <playbook.yml> -vvvv".

So the vdo.py module is no longer shipper in vdo rpm and README.TXT contains info where to find it now.

Comment 18 errata-xmlrpc 2019-08-06 13:08:04 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.


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