charts icon indicating copy to clipboard operation
charts copied to clipboard

[Bitnami/redis] redis chart 19.6.0 crashed after deployment

Open tk2023 opened this issue 1 year ago • 2 comments

Name and Version

bitnami/redis-19.6.0

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. In digitalocean kubernete environment, install chart redis-19.6.0.
  2. Using standard chart configuration. Just change the redis password to my password. here is the pod log:
1:C 29 Jun 2024 14:49:54.787 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 29 Jun 2024 14:49:54.787 * Redis version=7.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 29 Jun 2024 14:49:54.787 * Configuration loaded
1:M 29 Jun 2024 14:49:54.787 * monotonic clock: POSIX clock_gettime
1:M 29 Jun 2024 14:49:54.788 * Running mode=standalone, port=6379.
1:M 29 Jun 2024 14:49:54.788 * Server initialized
1:M 29 Jun 2024 14:49:54.791 * Reading RDB base file on AOF loading...
1:M 29 Jun 2024 14:49:54.791 * Loading RDB produced by version 7.2.5
1:M 29 Jun 2024 14:49:54.791 * RDB age 469330 seconds
1:M 29 Jun 2024 14:49:54.791 * RDB memory usage when created 634.14 Mb
1:M 29 Jun 2024 14:49:54.791 * RDB is base AOF

here is the description for pod

❯ kubectl describe pods redis-master-0 -n redis

Name:             redis-master-0
Namespace:        redis
Priority:         0
Service Account:  redis-master
Node:             pool-sfo-2c-rtng6/10.124.0.5
Start Time:       Sat, 29 Jun 2024 07:38:28 -0700
Labels:           app.kubernetes.io/component=master
                  app.kubernetes.io/instance=redis
                  app.kubernetes.io/managed-by=Helm
                  app.kubernetes.io/name=redis
                  app.kubernetes.io/version=7.2.5
                  apps.kubernetes.io/pod-index=0
                  controller-revision-hash=redis-master-6fb499d86d
                  helm.sh/chart=redis-19.6.0
                  statefulset.kubernetes.io/pod-name=redis-master-0
Annotations:      checksum/configmap: 86bcc953bb473748a3d3dc60b7c11f34e60c93519234d4c37f42e22ada559d47
                  checksum/health: aff24913d801436ea469d8d374b2ddb3ec4c43ee7ab24663d5f8ff1a1b6991a9
                  checksum/scripts: b032d0a9786b34ea89cf23766468aa85a6963199094c6da9b17a186cb2e72c33
                  checksum/secret: 9a0e0ba16140f6403a7f7d3e12489c6ee668f22d156831fcc36f6899478666da
Status:           Running
IP:               10.244.0.58
IPs:
  IP:           10.244.0.58
Controlled By:  StatefulSet/redis-master
Containers:
  redis:
    Container ID:    containerd://8c6b1734363cac6ab2f8dbdb7351491b961134376be31e1b138157afb0644ed7
    Image:           docker.io/bitnami/redis:7.2.5-debian-12-r0
    Image ID:        docker.io/bitnami/redis@sha256:5261cae9e4076b75d114e6bb032a0699c50b004ea06a680a5304c4c08d286adb
    Port:            6379/TCP
    Host Port:       0/TCP
    SeccompProfile:  RuntimeDefault
    Command:
      /bin/bash
    Args:
      -c
      /opt/bitnami/scripts/start-scripts/start-master.sh
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       OOMKilled
      Exit Code:    137
      Started:      Sat, 29 Jun 2024 07:49:54 -0700
      Finished:     Sat, 29 Jun 2024 07:49:59 -0700
    Ready:          False
    Restart Count:  7
    Limits:
      cpu:                150m
      ephemeral-storage:  1Gi
      memory:             192Mi
    Requests:
      cpu:                100m
      ephemeral-storage:  50Mi
      memory:             128Mi
    Liveness:             exec [sh -c /health/ping_liveness_local.sh 5] delay=20s timeout=6s period=5s #success=1 #failure=5
    Readiness:            exec [sh -c /health/ping_readiness_local.sh 1] delay=20s timeout=2s period=5s #success=1 #failure=5
    Environment:
      BITNAMI_DEBUG:           false
      REDIS_REPLICATION_MODE:  master
      ALLOW_EMPTY_PASSWORD:    no
      REDIS_PASSWORD:          <set to the key 'redis-password' in secret 'redis'>  Optional: false
      REDIS_TLS_ENABLED:       no
      REDIS_PORT:              6379
    Mounts:
      /data from redis-data (rw)
      /health from health (rw)
      /opt/bitnami/redis/etc/ from empty-dir (rw,path="app-conf-dir")
      /opt/bitnami/redis/mounted-etc from config (rw)
      /opt/bitnami/scripts/start-scripts from start-scripts (rw)
      /tmp from empty-dir (rw,path="tmp-dir")
Conditions:
  Type                        Status
  PodReadyToStartContainers   True
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  redis-data:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  redis-data-redis-master-0
    ReadOnly:   false
  start-scripts:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      redis-scripts
    Optional:  false
  health:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      redis-health
    Optional:  false
  config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      redis-configuration
    Optional:  false
  empty-dir:
    Type:        EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:   <unset>
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason                  Age                   From                     Message
  ----     ------                  ----                  ----                     -------
  Normal   Scheduled               14m                   default-scheduler        Successfully assigned redis/redis-master-0 to pool-sfo-2c-rtng6
  Normal   SuccessfulAttachVolume  14m                   attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-fe96e623-8849-4e3a-a499-2b2e5ceb4923"
  Normal   Pulled                  12m (x5 over 14m)     kubelet                  Container image "docker.io/bitnami/redis:7.2.5-debian-12-r0" already present on machine
  Normal   Created                 12m (x5 over 14m)     kubelet                  Created container redis
  Normal   Started                 12m (x5 over 14m)     kubelet                  Started container redis
  Warning  BackOff                 4m12s (x49 over 14m)  kubelet                  Back-off restarting failed container redis in pod redis-master-0_redis(fe32421e-cd1a-4a80-80bb-df5a74da6f6c)

Are you using any custom parameters or values?

The changes are this line:

password: "password" and replicaCount: 1

What is the expected behavior?

redis should started

What do you see instead?

❯ kubectl get pods -n redis NAME READY STATUS RESTARTS AGE redis-master-0 0/1 CrashLoopBackOff 8 (87s ago) 18m redis-replicas-0 0/1 CrashLoopBackOff 9 (2m21s ago) 19m

Additional information

No response

tk2023 avatar Jun 29 '24 14:06 tk2023

Thank you for the JSFiddle example which clearly shows the issue. I'm adding the 'needs investigation' label because we will need to discuss internally whether a change to this behaviour should be the default and expected behaviour going forward, or whether we should put the new behaviour behind an option.

I can see a benefit to both approaches. Additionally, the fact that the behaviour is different for the past (left) direction compared to the future direction is unexpected.

SlicedSilver avatar May 23 '24 19:05 SlicedSilver

One solution to this is to have all of the area that you want scrollable as whitespace data and the very last data a line data with a NaN value.

Like so:

const whitespaceStartDate = "1970-01-01";
const whitespaceEndDate = "2100-01-01";
const whitespaceDateDataset: ((WhitespaceData | SingleValueData) & Numbered)[] =
  new Array(
    getNumberOfDaysBetweenTwoDates(
      new Date(whitespaceStartDate),
      new Date(whitespaceEndDate),
    ),
  );
// Hack to be able to scroll freely
// Setting them all to NaN is much slower
for (let i = 0; i < whitespaceDateDataset.length; i++) {
  const date = new Date(whitespaceStartDate);
  date.setUTCDate(date.getUTCDay() + i);

  const number = date.valueOf() / ONE_DAY_IN_MS;
  const time = dateToString(date);

  if (i === whitespaceDateDataset.length - 1) {
    whitespaceDateDataset[i] = {
      number,
      time,
      value: NaN,
    };
  } else {
    whitespaceDateDataset[i] = {
      number,
      time,
    };
  }
}

nym21 avatar Jul 02 '24 08:07 nym21