[FOLIO-3906] Upgrade Ansible to v2.15 in Jenkins Docker image and Jenkins worker node Created: 06/Oct/23 Updated: 25/Jan/24 |
|
| Status: | Open |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | TBD |
| Reporter: | Wayne Schneider | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||
| Sprint: | DevOps Requests | ||||||||||||
| Development Team: | FOLIO DevOps | ||||||||||||
| RCA Group: | TBD | ||||||||||||
| Description |
|
We are currently at Ansible 2.9, which was EOL May 2022. Assume this is built using this Dockerfile. This will require testing and may force dealing with a few feature deprecation issues in folio-ansible. Current warnings in the snapshot build: TASK [find correct ec2 AMI] **************************************************** [DEPRECATION WARNING]: The 'ec2_ami_facts' module has been renamed to 'ec2_ami_info'. This feature will be removed in version 2.13. Vagrant build: TASK [okapi-docker-container : Create and Launch Okapi Docker Container] ****** [DEPRECATION WARNING]: The container_default_behavior option will change its default value from "compatibility" to "no_defaults" in community.general 3.0.0. |
| Comments |
| Comment by David Crossley [ 09/Oct/23 ] |
|
I did build a test image today (agent: label: jenkins-agent-java17-test). Our Dockerfile.jammy-java-17 installs Ansible via pip. As shown at https://pypi.org/project/ansible/#history the most recent available there is 2.10.7 and of course trying to go further (ansible/releases shows latest 2.15.4) then the build fails. Probably better to go forward in small Ansible version increments anyway. So jenkins-agent-java17-test is using 2.10.7 Used this test image to rebuild for
|
| Comment by David Crossley [ 09/Oct/23 ] |
|
Gathered these from that folio-snapshot-test/509 build: Search for "DEPRECATION": There was also a previous ticket
|
| Comment by David Crossley [ 25/Jan/24 ] |
|
We have built a new Jenkins docker image (still using ansible-2.10.7) jenkins-agent-java17-test Using the "ansible-combine" branch, we did a fresh build at folio-snapshot-test/529 Of course similar deprecations warnings as previously noted. There is now an additional notice at the beginning: .../folio-snapshot-test/folio-infrastructure/CI/ansible/inventory/ec2.py", line 172, in <module> from ansible.module_utils import ec2 as ec2_utils ImportError: cannot import name 'ec2' from 'ansible.module_utils' The net has various stuff about that. In particular ansible/issues/45992 "We are deprecating the contrib dynamic inventory scripts in place of the newer inventory plugins." |
| Comment by John Malconian [ 25/Jan/24 ] |
|
Tested hourly snapshot platform-complete builds with the new test image. The build is successful warnings related to the ec2 inventory (also noted in David's previous comment). The ec2 inventory is part of folio-infrastructure - not folio-ansible. WARNING]: * Failed to parse *****- platform-complete-snapshot-test/folio-infrastructure/CI/ansible/inventory/ec2.py with script plugin: Inventory script (*****-platform-complete-snapshot-test/folio-infrastructure/CI/ansible/inventory/ec2.py) had an execution error: Traceback (most recent call last): File "*****-platform-complete-snapshot-test/folio-infrastructure/CI/ansible/inventory/ec2.py", line 172, in <module> from ansible.module_utils import ec2 as ec2_utils ImportError: cannot importname 'ec2' from 'ansible.module_utils' (/usr/local/lib/python3.10/dist-packages/ansible/module_utils/__init__.py) [WARNING]: * Failed to parse *****-platform-complete-snapshot-test/folio- infrastructure/CI/ansible/inventory/ec2.py with ini plugin:*****-platform-complete-snapshot-test/folio- infrastructure/CI/ansible/inventory/ec2.py:3: Error parsing host definition ''''': No closing quotation [WARNING]: Unable to parse *****-platform- complete-snapshot-test/folio-infrastructure/CI/ansible/inventory/ec2.py as an inventory source [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' |
| Comment by David Crossley [ 25/Jan/24 ] |
|
I raised that note about ec2.py because with the current production Jenkins image via folio-snapshot build, that warning does not appear. Perhaps this new Ansible version is just reporting differently.
|