fix(ee-multicloud-public): port OCP container group entrypoint fixes - #9880
Open
rut31337 wants to merge 1 commit into
Open
fix(ee-multicloud-public): port OCP container group entrypoint fixes#9880rut31337 wants to merge 1 commit into
rut31337 wants to merge 1 commit into
Conversation
Port entrypoint fixes from rhpds/agnosticd-v2 PRs redhat-cop#133, redhat-cop#162, redhat-cop#164 that enable ee-multicloud-public to work on AAP 2.4+ when running jobs via container groups on OpenShift. Changes: entrypoint.sh: - Detect Kubernetes environment via KUBERNETES_SERVICE_HOST and install an ansible-playbook wrapper that handles dynamic dependency installation after ansible-runner unpacks job data (receptor stdin arrives after entrypoint completes — dependencies can't be installed during startup) - Detect AAP bare-metal execution nodes via -u root argument pattern - Guard install_dynamic_dependencies.yml on file existence so v1 projects that lack this playbook skip gracefully instead of crashing - Define INSTALL_PLAYBOOK in outer scope to avoid unbound variable errors under set -eu - Set ANSIBLE_COLLECTIONS_PATH explicitly so AAP can find collections - Create /home/runner/.ansible/collections with correct permissions ansible.cfg: - Add collections_path to match the entrypoint's ANSIBLE_COLLECTIONS_PATH
jkupferer
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port entrypoint fixes from rhpds/agnosticd-v2 that enable
ee-multicloud-publicto work on AAP 2.4+ when running jobs via container groups on OpenShift.This ports the following PRs:
set -euProblem
When AAP runs jobs via container groups on OCP, pods start with
ansible-runner worker --private-data-dir=/runner. Job data (inventory, extravars) arrives via the receptor stdin stream after the entrypoint completes — it is not on disk at entrypoint time.The current entrypoint does a simple
exec "${@}", which works for basic cases but:ANSIBLE_COLLECTIONS_PATH, so AAP may not find installed collectionsSolution
entrypoint.shKUBERNETES_SERVICE_HOSTenv var (injected by k8s into every pod)/runner/.ep-wrapper/bin/that shadows the real binary — when ansible-runner later invokesansible-playbook, the wrapper installs dynamic dependencies first (now that job data is available), thenexecs the real binary-u rootargument pattern for bare-metal AAPinstall_dynamic_dependencies.yml— v1 projects that lack this file skip gracefullyANSIBLE_COLLECTIONS_PATHset explicitly with/home/runner/.ansible/collections,/collections, and/usr/share/ansible/collectionsansible.cfgcollections_pathto match the entrypoint'sANSIBLE_COLLECTIONS_PATHCompatibility
install_dynamic_dependencies.ymlfile won't exist, so all three code paths (K8s, AAP, navigator) skip dependency installation gracefully via the[ -f ]guardshift 2fallback path-u rootpattern, same as upstreamTest plan
ANSIBLE_COLLECTIONS_PATHis set correctly in all three modes