canonical / minio-operator

MinIO Operator
Apache License 2.0
2 stars 11 forks source link

Missing `secret-key` config value validation #137

Closed gustavosr98 closed 1 month ago

gustavosr98 commented 1 year ago

It is not clear from the charm docs that the secret-key needs to be at least 8 char long It is also not very verbose from Juju POV what is actually happening on the charm

Ideally I would expect to have some config value validation on the charm to set it maybe on blocked state but avoid having the actual service down

Reproduce

juju config minio secret-key=minio

Logs

I cannot access MinIO website

$ juju status | grep minio
minio                      res:oci-image@1755999    waiting      1  minio                    ckf-1.7/stable  186  10.152.183.165  no       
mlflow-minio               res:oci-image@1755999    active       1  minio                    ckf-1.7/edge    186  10.152.183.108  no       
minio/0*                      error     idle   10.1.149.251  9000/TCP,9001/TCP  crash loop backoff: back-off 2m40s restarting failed container=minio pod=minio-0_kubeflow(1980c8fe-8cb3-4099-b9eb-2c6...
mlflow-minio/0*               active    idle   10.1.150.41   9000/TCP,9001/TCP
$ microk8s.kubectl get pods -n kubeflow | grep minio
minio-operator-0                                1/1     Running            0              40d
mlflow-minio-operator-0                         1/1     Running            0              67m
mlflow-minio-0                                  1/1     Running            0              66m
minio-0                                         0/1     CrashLoopBackOff   5 (105s ago)   6m24s
$ microk8s.kubectl logs -n kubeflow minio-0
Defaulted container "minio" out of: minio, juju-pod-init (init)
ERROR Unable to validate credentials inherited from the shell environment: Invalid credentials
      > Please provide correct credentials
      HINT:
        Access key length should be at least 3, and secret key length at least 8 characters
lucabello commented 2 months ago

@orfeas-k I just spent a few hours having to debug this with trial-and-error, because juju debug-log doesn't help at all :) Could you add some check in the charm, and set it to Blocked with a nice message?

syncronize-issues-to-jira[bot] commented 2 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6057.

This message was autogenerated