The Desired Logs always be changed to 3

Background:

  • foundation operator(v1.21.0).
  • fdb cluster with 24 storages, 6 logs, 6 stateless.

Problem:
Every time when I do some maintains(scale out or scale down) to the fdb cluster, my Desired Logs will change from 6 to 3, and I have to change this config back to 6 after the maintains.

Is any way to stop that(modify the Desired Logs)?

Are you able to share the FoundationDBCluster spec? The configured DatabaseConfiguration would be interesting. Are there any logs in the operator?

Every time when I do some maintains(scale out or scale down) to the fdb cluster, my Desired Logs will change from 6 to 3, and I have to change this config back to 6 after the maintains.

Could you explain that? Are you running the configure command or do you have to update the FoundationDBCluster spec again?

follow is my FoundationDBCluster spec

apiVersion: apps.foundationdb.org/v1beta2
kind: FoundationDBCluster
metadata:
  name: fdb-cluster
  namespace: default
spec:
  automationOptions:
    replacements:
      enabled: true
  faultDomain:
    key: foundationdb.org/hostname
    valueFrom: spec.nodeName
  labels:
    filterOnOwnerReference: false
    matchLabels:
      foundationdb.org/fdb-cluster-name: fdb-cluster
    processClassLabels:
      - foundationdb.org/fdb-process-class
    processGroupIDLabels:
      - foundationdb.org/fdb-process-group-id
  minimumUptimeSecondsForBounce: 60
  storageServersPerPod: 1
  processCounts:
    storage: 9
    log: 6
    stateless: 3
  databaseConfiguration:
    redundancy_mode: double
    storage_engine: ssd-2
  processes:
    general:
      customParameters:
        - knob_disable_posix_kernel_aio=1
        - knob_server_mem_limit=1536Mi
      podTemplate:
        spec:
          containers:
            - name: foundationdb
              resources:
                requests:
                  cpu: 1
                  memory: 2Gi
                limits:
                  cpu: 1
                  memory: 2Gi
              securityContext:
                runAsUser: 0
            - name: foundationdb-kubernetes-sidecar
              resources:
                limits:
                  cpu: 100m
                  memory: 128Mi
                requests:
                  cpu: 10m
                  memory: 128Mi
              securityContext:
                runAsUser: 0
          initContainers:
            - name: foundationdb-kubernetes-init
              resources:
                limits:
                  cpu: 100m
                  memory: 128Mi
                requests:
                  cpu: 10m
                  memory: 128Mi
              securityContext:
                runAsUser: 0
  routing:
    publicIPSource: "service"
    headlessService: true
    useDNSInClusterFile: false
    defineDNSLocalityFields: true
  useExplicitListenAddress: true
  version: 7.1.26

First, I run the cmd fdbcli --exec 'configure logs=6', and use status details and monitor to confirm the change is applyed.
Then, I modify above processCounts field, and the Desired Logs will be rollback to 3 when maintains is over.

I didn’t find any logs(maybe I missed it).

Can you change your configuration from above to:

 processCounts:

  databaseConfiguration:
    redundancy_mode: double
    storage_engine: ssd-2
    storage: 9
    log: 6
    stateless: 3

Docs: fdb-kubernetes-operator/docs/manual/scaling.md at main · FoundationDB/fdb-kubernetes-operator · GitHub. If you set the process counts you only tell the operator to run more (or less) processes, but you have to change the databaseConfiguration to tell the operator it should configure the FDB cluster to a specific number of roles. So under normal circumstances you only want to change the counts in the databaseConfiguration and not the processCounts. The processCounts give you a way to add more or less additional Pods to the cluster e.g. if you decide that 2 additional log Pods are not enough for your setup you could increase the log count in the processCounts.

I set the field logs to 6 in databaseConfiguration, it seems work for me. The desired logs change to 6 after I save the fdb crd.

Thanks a lot.