-
Notifications
You must be signed in to change notification settings - Fork 322
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
Mechanism for enabling SCL packages. #88
Comments
Confirmed that if entrypoint is meant to allow enabling of SCL, it isn't working on CentOS images either.
I might also add that I think the nss_wrapper setup should be in an entry point script as well so that that activation is also done. This way when someone does This is how I described it is better done in: It works better that way. FWIW. So far my experiments sort of showed that S2I builder wipes out any ENTRYPOINT in the base images. I need to confirm that but can't do so right now due to broken Internet. |
Ignore this. Is me forgetting that |
|
Right. So that means you need to rsh, and then start python in order to get python from SCL |
@bparees my magic is weak if |
@mfojtik I would have assumed it does use bash... but likely via a /bin/sh symlink to /bin/bash, so perhaps that changes the behavior? this is definitely an issue imho if oc rsh into our images does not scl enable the right thing. |
@bparees I think |
seems to work ok for me in the 3.4 image:
|
oc exec does not work, unsurprisingly:
|
so nm, i think we're ok here with a known limitation on directly running commands in the container. |
@bparees because you invoke the binary directly, bypassing bash |
yes i know, hence my statement of "unsurprisingly" :) |
We could theoretically change rsh to run the command through bash -c. Not sure if that would have any risks. |
among other things it would mean rsh would only work on images w/ bash. or would need special logic to check if bash was present. |
Your
and it would run and use system Python and not SCL Python. The
The only difference is that |
I ran into a few use cases where scl_enable threw me off.
IMO the ability to run commands like a "normal" docker image would make s2i more accessible - especially so for people who are already familiar with Docker. |
@hhorak fyi. |
Currently the enabling of software collection packages is triggered by virtue of the following in
sti-base
.The
scl_enable
file forsti-python
includes:The problem is that the activation only occurs when a bash shell is created.
This means that doing the following will result in the wrong Python version being run.
The better way to handle this would be to use an
ENTRYPOINT
script of:The
sti-base
does actually have such a script and defines:This means that the activation technically should occur when doing above
rsh
as the command will be child to the entrypoint script, but it isn't.This is with the RHEL images from
registry.access.redhat.com
. So it could be out of date images there, although the thecontainer-entrypoint
script does I recollect exist in them.Can't verify right now as OSE cluster is broken and my home Internet is also borked right now so can't check CentOS images even.
Is the
container-entrypoint
asENTRYPOINT
supposed to ensure SCL packages are enabled?Are the RHEL images on
registry.access.redhat.com
up to date?The text was updated successfully, but these errors were encountered: