-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Adding venv_vars.yaml makes container fail to start #5756
Comments
It looks like your container can't reach the internet at large (at least over the IPv6 address you got back from the mirror list) |
Can you test against this branch https://github.com/fantashley/awx/tree/support-proxy-venv and tell me if that fixes your issue? It will set the environment variables |
Hi @fantashley - thanks, yes this helped. I also had to add the following in order to get it work correctly - in particular, note the
|
@fantashley I also run into this issue as well. Are you planning to make a PR for this? |
@evertmulder yep, I will be able to make a PR by the end of this week. It would be great if you could both test the changes for me since I don't have a similar environment setup. I'll let you know once I've created it! @magick93 sounds good, I will add in the |
I updated my branch https://github.com/fantashley/awx/tree/support-proxy-venv with the trusted host arguments if someone wants to give it a try! |
Hi @fantashley. I just tested the proxy support and it works great. The proxy settings are added to the init container and the trusted-host settings are also added to the pip install. The thing missing is the Tested on OKD 3.11 The final statefulset includes the following init-container: initContainers:
- command:
- sh
- '-c'
- >-
yum install -y ansible curl python-setuptools epel-release \
openssl openssl-devel gcc python-devel &&
yum install -y python-virtualenv python36 python36-devel && mkdir
-p /opt/custom-venvs && virtualenv -p python3 \
/opt/custom-venvs/team_a &&
source /opt/custom-venvs/team_a/bin/activate &&
/opt/custom-venvs/team_a/bin/pip install --trusted-host pypi.org
--trusted-host files.pythonhosted.org --trusted-host
pypi.python.org -U psutil \
"ansible==2.8.4" &&
/opt/custom-venvs/team_a/bin/pip install --trusted-host pypi.org
--trusted-host files.pythonhosted.org --trusted-host
pypi.python.org -U \
dnspython infoblox-client jmespath &&
deactivate && virtualenv -p python2 \
/opt/custom-venvs/team_b &&
source /opt/custom-venvs/team_b/bin/activate &&
/opt/custom-venvs/team_b/bin/pip install --trusted-host
pypi.org --trusted-host files.pythonhosted.org --trusted-host
pypi.python.org -U psutil \
"ansible==2.8.6" &&
/opt/custom-venvs/team_b/bin/pip install --trusted-host
pypi.org --trusted-host files.pythonhosted.org --trusted-host
pypi.python.org -U \
manageiq_client PyVmomi &&
deactivate && :
env:
- name: http_proxy
value: 'http://proxy.company.local:8080'
- name: https_proxy
value: 'http://proxy.company.local:8080'
image: 'centos:7'
imagePullPolicy: IfNotPresent
name: init-custom-venvs
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/custom-venvs
name: custom-venvs The only thing missing is the |
Sounds like this can be closed once #5805 merges - thanks @fantashley! |
Add proxy support in custom venv container fixes #5756 Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
More accurate translation for Availability Check
ISSUE TYPE
SUMMARY
Use of virtual envs for k8s/openshift, as described on https://github.com/ansible/awx/blob/devel/docs/custom_virtualenvs.md isnt working.
ENVIRONMENT
STEPS TO REPRODUCE
venv_vars.yaml
and copy the example yaml from https://github.com/ansible/awx/blob/devel/docs/custom_virtualenvs.mdansible-playbook -i inventory install.yml -e openshift_password=username -e openshift_token=$(oc whoami -t) --extra-vars "@venv_vars.yaml"
EXPECTED RESULTS
Expect to have virtual environments created.
ACTUAL RESULTS
The
aws-0
container fails to start, gets stuck inInit Crash Loop Back-off
.ADDITIONAL INFORMATION
I'm running in a corp environment, and am using a proxy. The below looks like the container isnt using the proxy settings that are added to the inventory.
The
init-custom-venvs
has the following command:Logs
From
oc logs awx-0 -c init-custom-venvs
shows:@fantashley
The text was updated successfully, but these errors were encountered: