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

[bitbami/mariadb] upgrading to 20.2.1 keeps the statefulset unready while the pods are working flawlessly #31465

Open
urbaman opened this issue Jan 18, 2025 · 1 comment
Assignees
Labels
mariadb tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@urbaman
Copy link

urbaman commented Jan 18, 2025

Name and Version

bitnami/mariadb 20.2.1

What architecture are you using?

amd64

What steps will reproduce the bug?

I upgraded to 20.2.1, but it didn't work at first and I found out I had to delete the sts first.
Then, I upgraded the chart, and everything seems to be ok, but the sts still show 0/1 like not recognizing the pods running. The pods were never touched by the upgrade.

Are you using any custom parameters or values?

--namespace mariadb --create-namespace --set metrics.enabled=true --set metrics.serviceMonitor.enabled=true --set metrics.serviceMonitor.labels.release=rancher-monitoring --set primary.persistence.storageClass=<storage-class> --set primary.persistence.size=15Gi --set auth.rootPassword=<password>

What is the expected behavior?

Having the sts in ready state:

$ kubectl get sts -n mariadb
NAME      READY   AGE
mariadb   1/1     14m

What do you see instead?

$ kubectl get pods -n mariadb
NAME                          READY   STATUS    RESTARTS      AGE
mariadb-0                     2/2     Running   8 (32h ago)   30d
$ kubectl get sts -n mariadb
NAME      READY   AGE
mariadb   0/1     14m
$ kubectl describe sts mariadb -n mariadb
Name:               mariadb
Namespace:          mariadb
CreationTimestamp:  Sat, 18 Jan 2025 17:03:49 +0100
Selector:           app.kubernetes.io/component=primary,app.kubernetes.io/instance=mariadb,app.kubernetes.io/name=mariadb,app.kubernetes.io/part-of=mariadb
Labels:             app.kubernetes.io/component=primary
                    app.kubernetes.io/instance=mariadb
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=mariadb
                    app.kubernetes.io/part-of=mariadb
                    app.kubernetes.io/version=11.4.4
                    helm.sh/chart=mariadb-20.2.1
Annotations:        meta.helm.sh/release-name: mariadb
                    meta.helm.sh/release-namespace: mariadb
Replicas:           1 desired | 0 total
Update Strategy:    RollingUpdate
Pods Status:        0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app.kubernetes.io/component=primary
                    app.kubernetes.io/instance=mariadb
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=mariadb
                    app.kubernetes.io/part-of=mariadb
                    app.kubernetes.io/version=11.4.4
                    helm.sh/chart=mariadb-20.2.1
  Annotations:      checksum/configuration: 78fabe5af5ef34e176b681ed0cc21b31be6ce9fba1005cd049745fa7c32c3e61
  Service Account:  mariadb
  Init Containers:
   preserve-logs-symlinks:
    Image:           docker.io/bitnami/mariadb:11.4.4-debian-12-r2
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Command:
      /bin/bash
    Args:
      -ec
      #!/bin/bash

      . /opt/bitnami/scripts/libfs.sh
      # We copy the logs folder because it has symlinks to stdout and stderr
      if ! is_dir_empty /opt/bitnami/mariadb/logs; then
        cp -r /opt/bitnami/mariadb/logs /emptydir/app-logs-dir
      fi

    Limits:
      cpu:                375m
      ephemeral-storage:  2Gi
      memory:             384Mi
    Requests:
      cpu:                250m
      ephemeral-storage:  50Mi
      memory:             256Mi
    Environment:          <none>
    Mounts:
      /emptydir from empty-dir (rw)
  Containers:
   mariadb:
    Image:           docker.io/bitnami/mariadb:11.4.4-debian-12-r2
    Port:            3306/TCP
    Host Port:       0/TCP
    SeccompProfile:  RuntimeDefault
    Limits:
      cpu:                375m
      ephemeral-storage:  2Gi
      memory:             384Mi
    Requests:
      cpu:                250m
      ephemeral-storage:  50Mi
      memory:             256Mi
    Liveness:             exec [/bin/bash -ec password_aux="${MARIADB_ROOT_PASSWORD:-}"
if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
    password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
fi
mariadb-admin status -uroot -p"${password_aux}"
] delay=120s timeout=1s period=10s #success=1 #failure=3
    Readiness:  exec [/bin/bash -ec password_aux="${MARIADB_ROOT_PASSWORD:-}"
if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
    password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
fi
mariadb-admin ping -uroot -p"${password_aux}"
] delay=30s timeout=1s period=10s #success=1 #failure=3
    Environment:
      BITNAMI_DEBUG:          false
      MARIADB_ROOT_PASSWORD:  <set to the key 'mariadb-root-password' in secret 'mariadb'>  Optional: false
      MARIADB_DATABASE:       my_database
      MARIADB_ENABLE_SSL:     no
    Mounts:
      /bitnami/mariadb from data (rw)
      /opt/bitnami/mariadb/conf from empty-dir (rw,path="app-conf-dir")
      /opt/bitnami/mariadb/conf/my.cnf from config (rw,path="my.cnf")
      /opt/bitnami/mariadb/logs from empty-dir (rw,path="app-logs-dir")
      /opt/bitnami/mariadb/tmp from empty-dir (rw,path="app-tmp-dir")
      /tmp from empty-dir (rw,path="tmp-dir")
   metrics:
    Image:      docker.io/bitnami/mysqld-exporter:0.16.0-debian-12-r3
    Port:       9104/TCP
    Host Port:  0/TCP
    Command:
      /bin/bash
      -ec
      password_aux="${MARIADB_ROOT_PASSWORD:-}"
      if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
          password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
      fi
      MYSQLD_EXPORTER_PASSWORD=${password_aux} /bin/mysqld_exporter --mysqld.address=localhost:3306 --mysqld.username=root --web.listen-address=:9104

    Limits:
      cpu:                150m
      ephemeral-storage:  2Gi
      memory:             192Mi
    Requests:
      cpu:                100m
      ephemeral-storage:  50Mi
      memory:             128Mi
    Liveness:             http-get http://:metrics/metrics delay=120s timeout=1s period=10s #success=1 #failure=3
    Readiness:            http-get http://:metrics/metrics delay=30s timeout=1s period=10s #success=1 #failure=3
    Environment:
      MARIADB_ROOT_PASSWORD:  <set to the key 'mariadb-root-password' in secret 'mariadb'>  Optional: false
    Mounts:
      /tmp from empty-dir (rw,path="tmp-dir")
  Volumes:
   empty-dir:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
   config:
    Type:          ConfigMap (a volume populated by a ConfigMap)
    Name:          mariadb
    Optional:      false
  Node-Selectors:  <none>
  Tolerations:     <none>
Volume Claims:
  Name:          data
  StorageClass:  asustornas1-nfs
  Labels:        app.kubernetes.io/component=primary
                 app.kubernetes.io/instance=mariadb
                 app.kubernetes.io/name=mariadb
  Annotations:   <none>
  Capacity:      15Gi
  Access Modes:  [ReadWriteOnce]
Events:          <none>
@urbaman urbaman added the tech-issues The user has a technical issue about an application label Jan 18, 2025
@github-actions github-actions bot added the triage Triage is needed label Jan 18, 2025
@javsalgar
Copy link
Contributor

Hi,

From which version are you trying to upgrade the chart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mariadb tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

3 participants