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

tendrl-commons package should depend on specific minimal version of ansible #1054

Closed dahorak closed 5 years ago

dahorak commented 6 years ago

Accordingly to Tendrl/commons/issues/944 and discussion on gitter tendrl-commons depends on ansible in version 2.5 or higher:

we are actually changed tendrl code based on ansible 2.5 releases, So it won't work with ansible 2.4 series. We are already have issue for this and fixed https://github.com/Tendrl/commons/issues/944#event-1595594115

But in package requirements it is only ansible without any version specified (output truncated):

# rpm -qR tendrl-commons 
ansible
...

This "inconsistency" between real and specified requirements leads to unexpected and hardly understandable issues like this: https://www.redhat.com/archives/tendrl-devel/2018-June/msg00008.html

More detailed description

Package ansible in version 2.4.2.0-2.el7 is available in extras repository (by default available and enabled on any freshly installed CentOS machine). Package ansible in version 2.6.3-1.el7 is available from epel repository, which have to be additionally added (manually or in our case automatically by tendrl-ansible's site.yml playbook).

When I'll follow the tendrl-ansible's installation instructions and I'll firstly install tendrl-ansible on freshly installed Tendrl Server machine, it will automatically install ansible-2.4 from the extras repository as a dependency. As a next step, I'll launch site.yml playbook, which will add epel repository on Tendrl Server and all Gluster Storage Servers. Then it will install tendrl-commons package. Since this package depends on any version of ansible, it will install latest available ansible (2.6 from epel repository) on all Gluster Storage Servers, but didn't automatically update the existing ansible-2.4 on Tendrl Server.

Expected state

If tendrl-commons requires specific minimal version of ansible, it should be defined also in the package requirements, so it will be ensured, that the correct version of ansible is installed together with the tendrl-commons package.

GowthamShanmugam commented 6 years ago

@TimothyAsir

dahorak commented 6 years ago

Simple updating the required version in specfile leads to unwanted situation, when ansible package on Tendrl server is updated during execution of tendrl-ansible's site.yml playbook (if it is executed from Tendrl server), which will cause quite ugly error.

So we should definitely update the specfile with the required version of ansible, but we should also probably update the (pre)installation instructions so the proper version of ansible will be installed together with installation of tendrl-ansible package and not updated later when site.yml playbook is executed (this will require manual addition of epel repository).