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

This 'admin' API is not supported by server in 'mode-server-fs' #116

Open
Lykos153 opened this issue Jul 24, 2021 · 10 comments
Open

This 'admin' API is not supported by server in 'mode-server-fs' #116

Lykos153 opened this issue Jul 24, 2021 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Lykos153
Copy link

When I try to create a new user using this provider, I get the following error:

│ Error: This 'admin' API is not supported by server in 'mode-server-fs'
│ 
│   with minio_iam_user.testuser,
│   on minio.tf line 29, in resource "minio_iam_user" "testuser":
│   29: resource "minio_iam_user" "testuser" {

I understand that some features are not available when using mode-server-fs. However, I have no problem creating users via the commandline using mc admin user ....

So what am I missing?

@AMKamel
Copy link

AMKamel commented Aug 8, 2021

I encountered the same error using same code

From access log at minio backend

"PUT /minio/admin/v3/add-user?accessKey=test_user HTTP/1.1" 301 178 "-" "MinIO (linux; amd64) madmin-go/0.0.1"
"GET /minio/admin/v3/add-user?accessKey=test_user HTTP/1.1" 426 215 "http://minio.files.com/minio/admin/v3/add-user?accessKey=test_user" "MinIO (linux; amd64) madmin-go/0.0.1"

I am not sure but I think it's related to using an old madmin-go/0.0.1, current version is >1.x @felladrin

@BuJo
Copy link
Collaborator

BuJo commented Jan 28, 2022

Heya @Lykos153 or @AMKamel could you retest it in that mode? The 1.3.0 release might have fixed your problem.

@BuJo
Copy link
Collaborator

BuJo commented Feb 18, 2022

As I cannot reproduce this, I'll close the issue for now to keep the ticket load a little lower. If there's more information and it's still a problem with the current code, don't hesitate to open a new issue referencing this one.

@BuJo BuJo closed this as completed Feb 18, 2022
@pinpox
Copy link

pinpox commented Mar 16, 2022

@BuJo Still running into this issue. I'm using the user example code from this repository.

✦ ×  terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # minio_iam_user.minio_user will be created
  + resource "minio_iam_user" "minio_user" {
      + disable_user  = false
      + force_destroy = false
      + id            = (known after apply)
      + name          = "minio_user_tf"
      + secret        = (sensitive value)
      + status        = (known after apply)
      + update_secret = false
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + minio_user_status = (known after apply)
  + user_minio_user   = (known after apply)

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

minio_iam_user.minio_user: Creating...
╷
│ Error: [FATAL] Error creating user (minio_user_tf): This 'admin' API is not supported by server in 'mode-server-fs'
│
│   with minio_iam_user.minio_user,
│   on user.tf line 1, in resource "minio_iam_user" "minio_user":
│    1: resource "minio_iam_user" "minio_user" {

@BuJo
Copy link
Collaborator

BuJo commented Mar 21, 2022

Allright, since it can be reproduced with the new release, let's reopen this. Thanks for reporting!

@BuJo BuJo reopened this Mar 21, 2022
@BuJo
Copy link
Collaborator

BuJo commented Mar 21, 2022

I investigated. According to minio/console#863 and related issues, this is seems to be simply something that the server cannot do when running in this mode. And the terraform adapter cannot provide a workaround for missing server functionality.

Is there something other than the already present error message we could do to help users tripping up on that @pinpox @Lykos153 or @AMKamel ?

@AMKamel
Copy link

AMKamel commented Mar 21, 2022

I investigated. According to minio/console#863 and related issues, this is seems to be simply something that the server cannot do when running in this mode. And the terraform adapter cannot provide a workaround for missing server functionality.

Is there something other than the already present error message we could do to help users tripping up on that @pinpox @Lykos153 or @AMKamel ?

I couldn't find anyway to workaround this but using minio/mc cli client to do this, and I have to do that using pulumi as they have something like command provider which is somehow mimicing null provisioners in terraform. minio provider at pulumi is suffering from the same issue as it's bridged from minio terraform provider.

Only creating bucket is possible using either terraform or minio provider, you can't creates users, policies at all when using minio fs-mode

@BuJo
Copy link
Collaborator

BuJo commented Mar 21, 2022

@AMKamel Could you write up how you're using the mc cli in detail to add users in fs-mode?

I mean, if the server tells the client that it is unwilling to perform, the client shouldn't be able to do this. But, the mc could be doing something behind the servers back, so I could investigate that further if I know which "path" to take.

@AMKamel
Copy link

AMKamel commented Mar 21, 2022

@AMKamel Could you write up how you're using the mc cli in detail to add users in fs-mode?

I mean, if the server tells the client that it is unwilling to perform, the client shouldn't be able to do this. But, the mc could be doing something behind the servers back, so I could investigate that further if I know which "path" to take.

I am using it like this

        create: pulumi.interpolate`mc admin user add --json ${minioAliasName} ${args.userName} ${args.userPassword}`,
        delete: pulumi.interpolate`mc admin user remove --json ${minioAliasName} ${args.userName}`,
        create: pulumi.interpolate`mc admin policy set --json ${minioAliasName} ${args.policyName} user=${this.userName}`,
        delete: pulumi.interpolate`mc admin policy unset --json ${minioAliasName} ${args.policyName} user=${this.userName}`,
        create: pulumi.interpolate`mc admin policy add --json ${minioAliasName} ${args.policyName} ${policyFilePath}`,
        delete: pulumi.interpolate`mc admin policy remove --json ${minioAliasName} ${args.policyName}`,
        create: pulumi.interpolate`mc policy set-json ${policyFilePath} ${minioAliasName}/${args.bucketName}`,
        delete: pulumi.interpolate`mc policy set none ${minioAliasName}/${args.bucketName}`,

@kpchen
Copy link

kpchen commented Aug 2, 2022

any updates please? I got the same issue with VERSION2020-12-23T02:24:12Z

@BuJo BuJo added enhancement New feature or request help wanted Extra attention is needed labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants