Tendrl / commons

Common code usable by all Tendrl components
http://www.tendrl.org
GNU Lesser General Public License v2.1
4 stars 23 forks source link

specify minimal required ansible version #1055

Closed dahorak closed 5 years ago

dahorak commented 6 years ago

Signed-off-by: Daniel Horak dahorak@redhat.com

dahorak commented 6 years ago

run tests

dahorak commented 6 years ago

There might be some problem with the running ansible updating itself on the Tendrl server. I'll need to debug it slightly more deeply.

dahorak commented 6 years ago

This patch might cause update of ansible package on Tendrl Server, when ansible-playbook is running (with site.yml), which probably cause following error:

TASK [tendrl-ansible.tendrl-server : Configure etcd and graphite ip addr in node-agent.conf.yaml] ***
task path: /usr/share/ansible/roles/tendrl-ansible.tendrl-server/tasks/tendrl-node-agent.yml:12
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 96, in run
    try:
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 296, in _run_loop
    if loop_var in task_vars:
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 528, in _execute
  File "/usr/lib/python2.7/site-packages/ansible/plugins/action/normal.py", line 43, in run
    wrap_async = self._task.async_val and not self._connection.has_native_async
AttributeError: 'Task' object has no attribute 'async_val'

fatal: [n53.dusty.ci.centos.org]: FAILED! => {
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
}

I'm not sure now, what is the best solution for this.

anmolsachan commented 6 years ago

@dahorak If we update the spec file of tendrl-ansible itself ( https://github.com/Tendrl/tendrl-ansible/blob/4acae343ad4fab4f16ce330e047403374d0cb7a6/tendrl-ansible.spec#L15 ) , Wouldn't it solve the issue ?

dahorak commented 6 years ago

As I wrote under the related issue, the main "problem" here is, that the expected ansible version (2.6) is in epel repository, which is added "automatically" when tendrl-ansible's site.yml playbook is executed. Based on the current documentation, when tendrl-ansible is installed, only the older version of ansible is available (from CentOS-7 - Extras). So we should also update the (pre)installation instructions to add epel repository manually before tendrl-ansible package is installed.

mbukatov commented 6 years ago

@anmolsachan both tendrl-ansible and tendrl-commons requires ansible, so both should specify the minimal version. In upstream, one can try to use tendrl-ansible on another machine or install it from git repo, and in such case, minimal version in tendrl-commons will have it's effect.

GowthamShanmugam commented 5 years ago

@dahorak Need to specify the minimum version of ansible in setup.py also, otherwise it won't work when I do python setup.py, install.

codecov[bot] commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@5e78bae). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1055   +/-   ##
=========================================
  Coverage          ?   82.39%           
=========================================
  Files             ?       90           
  Lines             ?     3709           
  Branches          ?      477           
=========================================
  Hits              ?     3056           
  Misses            ?      555           
  Partials          ?       98

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5e78bae...3bd3c2a. Read the comment docs.

GowthamShanmugam commented 5 years ago

LGMT

anmolsachan commented 5 years ago

LGTM

shtripat commented 5 years ago

LGTM

shtripat commented 5 years ago

Fix the commit message, pep8 and squash in one commit.