Description of problem: Get the below errors when setting the value of the "minKubeVersion" to 1.13 [core@ip-10-0-39-59 ~]$ oc get pods NAME READY STATUS RESTARTS AGE installed-community-global-operators-xk2z9 0/1 CrashLoopBackOff 2 40s [core@ip-10-0-39-59 ~]$ oc logs installed-community-global-operators-xk2z9 time="2019-02-02T09:09:56Z" level=info msg="Using in-cluster kube client config" time="2019-02-02T09:09:56Z" level=info msg="loading CRDs" configmap=installed-community-global-operators ns=openshift-operators time="2019-02-02T09:09:56Z" level=info msg="loading Bundles" configmap=installed-community-global-operators ns=openshift-operators Error: json: cannot unmarshal number into Go struct field ClusterServiceVersionSpec.minKubeVersion of type string Usage: [flags] Version-Release number of selected component (if applicable): OLM: io.openshift.build.commit.id=1f312481ae3641eea471abb792f9b056206e4cf4 ConfigMap: quay.io/operatorframework/configmap-operator-registry:latest How reproducible: always Steps to Reproduce: 1. Install the OCP 4.0 2. Create a configmap/catalogsource objects under the openshift-operators namespaces, like below: $ oc create -f https://raw.githubusercontent.com/jianzhangbjz/v3-testfiles/v4.0/olm/configmap/operator-minKubeVersion.yaml $ oc create -f https://raw.githubusercontent.com/jianzhangbjz/v3-testfiles/v4.0/olm/catalogsource/catalogsource.yaml 3. Modify the configmap, and change the value of the "minKubeVersion" to 1.13 4, Create a subscription, like below: $ oc create -f https://raw.githubusercontent.com/jianzhangbjz/v3-testfiles/v4.0/olm/subscription/etcdoperator.v0.9.2-sub.yaml Actual results: Got errors: [core@ip-10-0-39-59 ~]$ oc get pods NAME READY STATUS RESTARTS AGE installed-community-global-operators-xk2z9 0/1 CrashLoopBackOff 2 40s [core@ip-10-0-39-59 ~]$ oc logs installed-community-global-operators-xk2z9 time="2019-02-02T09:09:56Z" level=info msg="Using in-cluster kube client config" time="2019-02-02T09:09:56Z" level=info msg="loading CRDs" configmap=installed-community-global-operators ns=openshift-operators time="2019-02-02T09:09:56Z" level=info msg="loading Bundles" configmap=installed-community-global-operators ns=openshift-operators Error: json: cannot unmarshal number into Go struct field ClusterServiceVersionSpec.minKubeVersion of type string Usage: [flags] Expected results: The configmap-server should handle the type conversion. Additional info:
I'm not really sure this is a bug. The expected version format is of the form "x.x.x", for example 1.13.0. If you must use a less precise format (I suppose 1.13 could be interpreted as 1.13.0), then just quote the version number in the configmap, like: minKubeVersion: '1.10'
Jeff, > The expected version format is of the form "x.x.x", for example 1.13.0. Yes, thanks, I know. But, it would be better if it can compatible with something characters like `minKubeVersion: test-v1.xx`.
Hi Jian, As Jeff mentioned above, the minimum k8s version will be Major.Minor.Patch (all integers) format which is standard SemVer format. I have merged a PR to allow the prefix "v" just in case users may add that. However, we will not accept any non-standard format or characters. Please use valid format to test the code. Thanks, Vu
Hi, Vu > However, we will not accept any non-standard format or characters. Thanks for your information. So does it pop-up a warning when typing the non-standard format to the csv? Actually, I haven't seen any warnings or forbidden. Correct me if I'm wrong.
Crashing is the expected behavior when invalid csvs are included in a catalog.
Evan, Vu Yes, I know, we should fill in the standard format. But, for the users, they may input a variety of formats even if we highlight this in the release document. So, it's better if we can pop-up the forbidden info before they saving the wrong format.
> So, it's better if we can pop-up the forbidden info before they saving the wrong format. Fixed PR in bug 1671953 comment 9, hasn't been merged in the current payload, change Status to MODIFIED. [jzhang@dhcp-140-18 ocp-09]$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.0.0-0.nightly-2019-03-06-074438 True False 35h Cluster version is 4.0.0-0.nightly-2019-03-06-074438
I can see the warning now, LGTM, verify it. OLM info: io.openshift.build.commit.id=840d806a3b20e5ebb7229631d0168864b1cfed12 io.openshift.build.commit.url=https://github.com/operator-framework/operator-lifecycle-manager/commit/840d806a3b20e5ebb7229631d0168864b1cfed12 io.openshift.build.source-location=https://github.com/operator-framework/operator-lifecycle-manager Cluster version: 4.0.0-0.nightly-2019-03-13-233958
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758