Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-315

Kubernetes Couchbase Operator - Invalid Version Check

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.8.1
    • operator
    • None

    Description

      Operator gitVersion check seems to not handle the parsing correctly and fails to error "Initialization failed: kubernetes version 1.0 is too old, 1.8 is minimum supported version " module=controller" 

       

      Reported on forums - https://forums.couchbase.com/t/kubernetes-couchbase-operator-invalid-version/16829 

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            Looking at our code there are at least 2 ways this can happen:

            1) If the minor version is defined but has a non numerical char... ie 10+.

            Here the strconv will fail:

              minor, _ := strconv.Atoi(version.Minor)

             

            2) If Major or Minor is not defined if the Gitversion has a dash somewhere in the expected hash portion... ie

            v1.10.1-2+7d2976e4bcbeb

            tommie Tommie McAfee added a comment - Looking at our code there are at least 2 ways this can happen: 1) If the minor version is defined but has a non numerical char... ie 10+. Here the strconv will fail:   minor, _ := strconv.Atoi(version.Minor)   2) If Major or Minor is not defined if the Gitversion has a dash somewhere in the expected hash portion... ie v1.10.1-2+7d2976e4bcbeb

            Preparing a fix, just it ran through some testing:

            ======================= min/maj versions ================
            OK: 11-1 = 11
            OK: 111 = 11
            OK: 9.7 = 9
            OK: 1 = 1
            OK: 1+ = 1
            OK: 1+a = 1
            OK: 1-9 = 1
            ======================= git versions ================
            OK: v1.9.7 = v1.9.7 (major:1, minor:9)
            OK: v1.9.7+ = v1.9.7 (major:1, minor:9)
            OK: v1.9.7+abcd999 = v1.9.7 (major:1, minor:9)
            OK: v1.10.1 = v1.10.1 (major:1, minor:10)
            OK: v1.10.1-2 = v1.10.1 (major:1, minor:10)
            OK: v1.10.1-2+7d2976e4bcbeb9 = v1.10.1 (major:1, minor:10)

            https://gist.github.com/tahmmee/67d420a1a28def4b7fe47350036484f9

            tommie Tommie McAfee added a comment - Preparing a fix, just it ran through some testing: ======================= min/maj versions ================ OK: 11 - 1 = 11 OK: 111 = 11 OK: 9.7 = 9 OK: 1 = 1 OK: 1 + = 1 OK: 1 +a = 1 OK: 1 - 9 = 1 ======================= git versions ================ OK: v1. 9.7 = v1. 9.7 (major: 1 , minor: 9 ) OK: v1. 9.7 + = v1. 9.7 (major: 1 , minor: 9 ) OK: v1. 9.7 +abcd999 = v1. 9.7 (major: 1 , minor: 9 ) OK: v1. 10.1 = v1. 10.1 (major: 1 , minor: 10 ) OK: v1. 10.1 - 2 = v1. 10.1 (major: 1 , minor: 10 ) OK: v1. 10.1 - 2 +7d2976e4bcbeb9 = v1. 10.1 (major: 1 , minor: 10 ) https://gist.github.com/tahmmee/67d420a1a28def4b7fe47350036484f9

            People

              tommie Tommie McAfee
              anil Anil Kumar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty