Closed wpernath closed 7 years ago
Are you using the origin client? "--image openshift/origin" If yes, you need to qualify the image as well.
Nope, I am using the OCP (enterprise) v3.4.1.5 client. Until the latest git pull my local setup with enterprise client worked.
I don't really understand, why you're determining the version and type of the oc client:
Until now I have switched from OCP to origin client if I wanted to test latest alpha releases. If I am correct, those lines of code in oc-cluster are not needed:
Line 45ff:
# Determine the version and type of client
__VERSION=$(oc version --request-timeout=1 2> /dev/null | grep oc | awk -F'+' '{print $1}'| awk '{print $2}')
if [[ "${__VERSION}" =~ ^v1.[0-9]$ ]]; then
__TYPE="ocp"
__IMAGE="registry.access.redhat.com/openshift3/ose"
else
__TYPE="origin"
__IMAGE="openshift/origin"
fi
echo "# Using client for $__TYPE $__VERSION"
Enterprise OC returns:
$ oc version
oc v3.4.1.5
kubernetes v1.4.0+776c994
features: Basic-Auth
So this IF statement returns true if the output of the above would start with "v1.":
if [[ "${__VERSION}" =~ ^v1.[0-9]$ ]]; then
But as OCP oc version returns v3.x.y.z it is not true.
But maybe I am wrong?
Another thing: There is NO "v3.4.1.5" tagged docker image in the enterprise registry. The "v" in front of the number is too much.
And OCP version of oc cluster up would automatically use the right --image to download openshift. Since OCP 3.4 it has never been necessary to use --image for oc-cluster up any more.
So if I just remove --image and --version from lines 421 / 422 (building command line) it just runs fine on my osx with enterprise OC version installed.
Yes and yes. This seems a bug and it's done so if you create a cluster it will always start the same cluster, otherwise you might start a cluster with ocp client, switch to origin client and will stop working. This was meant to prevent that. So if you create a cluster will always work no matter what client you have.
Fixed
Latest update of oc-cluster-wrapper makes my local setup fail with enterprise oc client v3.4.1.x on my OSX:
It seems that the algorythm of determining the type and version of 'oc' fails. It detects origin although I am using enterprise.