Description
Describe the bug
Execution Environment image build fails with error if using paloaltonetworks.panos collection in the requirements.yml for Execution Environment build using ansible-build
Environment: Ansible Automation Platform 2.5
Base Image: registry.redhat.io/ansible-automation-platform-25/ee-minimal-rhel8:1.0.0-922
Version of ansible-builder: 3.1.0
Contents of requirements.yml:
collections:
- name: paloaltonetworks.panos
- version: 3.0.1
- src: https://console.redhat.com/
Execution Environment image build fails with the following error:
Installing collected packages: pyvmomi, pan-python, propcache, pan-os-python, multidict, jmespath, frozenlist, dpath, dnspython, aiohappyeyeballs, yarl, aiosignal, cryptography, aiohttp, pyOpenSSL, panos-upgrade-assurance
Attempting uninstall: cryptography
Found existing installation: cryptography 42.0.5
error: uninstall-no-record-file
× Cannot uninstall cryptography 42.0.5
╰─> The package's contents are unknown: no RECORD file was found for cryptography.
hint: The package was installed by rpm. You should check if it can uninstall the package.
Expected behavior
Execution Environment should build successfully
Current behavior
Execution Environment image build fails with the following error:
Installing collected packages: pyvmomi, pan-python, propcache, pan-os-python, multidict, jmespath, frozenlist, dpath, dnspython, aiohappyeyeballs, yarl, aiosignal, cryptography, aiohttp, pyOpenSSL, panos-upgrade-assurance
Attempting uninstall: cryptography
Found existing installation: cryptography 42.0.5
error: uninstall-no-record-file
× Cannot uninstall cryptography 42.0.5
╰─> The package's contents are unknown: no RECORD file was found for cryptography.
hint: The package was installed by rpm. You should check if it can uninstall the package.
Possible solution
Ansible-core 2.16 in the base image has cryptography
version 42.0.5
paloaltonetworks.panos
collection depends on panos-upgrade-assurance
= ">=1.0,<2.0" which depends on pyopenssl
= ">=23.2,<24.0" and pyopenssl
depends on "cryptography>=41.0.5,<42" and hence the conflict due to the version of the package cryptography
It downloads panos_upgrade_assurance-1.3.0 -> pyOpenSSL-23.3.0 -> cryptography-41.0.7
and then it finds the cryptography-42.0.5
is installed at system level and not able to remove it
- Upgrading
PyOpenSSL
>=24.0.0 inpanos-upgrade-assurance
might fix this as it uses "cryptography>=41.0.5,<43
"
Steps to reproduce
Section of execution-environment.yml showing the base image used
images:
base_image:
name: registry.redhat.io/ansible-automation-platform-25/ee-minimal-rhel8:1.0.0-922
- Build using ansible-builder
Your Environment
- Collection: paloaltonetworks.panos (Version 3.0.1)
- Python: 3.11
- Ansible Core: 2.16