-
Notifications
You must be signed in to change notification settings - Fork 156
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
The rpm python bindings needed for scan playbooks is missing #25
Comments
We did get some help with this previously, and to document I'm going to have to quote some people here, hope you don't mind. <something something about ansible-core packaging, python3.6 vs 3.8> @shanemcd asked, on what I believe is this issue:
Then we got a reply
Maybe this either isn't the same issue (rpm bindings, not selinux bindings), or there's another gap where the bindings need to be installed for the desired interpreter, because my testing with recent images yields:
Recap:
That is the bug. |
I tried to track down some candidates that might have provided this through
|
This question looks pretty illustrative of the problem: https://stackoverflow.com/questions/15412482/installing-rpm-module-for-non-system-python Advice here is "don't do that". Don't use a non-system python and expect to get the rpm bindings. |
@wenottingham how much do you care about compatibility and ongoing support for https://github.com/ansible/awx-facts-playbooks |
I think #25 (comment) is going down the wrong road. We don't need any of this in the EE image - the errors from the scan playbook would be on the managed hosts, and that's where the import error is coming from. What sorts of hosts are you running the playbook against? |
This is surfaced as a part of testing Insights - because a host's insights id is discovered through fact gathering. To do this testing, a host is created in AWX API with properties: {
"name": "registered_host",
"inventory": "<host inventory>",
"variables": "{\"ansible_host\": \"127.0.0.1\", \"ansible_connection\": \"local\"}"
} (with much from awxkit defaults) Then a job template is created with properties: {
"name": "<some name>",
"inventory": "<inventory with that host>",
"project": "<project for https://github.com/ansible/awx-facts-playbooks>",
"playbook": "scan_facts.yml",
"limit": "registered_host",
"use_fact_cache": true
} The scan_facts.yml playbook here targets In terms of test infrastructure, I don't know that we use an independent managed host these days, much less a managed host that is configured for our pytest-ansible actions to be directed towards. Speaking extremely speculatively, maybe we could replace Putting those challenges aside, what you're proposing isn't just having this playbook not work on hosts set to local connection - this will make the playbook fail whenever a host in the inventory sets local connection. That doesn't sound reasonable, and I'd think you would prefer to change the host pattern or skip those hosts in Avoiding local connection in that playbook may be pretty trivial, but that would still leave the insights testing problem unsolved. I should mention that @pabelanger proposed having both pythons installed in the EE, and then we can use I mention that because I find it about equally distasteful as the other options I mentioned here. |
We could also solve the "get the insights id" by just using ansible/awx#8650 instead. |
That can maybe put an insights id into the hostvars, not into the ansible facts for the hosts, which is how that integration works. |
My understanding is that the insights id in facts is used to map "whatever" hosts to what insights thinks they are in the playbook. If we just say that for insights remdediations you pull the inventory from insights, it sidesteps that process entirely and should just work. cc @chrismeyersfsu |
solved using |
The import here is breaking:
https://github.com/ansible/awx-facts-playbooks/blob/c5b4693061097fea5cf852e7d0792b1a9e75248c/library/scan_packages.py#L57
These are still supported, and will need to work in AWX-EE. They didn't used to fail, but some recent changes here are causing it to fail.
I can confirm that this is present in the AWX images before execution environments. It is a global package:
I have not yet fully determined where this comes from, but the source appears to be part of "rpm" itself. This matches with the content in the AWX image site-packages, plus some
*.so
files.https://github.com/rpm-software-management/rpm/tree/master/python/rpm
The text was updated successfully, but these errors were encountered: