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

MinioAdmin.policy_add() triggers an mc deprecation error #1293

Closed
ctengel opened this issue Aug 13, 2023 · 4 comments
Closed

MinioAdmin.policy_add() triggers an mc deprecation error #1293

ctengel opened this issue Aug 13, 2023 · 4 comments

Comments

@ctengel
Copy link

ctengel commented Aug 13, 2023

Upon calling

minio.MinioAdmin().policy_add()

The following error is returned:
subprocess.CalledProcessError: Command '['/home/minio/mc', '--json', 'admin', 'policy', 'add', 'alias', 'policy', 'policy.json']' returned non-zero exit status 1.

Upon closer investigation, it appears that mc admin policy add is being run, and on recent versions of mc, the following error is returned from that
mc: <ERROR> Deprecated command. Please use 'mc admin policy create' instead.

minio-py version 7.1.5 ; mc version RELEASE.2023-08-08T17-23-59Z

Assuming this was a recent change to mc, I am guessing minio-py`s minioadmin.py needs to be slightly changed to accommodate this.

@ctengel
Copy link
Author

ctengel commented Aug 13, 2023

See minio/mc#4428 and minio/mc#4498

@balamurugana
Copy link
Member

Feel free to send a PR

@ctengel
Copy link
Author

ctengel commented Aug 14, 2023

Good news - looks like it has already been fixed by #1277

Perhaps a new release is in order so that way those who are installing this via pip etc can benefit from the fix?

@balamurugana
Copy link
Member

Stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants