-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
manage.py import error #34
Comments
Seeing similar behavior when running the latest Vagrant install of origin, as well. |
@cjryan I can reproduce this on an aws RHEL machine with the latest origin ami |
@cjryan the problem is origin v1.1.3 + template@latest-master. See openshift/origin#7379 (comment) Unfortunately, unlike in origin's sample-app, this repo is not being tagged with every origin release. $ oc new-app https://raw.githubusercontent.com/openshift/django-ex/4706c39a7035/openshift/templates/django-postgresql.json And for the next releases we'll have vendored copies of the templates in origin: Other than that we need to discuss if we want to make any changes here. |
@rhcarvalho thanks for taking a look at this. Unfortunately, that version of the the older template won't work, as we are explicitly testing the
functionality. It looks like we'll have to hang tight until the vendored copies of the templates are available. |
@cjryan aha got it. You can use the command and/or args form: "postCommit": {
"args": ["./manage.py", "test"]
} or "postCommit": {
"command": ["/bin/bash", "-c", "./manage.py", "test"]
} or "postCommit": {
"command": ["/bin/bash", "-c"],
"args": ["./manage.py", "test"]
} and some other combinations of those ;) The underlying problem here is that v1.1.3 runs the If you still want to test the script form in v1.1.3, you will need to enable the Python collection explicitly in the script: "postCommit": {
"script": "scl_enable python[VERSION] ./manage.py test"
} |
FWIW, the error message |
This problem would be avoided if a Python virtual environment was being used in the image and the bin directory for that was in the PATH. SCL Python only then needs to be enabled during the build phase for the image. See sclorg/s2i-python-container#90 (comment) |
@GrahamDumpleton I'm not entirely sure, at least not for all apps. I'm all in favor of having the Python image use virtualenv. While it could alleviate the problem for Python, it's a non-solution for other languages. We still need to deal with enabling collections... |
Especially if the install location of SCL packages is fixed as being |
@GrahamDumpleton thanks for the explanation! I don't know how the SCL Python binaries are compiled. The Setting envs in the Dockerfile is something we have discussed though, but yet haven't gone that path because AFAIK we don't have a clean way to get what are the env changes after a "scl_enable some-collection" run. If you have any trick on how to do that, I'd be interested to hear/read ;) 💡 Perhaps a Python script that captures the current environment, run |
The problem has been explained and solutions listed in #34 (comment) Closing this, @cjryan please let me know if you still have trouble and I can reopen. |
@rhcarvalho @GrahamDumpleton Apologies for the delayed response, thank you for the solutions to the issue at hand. |
When running
on the latest RHEL or CentOS devenv, I'm noticing the following error in the build:
The client machine is Fedora 23 x64, with
oc v1.1.3-232-gf39a5a8
kubernetes v1.2.0-alpha.7-703-gbc4550d
etcd 2.2.5
I will try this evening to test against the lastest Fedora 'origin', @csrwng indicated some success with that.
The text was updated successfully, but these errors were encountered: