Skip to content
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

[BUG] mongodb cmpd status is Unavailable: illegal version string 5.0 #6964

Closed
JashBook opened this issue Apr 3, 2024 · 1 comment
Closed
Assignees
Labels
bug kind/bug Something isn't working severity/major Great chance user will encounter the same problem
Milestone

Comments

@JashBook
Copy link
Collaborator

JashBook commented Apr 3, 2024

Describe the bug

kbcli version
Kubernetes: v1.26.3
KubeBlocks: 0.9.0-beta.2
kbcli: 0.9.0-beta.0

To Reproduce
Steps to reproduce the behavior:

  1. See error
➜  ~ kubectl get cmpd mongodb
NAME      SERVICE   SERVICE-VERSION   STATUS        AGE
mongodb   mongodb   5.0               Unavailable   3m3s

describe cmpd

kubectl describe cmpd mongodb
Name:         mongodb
Namespace:    
Labels:       app.kubernetes.io/instance=kb-addon-mongodb
              app.kubernetes.io/managed-by=Helm
              app.kubernetes.io/name=mongodb
              app.kubernetes.io/version=5.0
              helm.sh/chart=mongodb-0.9.0
Annotations:  meta.helm.sh/release-name: kb-addon-mongodb
              meta.helm.sh/release-namespace: kb-system
API Version:  apps.kubeblocks.io/v1alpha1
Kind:         ComponentDefinition
Metadata:
  Creation Timestamp:  2024-04-03T08:02:43Z
  Finalizers:
    componentdefinition.kubeblocks.io/finalizer
  Generation:  2
  Managed Fields:
    API Version:  apps.kubeblocks.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:meta.helm.sh/release-name:
          f:meta.helm.sh/release-namespace:
        f:labels:
          .:
          f:app.kubernetes.io/instance:
          f:app.kubernetes.io/managed-by:
          f:app.kubernetes.io/name:
          f:app.kubernetes.io/version:
          f:helm.sh/chart:
      f:spec:
        .:
        f:configs:
          .:
          k:{"name":"agamotto-configuration"}:
            .:
            f:defaultMode:
            f:name:
            f:namespace:
            f:templateRef:
            f:volumeName:
          k:{"name":"mongodb-config"}:
            .:
            f:constraintRef:
            f:defaultMode:
            f:name:
            f:namespace:
            f:templateRef:
            f:volumeName:
        f:description:
        f:lifecycleActions:
          .:
          f:roleProbe:
            .:
            f:builtinHandler:
            f:periodSeconds:
            f:timeoutSeconds:
        f:logConfigs:
          .:
          k:{"name":"running"}:
            .:
            f:filePathPattern:
            f:name:
        f:minReadySeconds:
        f:monitor:
          .:
          f:builtIn:
          f:exporterConfig:
            .:
            f:scrapePath:
            f:scrapePort:
        f:provider:
        f:roleArbitrator:
        f:roles:
        f:runtime:
        f:scripts:
          .:
          k:{"name":"mongodb-scripts"}:
            .:
            f:defaultMode:
            f:name:
            f:namespace:
            f:templateRef:
            f:volumeName:
        f:serviceKind:
        f:serviceVersion:
        f:services:
        f:systemAccounts:
        f:updateStrategy:
        f:vars:
    Manager:      helm
    Operation:    Update
    Time:         2024-04-03T08:02:43Z
    API Version:  apps.kubeblocks.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .:
          v:"componentdefinition.kubeblocks.io/finalizer":
      f:spec:
        f:runtime:
          f:containers:
    Manager:      manager
    Operation:    Update
    Time:         2024-04-03T08:02:43Z
    API Version:  apps.kubeblocks.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:message:
        f:observedGeneration:
        f:phase:
    Manager:         manager
    Operation:       Update
    Subresource:     status
    Time:            2024-04-03T08:02:43Z
  Resource Version:  2465543
  UID:               27909167-0420-438a-91d9-24d6c203bdd0
Spec:
  Configs:
    Constraint Ref:  mongodb-config-constraints
    Default Mode:    256
    Name:            mongodb-config
    Namespace:       kb-system
    Template Ref:    mongodb5.0-config-template
    Volume Name:     mongodb-config
    Default Mode:    292
    Name:            agamotto-configuration
    Namespace:       kb-system
    Template Ref:    mongodb-metrics-config-new
    Volume Name:     agamotto-configuration
  Description:       MongoDB is a document database designed for ease of application development and scaling.
  Lifecycle Actions:
    Role Probe:
      Builtin Handler:  mongodb
      Period Seconds:   2
      Timeout Seconds:  2
  Log Configs:
    File Path Pattern:  /data/mongodb/logs/mongodb.log*
    Name:               running
  Min Ready Seconds:    0
  Monitor:
    Built In:  false
    Exporter Config:
      Scrape Path:  /metrics
      Scrape Port:  9216
  Provider:         kubeblocks.io
  Role Arbitrator:  External
  Roles:
    Name:         primary
    Serviceable:  true
    Votable:      true
    Writable:     true
    Name:         secondary
    Serviceable:  true
    Votable:      true
    Writable:     false
  Runtime:
    Containers:
      Command:
        /scripts/replicaset-setup.sh
      Env:
        Name:             SERVICE_PORT
        Value:            27017
        Name:             MONGODB_ROOT_USER
        Value:            $(MONGODB_USER)
        Name:             MONGODB_ROOT_PASSWORD
        Value:            $(MONGODB_PASSWORD)
      Image:              docker.io/apecloud/mongo:5.0.14
      Image Pull Policy:  IfNotPresent
      Name:               mongodb
      Ports:
        Container Port:  27017
        Name:            mongodb
        Protocol:        TCP
      Resources:
      Volume Mounts:
        Mount Path:  /data/mongodb
        Name:        data
        Mount Path:  /etc/mongodb/mongodb.conf
        Name:        mongodb-config
        Sub Path:    mongodb.conf
        Mount Path:  /etc/mongodb/keyfile
        Name:        mongodb-config
        Sub Path:    keyfile
        Mount Path:  /scripts
        Name:        scripts
      Command:
        /bin/agamotto
        --config=/opt/agamotto/metrics-config.yaml
      Env:
        Name:             MONGODB_ROOT_USER
        Value:            $(MONGODB_USER)
        Name:             MONGODB_ROOT_PASSWORD
        Value:            $(MONGODB_PASSWORD)
        Name:             DB_TYPE
        Value:            mongodb
      Image:              docker.io/apecloud/agamotto:0.1.2-beta.1
      Image Pull Policy:  IfNotPresent
      Name:               metrics
      Ports:
        Container Port:  9216
        Name:            http-metrics
        Protocol:        TCP
      Resources:
      Security Context:
        Run As Non Root:  false
        Run As User:      0
      Volume Mounts:
        Mount Path:  /opt/agamotto
        Name:        agamotto-configuration
        Mount Path:  /data/mongodb
        Name:        data
  Scripts:
    Default Mode:   365
    Name:           mongodb-scripts
    Namespace:      kb-system
    Template Ref:   mongodb-scripts
    Volume Name:    scripts
  Service Kind:     mongodb
  Service Version:  5.0
  Services:
    Generate Pod Ordinal Service:  false
    Name:                          default
    Role Selector:                 primary
    Service Name:                  mongodb
    Spec:
      Ports:
        Name:                      mongodb
        Port:                      27017
        Protocol:                  TCP
        Target Port:               mongodb
    Generate Pod Ordinal Service:  false
    Name:                          readonly
    Role Selector:                 secondary
    Service Name:                  mongodb-ro
    Spec:
      Ports:
        Name:                      mongodb
        Port:                      27017
        Protocol:                  TCP
        Target Port:               mongodb
    Generate Pod Ordinal Service:  true
    Name:                          everypod
    Spec:
      Ports:
        Name:         mongodb
        Port:         27017
        Protocol:     TCP
        Target Port:  mongodb
  System Accounts:
    Init Account:  true
    Name:          root
    Password Generation Policy:
      Length:       16
      Letter Case:  MixedCases
      Num Digits:   8
      Num Symbols:  0
  Update Strategy:  Serial
  Vars:
    Name:  MONGODB_USER
    Value From:
      Credential Var Ref:
        Comp Def:  mongodb
        Name:      root
        Optional:  false
        Username:  Required
    Name:          MONGODB_PASSWORD
    Value From:
      Credential Var Ref:
        Comp Def:  mongodb
        Name:      root
        Optional:  false
        Password:  Required
Status:
  Message:              illegal version string "5.0"
  Observed Generation:  2
  Phase:                Unavailable
Events:                 <none>

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@JashBook JashBook added kind/bug Something isn't working severity/major Great chance user will encounter the same problem labels Apr 3, 2024
@JashBook JashBook added this to the Release 0.9.0 milestone Apr 3, 2024
@JashBook
Copy link
Collaborator Author

JashBook commented Apr 3, 2024

dup with #6912

@JashBook JashBook closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug kind/bug Something isn't working severity/major Great chance user will encounter the same problem
Projects
None yet
Development

No branches or pull requests

3 participants