-
Notifications
You must be signed in to change notification settings - Fork 165
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
RFE: handle oc binary doesn't exist #12
Comments
We can do this pretty easily with |
This could be problematic. In my case i downloaded oc-tools (which had oc binary) to a non-standard binary path which could lead to shutil.which("oc") fail. If we enforce restriction saying oc binary should be present in /usr/bin then this might work. |
@shylesh shutil.which() will return it if it is on the path. if it's not on the path, the |
If this discussion is all about just fail if it doesn't exist then Yes it makes sense. What I meant is oc could be in custom path which may not be noticed by which() unless its in paths scanned by shutil.which(). Either we can document the path where we expect oc binary should be (either /usr/bin OR any path which could be added later in python path. Also if oc-tools has different versions how to tell end users about this ? I feel its better we handle it inside out script. |
I was mostly just trying to get after vasu's proposed solution to check in the runner and bail out sooner. However, I think this conversation changes a bit if we plan on using something like |
We need to leave installing of "oc' to the users and move to /usr/bin/ , so that it can access from anywhere instead of handling in framework. Above should go to documentation( in pre-requisites for framework) |
One of the downside of this leaving it to the user could be: |
Why? This will be a problem only when your non-standard binary path is not in And when you actually put Eg. I have
If you actually want to put
|
I Agree, but the point we wanted to converge on is whether to leave this oc util configuration to user OR to handle it in framework(sorry if I was not clear in my previous comment). If user's oc version is deprecated or not supported and unknowingly if user uses it, since we don't have any control on such version check it may lead to silent bugs. my 2 cents. |
Do we consider Also, it would be a good idea to use the same approach for both |
I agree with Martin, that we should handle the
|
If you are not against the idea suggested in the previous comment, I can create PR for that. |
I don't think we do, at least not currently. However I still think that we should be using an
My vote is go ahead with this. I think it's a great idea and something we should be handling properly. |
@dahorak sure lets go with the same approach, but eventually we need the flexibility to test with mixed oc versions by changing the parameter(or iterating few tests with different oc versions), we haven't reached that state yet, so probably what you suggested is good. |
- download openshift client into ./bin/ directory (same as installer) - fixes red-hat-storage#12
- download openshift client into ./bin/ directory (same as installer) - update PATH for the openshift installer and client - restructure code into functions: - prepare_bin_dir() - get_openshift_mirror_url(...) - add_path_to_env_path - fixes red-hat-storage#12
* place openshift-install into ./bin directory * handle openshift client download and usage - download openshift client into ./bin/ directory (same as installer) - update PATH for the openshift installer and client - restructure code into functions: - prepare_bin_dir() - get_openshift_mirror_url(...) - add_path_to_env_path - fixes #12 * fix doc strings - capital letters * extract only required files - openshift-install - oc - kubectl * add new line at the end of .gitignore
* place openshift-install into ./bin directory * handle openshift client download and usage - download openshift client into ./bin/ directory (same as installer) - update PATH for the openshift installer and client - restructure code into functions: - prepare_bin_dir() - get_openshift_mirror_url(...) - add_path_to_env_path - fixes red-hat-storage#12 * fix doc strings - capital letters * extract only required files - openshift-install - oc - kubectl * add new line at the end of .gitignore
* place openshift-install into ./bin directory * handle openshift client download and usage - download openshift client into ./bin/ directory (same as installer) - update PATH for the openshift installer and client - restructure code into functions: - prepare_bin_dir() - get_openshift_mirror_url(...) - add_path_to_env_path - fixes red-hat-storage#12 * fix doc strings - capital letters * extract only required files - openshift-install - oc - kubectl * add new line at the end of .gitignore
* place openshift-install into ./bin directory * handle openshift client download and usage - download openshift client into ./bin/ directory (same as installer) - update PATH for the openshift installer and client - restructure code into functions: - prepare_bin_dir() - get_openshift_mirror_url(...) - add_path_to_env_path - fixes red-hat-storage#12 * fix doc strings - capital letters * extract only required files - openshift-install - oc - kubectl * add new line at the end of .gitignore
* Restructure RDR with Multiple Application * Add newly created resources to kustomization * Add newly created resources to kustomization * Update yaml names * fix kustomization * Fix directory name typo
probably check in the runner and bail out sooner...
The text was updated successfully, but these errors were encountered: