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

[cockroach operator] Setting spec.dataStore.supportsAutoResize to true does not enable auto resizing #118

Closed
unw9527 opened this issue Jun 15, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@unw9527
Copy link
Contributor

unw9527 commented Jun 15, 2022

What version of operator are you using?
commit 561cf47d783c368fd8795acb82a5a39099a35984 (HEAD -> master)

What operating system and processor architecture are you using (kubectl version)?
Ubuntu. 20.04

kubectl version Output
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.0", GitCommit:"4ce5a8954017644c5420bae81d72b09b735c21f0", GitTreeState:"clean", BuildDate:"2022-05-03T13:46:05Z", GoVersion:"go1.18.1", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-05-19T19:53:08Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.24) and server (1.22) exceeds the supported minor version skew of +/-1

What did you do?

We are trying to enable the auto resizing feature for the PVC so that we do not need to restart the cluster to resize the PVC.
But it seems this field supportsAutoResize is a no-op. We changed the PVC size from 1Gi to 2Gi, but the PVC is not automatically resized to 2Gi.

Reproduce

  1. first applied the operator yaml file and crd yaml file.
  2. Then I applied the following cr file to deploy the initial cockroachdb-operator:
apiVersion: crdb.cockroachlabs.com/v1alpha1
kind: CrdbCluster
metadata:
  name: test-cluster
spec:
  additionalLabels:
    crdb: is-cool
  dataStore:
    pvc:
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
        volumeMode: Filesystem
  image:
    name: cockroachdb/cockroach:v21.2.10
  nodes: 3
  resources:
    limits:
      cpu: 2
      memory: 2Gi
    requests:
      cpu: 100m
      memory: 1Gi
  tlsEnabled: true

(All files were applied using kubectl apply -f <filename> -n cockroach-operator-system)

  1. Then we changed the PVC's size from 1Gi to 2Gi, at the same time changed the field spec.dataStore.supportsAutoResize to true, but the PVC size is not changed.
apiVersion: crdb.cockroachlabs.com/v1alpha1
kind: CrdbCluster
metadata:
  name: test-cluster
spec:
  additionalLabels:
    crdb: is-cool
  dataStore:
    pvc:
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 2Gi
        volumeMode: Filesystem
    supportsAutoResize: true
  image:
    name: cockroachdb/cockroach:v21.2.10
  nodes: 3
  resources:
    limits:
      cpu: 2
      memory: 2Gi
    requests:
      cpu: 100m
      memory: 1Gi
  tlsEnabled: true

What did you expect to see and what did you see instead?

We expect to see PVC resizing is automated after setting the field spec.dataStore.supportsAutoResize to true. However, the field spec.dataStore.supportsAutoResize has no effect.

Possible cause
We do not find any relevant functioning code in cockroach operator codebase that handles spec.dataStore.supportsAutoResize. The field supportsAutoResize is defined in cluster_types.go, but the only possible code handling it in resize_pvc.go is commented.

@unw9527 unw9527 added the bug Something isn't working label Jun 15, 2022
@tylergu tylergu changed the title [cockroach operator] Assigning a value to supportsAutoResize has no effect [cockroach operator] Setting spec.dataStore.supportsAutoResize to true does not enable auto resizing Jun 17, 2022
@tylergu
Copy link
Member

tylergu commented Jun 17, 2022

Issued: cockroachdb/cockroach-operator#919

@tylergu tylergu closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants