Code Monkey home page Code Monkey logo

Comments (10)

Mo0rBy avatar Mo0rBy commented on May 24, 2024

I've done some more research and came across this thread. Is fixing my issue just a matter of adding an environment variable to my MinIO deployment to change the data dir of the container? If yes, would it be possible to make this change within the Helm chart as well? Then no one else will experience this problem.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

I've just tried adding this to my Helm chart deployment:

    extraEnvVars:
      - name: MINIO_DATA_DIR
        value: /minio

And I get this error:

 10:27:47.39 INFO  ==> ** Starting MinIO setup **
minio 10:27:47.40 DEBUG ==> Validating settings in MINIO_* env vars..
minio 10:27:47.47 INFO  ==> Starting MinIO in background...
ERROR Unable to use the drive /bitnami/minio/data: drive access denied: Invalid arguments specified
minio 10:27:57.50 INFO  ==> Adding local Minio host to 'mc' configuration...

So even with this envVar set, Minio is still trying to use the default data dir I think.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

I've just tried adding this to my Helm chart deployment:

    extraEnvVars:
      - name: MINIO_DATA_DIR
        value: /minio

And I get this error:

 10:27:47.39 INFO  ==> ** Starting MinIO setup **
minio 10:27:47.40 DEBUG ==> Validating settings in MINIO_* env vars..
minio 10:27:47.47 INFO  ==> Starting MinIO in background...
ERROR Unable to use the drive /bitnami/minio/data: drive access denied: Invalid arguments specified
minio 10:27:57.50 INFO  ==> Adding local Minio host to 'mc' configuration...

So even with this envVar set, Minio is still trying to use the default data dir I think.

Nevermind, I removed the persistence.mountPath and didn't realise, using both persistence.mountPath and the MINIO_DATA_DIR envVar allow the container to start correctly, however, data is still stored in the default /bitnami/minio/data location.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

I can confirm the MINIO_DATA_DIR envVar is being used by looking at my yaml and shelling into the container and executing env | grep data:

I have no name!@minio-2-7959bf54dc-rrltg:/minio/data$ env | grep data
PWD=/minio/data
MINIO_DATA_DIR=/minio/data

But creating a test bucket still create data in the default directory:

I have no name!@minio-2-7959bf54dc-rrltg:/minio/data$ cd /bitnami/minio/data/
I have no name!@minio-2-7959bf54dc-rrltg:/bitnami/minio/data$ ls
test-bucket

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

I've also tried using the containerSecurityContext options to add an fsGroup definition and runAsUser definition but data is still stored in the default /bitnami/minio/data directory.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

Anyone seen this?
As I say, this is either a major bug or I'm missing something very critical.

from charts.

FraPazGal avatar FraPazGal commented on May 24, 2024

Hello @Mo0rBy, apologies for the radio silence on holidays season! I've been able to reproduce this issue and it seems there is an issue with the MINIO_DATA_DIR envar, as it is not been used in the initial minio server setup. If we look for the root cause inside the minio pod we'll see the following:

I have no name!@minio-8f4765b56-qw56h:/$ printenv | grep MINIO_DATA_DIR
MINIO_DATA_DIR=/tmp/minio
I have no name!@minio-8f4765b56-qw56h:/$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
1001         1  0.2  1.3 1590428 163208 ?      Ssl  16:53   0:01 /opt/bitnami/minio/bin/minio server --certs-dir /certs --console-address :9001 --address :9000 /bitnami/minio/data

The server is started via the run.sh script. The issue is that the $MINIO_DATA_DIR in that script is loaded from:

# Load MinIO environment
. /opt/bitnami/scripts/minio-env.sh

If we check that env file, we'll see that MINIO_DATA_DIR has a fixed value and can't be changed:

I have no name!@minio-8f4765b56-qw56h:/$ cat /opt/bitnami/scripts/minio-env.sh | grep MINIO_DATA_DIR
export MINIO_DATA_DIR="/bitnami/minio/data"

Let me check with the dev team on the reason this configuration is in place and the best approach to solve this.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

No worries @FraPazGal , I thought it would be a while until there was any reply as I did post this on Boxing Day I think and I wasn't expecting anyone to be working. And I'm super happy that it seems to be a bug and not me being stupid.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

Am I allowed to raise a PR for this? I can't find any docs on how to raise changes on the README or anything so if you I am allowed and you can point me to the docs, that would much appreciated.

from charts.

Mo0rBy avatar Mo0rBy commented on May 24, 2024

@FraPazGal ^?

from 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.