Git Product home page Git Product logo

Comments (6)

matte0080 avatar matte0080 commented on July 19, 2024 1

chown -R 1000:1000 /data/timescaledb/wal/

Hi mate, where you put this code line? I have the same error.

from helm-charts.

lonelyleaf avatar lonelyleaf commented on July 19, 2024

well,when I chang to use ceph as storageClass,it can run successfully.Befor I use hostPath(not local volume in k8s 1.14) as static pv like below.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: timescaledb-data-local-volume
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: timescaledb-wal-local-volume
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
apiVersion: v1
kind: PersistentVolume
metadata:
  name: timescaledb-data-vol-0
spec:
  capacity:
    storage: 200Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: "kubernetes.io/hostname"
              operator: In
              values:
                - "rh2-inf-kafka1"
  storageClassName: timescaledb-data-local-volume
  volumeMode: Filesystem
  hostPath:
    type: DirectoryOrCreate
    path: /data/timescaledb/data

....other pv like this

so dose this mean hostPath is not support,,for I must use local nvme ssd on host

from helm-charts.

feikesteenbergen avatar feikesteenbergen commented on July 19, 2024

I'm not sure why this is happening, the error message:

install: cannot change owner and permissions of β€˜/var/lib/postgresql/data’: No such file or directory

Occurs because the user postgres cannot create that directory; However the StatefulSet explicitly mounts /var/lib/postgresql/data with the postgres user.

For the failing deploy, could you share the following output?

kubectl describe pod/<yourpod>

from helm-charts.

feikesteenbergen avatar feikesteenbergen commented on July 19, 2024

While thinking about the above, I think the problem is with the permissions on the directory of the HostPath. The Docker Image is run as a non-root user, which means the container cannot change ownership of directories.

For the dynamically provisioned Volumes (like your ceph volume), the following piece of code ensures correct ownership:

      securityContext:
        # The postgres user inside the TimescaleDB image has uid=1000.
        # This configuration ensures the permissions of the mounts are suitable
        fsGroup: 1000

https://github.com/timescale/timescaledb-kubernetes/blob/master/charts/timescaledb-single/templates/statefulset-timescaledb.yaml#L36-L39

For troubleshooting could you set the permissions of your HostPath to very liberally (even 0777) and see if that works?

If that solves the problem, the only thing you may need to change is the owner uid of the directory of the HostPath Volume.

from helm-charts.

lonelyleaf avatar lonelyleaf commented on July 19, 2024

Thanks for your replay.

Change peermissions to 0777 did not help,but after use command likechown -R 1000:1000 /data/timescaledb/wal/ did slove the problem.

from helm-charts.

badokun avatar badokun commented on July 19, 2024

chown -R 1000:1000 /data/timescaledb/wal/

Hi mate, where you put this code line? I have the same error.

Same here.. .where can you run that cmd. I tried to exec into the container, but it's not running

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.