Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minio CLI attempts to create config.json on read-only filesystem. Retarded developers wrote it. #4530

Closed
lightuponcloud opened this issue Mar 30, 2023 · 1 comment

Comments

@lightuponcloud
Copy link

Expected behavior

Developers must not be retarded to write cloud-related software.
Often in kubernetes and other orchestrators you need to create "Jobs" to perform some tasks. In those environments filesytem is often read-only !

Actual behavior

Developers of minio are retarded.

In mc, main.go

// initMC - initialize 'mc'.
func initMC() {
        // Check if mc config exists.
        if !isMcConfigExists() {
                err := saveMcConfig(newMcConfig())

That is executing before reading environment variables. Therefore disregarding the fact env is defined, it still requires config.json to exist on filesystem.

Steps to reproduce the behavior

  1. mount the filesystem read-only, without config.json
  2. run mc admin idp openid info client
  3. see error:
_mc: <ERROR> Unable to save new mc config. mkdir /minio/.mc/: file exists.
_mc: <ERROR> Unable to save new mc config. open /mnt/minio/$tmpfile.config.json.3462122313: read-only file system
 (3) main.go:270 cmd.initMC(..)
 (2) config.go:145 cmd.saveMcConfig(..) Tags: [/mnt/minio/config.json]
 (1) config-v10.go:161 cmd.saveConfigV10(..) Tags: [/mnt/minio/config.json]
 (0) config-v10.go:161 cmd.saveConfigV10(..)
 Release-Tag:2.3.0-9 | Commit:DEVELOPMENT. | Host:test-hook-ffpbz | OS:linux | Arch:amd64 | Lang:go1.19.4 | Mem:2.5 MiB/19 MiB | Heap:2.5 MiB/7.3 MiB.
_mc: <ERROR> Unable to save new mc config. mkdir /minio/.mc/: file exists.

mc --version

  • (paste output of mc --version)
    _mc version 2.3.0-9 (commit-id=DEVELOPMENT.GOGET)
    Runtime: go1.19.4 linux/amd64
    Copyright (c) 2015-0000 MinIO, Inc.
    License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html

System information

Linux blah-blah SMP Wed Apr 28 10:54:41 UTC 2021 (ba3c2e9) x86_64 x86_64 x86_64 GNU/Linux

@klauspost
Copy link
Contributor

Not bothering to read the issue with this title.

@klauspost klauspost closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2023
@minio minio locked as resolved and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants