Bug 1637646 - tendrl-ansible uses assert task syntax which is invalid since ansbile 2.7
Summary: tendrl-ansible uses assert task syntax which is invalid since ansbile 2.7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: web-admin-tendrl-ansible
Version: rhgs-3.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: RHGS 3.4.z Batch Update 1
Assignee: Nishanth Thomas
QA Contact: Filip Balák
URL:
Whiteboard:
Depends On:
Blocks: 1638043
TreeView+ depends on / blocked
 
Reported: 2018-10-09 16:17 UTC by Martin Bukatovic
Modified: 2018-10-31 08:45 UTC (History)
4 users (show)

Fixed In Version: tendrl-ansible-1.6.3-8.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1638043 (view as bug list)
Environment:
Last Closed: 2018-10-31 08:45:18 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Tendrl tendrl-ansible issues 124 0 None None None 2018-10-09 16:23:29 UTC
Red Hat Product Errata RHBA-2018:3427 0 None None None 2018-10-31 08:45:49 UTC

Description Martin Bukatovic 2018-10-09 16:17:59 UTC
Description of problem
======================

Package tendrl-ansible contains asserts statements in few places, so that
assumptions can be checked immediately.  The assert tasks contain explanation
of what went wrong, which is presented to the customer if the assert fails.

The problem is that the syntax used here is no longer valid since ansible 2.7,
which makes it fail during execution on the following error:

```
fatal: [localhost]: FAILED! => {"msg": "Incorrect type for fail_msg or msg, expected string and got <type 'list'>"}
```

This affects both prechecks playbook and site.yml playbook (so that it
blocks proper WA installation).

Version-Release
===============

ansible-2.7.0-1.el7ae.noarch
tendrl-ansible-1.6.3-7.el7rhgs.noarc

How reproducible
================

100 %

Steps to Reproduce
==================

1. Install ansible 2.7 from rhel-7-server-ansible-2-rpms channel
2. Install tendrl-ansible
3. Try to run prechecks playbook on any RHGSWA cluster:

```
ansible-playbook -i cluster.hosts prechecks.yml
```

Actual results
==============

Ansible immediately fails on type error for msg of 1st assert statement:

```
# ansible-playbook -i mbukatov-usm1.hosts prechecks.yml

PLAY [localhost] *******************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************
ok: [localhost]

TASK [Check if python dns is installed on ansible control machine] *****************************************************
ok: [localhost]

TASK [Abort the playbook if python dns is not installed] ***************************************************************
fatal: [localhost]: FAILED! => {"msg": "Incorrect type for fail_msg or msg, expected string and got <type 'list'>"}
        to retry, use: --limit @/home/usmqe/prechecks.retry

PLAY RECAP *************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=1 
```

Expected results
================

Ansible continues to run without failing on type error on msg attribute of
assert task.

Additional info
===============

This problem doesn't happen with ansible 2.6 and older.

Comment 3 Filip Balák 2018-10-12 07:32:56 UTC
I was able to run prechecks.yml and site.yml playbooks without error and install WA. --> VERIFIED

Tested with:
ansible-2.7.0-1.el7ae.noarch
tendrl-ansible-1.6.3-8.el7rhgs.noarch

Comment 5 errata-xmlrpc 2018-10-31 08:45:18 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:3427


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