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

Implementation using Red Hat Satellite will never work - AAP may need to use a legacy execution environment. #158

Open
sickbock opened this issue Jan 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sickbock
Copy link
Contributor

Describe the Issue
The Red Hat Satellite uses different packages on RHEL 8 than normal RHEL. Current release 6.14 uses Ansible Core 2.15, which uses Python 3.11 which is incompatible with the package python3-jamespath from the Red Hat repository. The later is used by community.general.json_query which in turn is used by json_query in this role.

Expected Behavior
The playbook run will finish completely without any errors.

Actual Behavior
The playbook run will fail with at the first task using json_query and give the error message: “You need to install \”jmespath\“ prior to running json_query filter”

Control(s) Affected
At least all controls using json_query - 6.1.10, 6.1.11, 6.1.13 and 6.1.14

Environment (please complete the following information):

  • branch being used: devel
  • Ansible Version: 2.14 (local run) and 2.15 (Red Hat Satellite v 6.14)
  • Host Python Version: 3.9
  • Ansible Server Python Version:3.11 (Satellite)
  • Additional Details: A local run will work on a default RHEL 9.3 after installing python3-jmespath from the Red Hat repository.

Additional Notes
See upstream documentation on Satellite and Ansible.

A default RHEL 9.3 installation with Ansible Core 2.14, Python 3.9 and python3-jmespath will work with a local playbook run, for now.
You may need to install an EPEL package or use pip when using a different Python release than 3.9 (both are not recommended on the Satellite with locked repositories).
Otherwise you'll have to disable all controls using json_query.

Possibly, for the same reason, you may need to use a legacy Ansible 2.9 execution environment when using AAP/AWX to implement this role (not tested).

Similar issues may exist for the other pip packages.

Possible Solution
A private bug has been closed (won't fix). Red Hat recommends to "rewrite the code in question so that it does not have to use json_query". "In almost every case, the code using json_query can be rewritten to use a combination of the basic Jinja built-in filters and built-in Ansible filters (excluding json_query and ipaddr of course)."

@sickbock sickbock added the bug Something isn't working label Jan 19, 2024
@uk-bolly
Copy link
Member

hi @sickbock

Thank you for taking the time to raise this issue, We will be looking at this. We have seen this with other clienst and they have built their own EE with all the required modules etc to make sure this works giving them a little more control over what is in the EE.
We have noted that this is causing some issues so we will be looking at replacing this.

Many thanks

uk-bolly

@uk-bolly uk-bolly self-assigned this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants