Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to ansible 2.4 #10

Closed
wants to merge 7 commits into from
Closed

Bump to ansible 2.4 #10

wants to merge 7 commits into from

Conversation

joshmoore
Copy link
Member

@joshmoore joshmoore commented Feb 2, 2018

Migrate OME resources to Ansible 2.4. Requires updating the molecule tests in all repositories.

@joshmoore
Copy link
Member Author

To get the various repos green, I'm currently testing with a fresh virtualenv that's only had pip install molecule run, giving most importantly:

$ pip freeze | grep -E ".*(ansible|molecule).*"
ansible==2.4.3.0
ansible-lint==3.4.19
molecule==2.7.0

but for completeness

$ pip freeze | grep -E ".*(ansible|molecule).*" -v
anyconfig==0.9.1
arrow==0.12.1
asn1crypto==0.24.0
attrs==17.4.0
backports.functools-lru-cache==1.4
bcrypt==3.1.4
binaryornot==0.4.4
cffi==1.11.4
chardet==3.0.4
click==6.7
click-completion==0.2.1
colorama==0.3.7
configparser==3.5.0
cookiecutter==1.5.1
cryptography==2.1.4
enum34==1.1.6
fasteners==0.14.1
flake8==3.3.0
funcsigs==1.0.2
future==0.16.0
git-url-parse==1.0.2
idna==2.6
ipaddress==1.0.19
Jinja2==2.9.6
jinja2-time==0.2.0
MarkupSafe==1.0
marshmallow==2.13.5
mccabe==0.6.1
monotonic==1.4
paramiko==2.4.0
pathspec==0.5.5
pbr==3.0.1
pexpect==4.2.1
pluggy==0.6.0
poyo==0.4.1
psutil==5.2.2
ptyprocess==0.5.2
py==1.5.2
pyasn1==0.4.2
pycodestyle==2.3.1
pycparser==2.18
pyflakes==1.5.0
PyNaCl==1.2.1
pytest==3.4.0
python-dateutil==2.6.1
python-gilt==1.1.0
PyYAML==3.12
sh==1.12.14
six==1.11.0
tabulate==0.7.7
testinfra==1.7.1
tree-format==0.1.2
whichcraft==0.4.1
yamllint==1.8.1

@joshmoore
Copy link
Member Author

The circular dependency here is going to hurt. I need to bump versions in ome/ansible-role-basedeps#4 to have travis do the proper verification. Time to split the meta package from this testing package?

cc: @manics @sbesson

@sbesson
Copy link
Member

sbesson commented Feb 7, 2018

Discussed today at the SA meeting. To some extent, we always know we need to fix this circular dependency at some point so no fundamental objection. Without too much tought it seems we could go with a structure like:

meta-package -> ome-ansible-role-{x,y} incl. individua-> testing package

Would the activation of the cron job across all individual role repos (barring the issues of automating this activation and the setup for new repos) make the downstream testing repo redundant or is it still valuable to have it typically to test an upstream dependency change across all roles?

Side comment, if we are adding shade, os_client to the meta-package, ome-ansible-molecule-dependencies is probably too specific as a name and we could even consider generalizing it name if we chose the route of extracting the meta package part into a different repo.

@manics
Copy link
Member

manics commented Feb 7, 2018

👎 to including openstack modules by default in this, it brings in large number of deps. I'd support making it optional though, e.g. https://github.com/celery/celery/tree/v4.1.0#bundles

@sbesson sbesson closed this May 14, 2018
@sbesson sbesson reopened this May 14, 2018
@joshmoore
Copy link
Member Author

Cheers, @sbesson

@sbesson
Copy link
Member

sbesson commented Jun 5, 2018

Following up on this, I tried to prototype the solution discussed in #10 (comment) following the examples of the recent integration repositories i.e.

I propose to discuss the next steps here tomorrow at the SA meeting. A couple of initial points of discussion:

  • are we generally happy with this strategy as a way forward? does this help in particular with the upgrade of the roles to Ansible 2.4?
  • what is the preferred naming scheme: ansible-all? ansible-build?

@snoopycrimecop
Copy link
Member

snoopycrimecop commented Sep 12, 2018

Conflicting PR. Removed from build ANSIBLE-merge#433. See the console output for more details.
Possible conflicts:

  • Upstream changes
    • .travis.yml
    • setup.py

--conflicts Conflict resolved in build ANSIBLE-merge#435. See the console output for more details.

@joshmoore
Copy link
Member Author

@sbesson : what do you want to do with this PR now that it's conflicting?

@sbesson
Copy link
Member

sbesson commented Sep 13, 2018

@joshmoore I think I have made almost all the progress we need for resurrecting this effort:

I would propose to fix the conflict here, restrict this PR to the setup.py changes i.e. the bump to Ansible 2.4, restart the ANSIBLE-merge job and see the state of the Travis testing?

@joshmoore
Copy link
Member Author

Updated as suggested, @sbesson, and travis is green.

@@ -68,8 +68,12 @@
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=[
'molecule==1.25.1',
'ansible==2.3.2',
'ansible==2.4',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the Python semantics, this will install 2.4.0.0. Do we want ansible==2.4.6 or ansible<2.4?

'docker',
'docker-py',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you rememebr why this dependency is required? I briefly looked into the state of the opened molecule v2 PRs with Ansible 2.5/2.6 following the discussion in ome/ansible-role-basedeps#5 (comment). However the initial destroy phase failed with ansible/molecule#1384. After removing docker-py from setup.py and re-installing this meta-package, as suggested in the issue and by the output of molecule --debug test, the tests passed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember it was a mess due to breaking changes between docker and docker-py, we definitely shouldn't have both. It'll need testing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember what else, but docker-py is certainly critical for docker-compose integration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed docker seems to be a full rewrite of docker-py and both packages certainly incompatible changes.

Looking at the requirements of docker-compose and various issues includes ansible/molecule#1347, ansible/ansible#22993:

  • docker-compose nows declares docker as a dependency instead of docker-py since 2.10.0
  • the Ansible Docker module used to recommend docker-py as a dependency. Recent Ansible versions seem to have included full support for docker and docker scenario guide: docker-py -> docker ansible/ansible#44856 is updating the official doc accordingly.

Switching to docker across the board sounds like the long-term option anyways. For this PR, I wonder whether the decision here is related to the targetted version of Ansible ome/ansible-role-basedeps#5 (comment). If we decide to go for Ansible 2.6, docker should work both for compose and the ansible Docker modules. If we stick to Ansible 2.4, it might be that docker-py is the best choice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following combinations work on travis with idr/deployment IDR/deployment#135

  • ansible==2.5.9 docker-py==1.10.6 molecule==2.18.0
  • ansible==2.6.4 docker-py==1.10.6 molecule==2.18.0
  • ansible==2.6.4 docker==3.5.0 molecule==2.18.0

@sbesson
Copy link
Member

sbesson commented Sep 26, 2018

As per #10 (comment), the new proposed target is ansible 2.6/docker 3.5.0 although we might come back to this is this leads to instabilities.

@sbesson sbesson closed this Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants