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 is not ready even after StartAndWaitReady completes #11

Closed
matej-g opened this issue Aug 27, 2021 · 3 comments · Fixed by #58
Closed

Minio is not ready even after StartAndWaitReady completes #11

matej-g opened this issue Aug 27, 2021 · 3 comments · Fixed by #58
Labels
bug Something isn't working

Comments

@matej-g
Copy link
Collaborator

matej-g commented Aug 27, 2021

Issue description

Trying to start Minio on the latest version of main, the server is not ready to handle requests, despite StartAndWaitReady being ran successfully already. Any immediate requests afterwards result in error response Server not initialized, please try again.

I suspect this could be an issue with the readiness probe upstream, since when setting up the same scenario with code version from before Minio image update in #4, everything is working correctly. However, I haven't confirmed the exact cause yet.

Minimal setup to reproduce

Run this test:

import (
	"context"
	"io/ioutil"
	"testing"

	"github.com/efficientgo/e2e"
        e2edb "github.com/efficientgo/e2e/db"
	"github.com/efficientgo/tools/core/pkg/testutil"
	"github.com/minio/minio-go/v7"
	"github.com/minio/minio-go/v7/pkg/credentials"
)

func TestMinio(t *testing.T) {
	e, err := e2e.NewDockerEnvironment("minio_test", e2e.WithVerbose())
	testutil.Ok(t, err)
	t.Cleanup(e.Close)

	const bucket = "minoiotest"
	m := e2edb.NewMinio(e, "minio", bucket)
	testutil.Ok(t, e2e.StartAndWaitReady(m))

	mc, err := minio.New(m.Endpoint("http"), &minio.Options{
		Creds: credentials.NewStaticV4(e2edb.MinioAccessKey, e2edb.MinioSecretKey, ""),
	})
	testutil.Ok(t, err)
	testutil.Ok(t, ioutil.WriteFile("test.txt", []byte("just a test"), 0755))

	_, err = mc.FPutObject(context.Background(), bucket, "obj", "./test.txt", minio.PutObjectOptions{})
	testutil.Ok(t, err)
}
@bwplotka
Copy link
Contributor

Yes, I seen that, let's fix it. 👍🏽

@bwplotka bwplotka added the bug Something isn't working label Aug 28, 2021
@bwplotka
Copy link
Contributor

Waiting until we can get buckets would do the work potentially. Issue on it's buggy readiness endpoint would be helpful too

@douglascamata
Copy link
Contributor

After all this time, it seems like the fix I applied to thanos-io/thanos#5615 worked well. I think we can now bring it upstream (here) and follow up with some cleanup in Thanos. 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants