datashim-io / datashim

A kubernetes based framework for hassle free handling of datasets
http://datashim-io.github.io/datashim
Apache License 2.0
481 stars 68 forks source link

Dataset operator CrashLoopBackOff #362

Closed vmtuan12 closed 5 months ago

vmtuan12 commented 5 months ago

I installed Datashim in my K8s cluster for Minio, using the command kubectl apply -f https://raw.githubusercontent.com/datashim-io/datashim/master/release-tools/manifests/dlf.yaml

But the pod dataset-operator keeps having status CrashLoopBackOff, and here is the log of this pod image

I still do not know why, and how to fix it.

srikumar003 commented 5 months ago

@vmtuan12 you have spotted a bug but it was triggered by a mistake in the dataset specification you provided. The spec did not contain secret-name as required (see example below):

apiVersion: datashim.io/v1alpha1
kind: Dataset
metadata:
  name: example-dataset
spec:
  local:
    type: "COS"
    secret-name: "{SECRET_NAME}" #see s3-secrets.yaml for an example
    secret-namespace: "{SECRET_NAMESPACE}" #optional if the secret is in the same ns as dataset
    endpoint: "{S3_SERVICE_URL}"
    bucket: "{BUCKET_NAME}"
    readonly: "true" # default is false
    region: "" #it can be empty
vmtuan12 commented 5 months ago

@vmtuan12 you have spotted a bug but it was triggered by a mistake in the dataset specification you provided. The spec did not contain secret-name as required (see example below):

apiVersion: datashim.io/v1alpha1
kind: Dataset
metadata:
  name: example-dataset
spec:
  local:
    type: "COS"
    secret-name: "{SECRET_NAME}" #see s3-secrets.yaml for an example
    secret-namespace: "{SECRET_NAMESPACE}" #optional if the secret is in the same ns as dataset
    endpoint: "{S3_SERVICE_URL}"
    bucket: "{BUCKET_NAME}"
    readonly: "true" # default is false
    region: "" #it can be empty

Can you tell me where is the s3-secrets.yaml? I use this configuration in the document image

srikumar003 commented 5 months ago

@vmtuan12 An example for specifying S3 credential as a K8s secret is provided here . We recommend using this over the default example.

Having said that, your configuration should work so check if there are any missing parameters or paste a santised version here so that we can take a look at it

Thanks for raising the issue. I have issued a patch for the original bug which could close this issue. Please reopen with new comments

vmtuan12 commented 5 months ago

@vmtuan12 An example for specifying S3 credential as a K8s secret is provided here . We recommend using this over the default example.

Having said that, your configuration should work so check if there are any missing parameters or paste a santised version here so that we can take a look at it

Thanks for raising the issue. I have issued a patch for the original bug which could close this issue. Please reopen with new comments

Thanks! I have fixed that, now the pod dataset-operator is on, but now i have a problem. My PVC is having status pending, and when the description is like the image below. Is it telling me that the bucket is invalid or something like that? image The dataset yaml of mine is:

apiVersion: v1
kind: Secret
metadata:
  name: s3secret
stringData:
  accessKeyID: "minioadmin"
  secretAccessKey: "minioadmin"
---
apiVersion: datashim.io/v1alpha1
kind: Dataset
metadata:
  name: example-dataset
spec:
  local:
    type: "COS"
    secret-name: "s3secret"
    secret-namespace: "dlf"
    endpoint: "http://<IP>:<port>"
    bucket: "/home/test-ds"
    region: ""