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]cmpd mongodb Unavailable for illegal version string "5.0" #6912

Closed
ahjing99 opened this issue Mar 28, 2024 · 1 comment
Closed

[BUG]cmpd mongodb Unavailable for illegal version string "5.0" #6912

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

Comments

@ahjing99
Copy link
Collaborator

➜ ~ kbcli version
Kubernetes: v1.27.8-gke.1067004
KubeBlocks: 0.9.0-alpha.7
kbcli: 0.9.0-alpha.2

➜  ~ k get cmpd mongodb
NAME      SERVICE   SERVICE-VERSION   STATUS        AGE
mongodb   mongodb   5.0               Unavailable   25m

➜  ~ k 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-03-28T09:22:24Z
  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-03-28T09:22:24Z
    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-03-28T09:22:24Z
    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-03-28T09:22:24Z
  Resource Version:  2655096
  UID:               d938d66f-9a26-4684-a673-640398062227
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:              infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/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:              infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/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>


2024-03-28T09:35:50.954Z	ERROR	Reconciler error	{"controller": "componentdefinition", "controllerGroup": "apps.kubeblocks.io", "controllerKind": "ComponentDefinition", "ComponentDefinition": {"name":"mongodb"}, "namespace": "", "name": "mongodb", "reconcileID": "2d1f5ccf-4792-42c0-a2fc-f5dc422f345c", "error": "illegal version string \"5.0\""}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:324
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226
@ahjing99 ahjing99 added the kind/bug Something isn't working label Mar 28, 2024
@ahjing99 ahjing99 added this to the Release 0.9.0 milestone Mar 28, 2024
@ahjing99 ahjing99 assigned leon-inf and unassigned xuriwuyun Mar 28, 2024
@ahjing99 ahjing99 added the severity/major Great chance user will encounter the same problem label Apr 1, 2024
@leon-inf
Copy link
Contributor

fixed in apecloud/kubeblocks-addons#451

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

4 participants