Skip to content

Inspect API #1540

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

Merged
merged 8 commits into from
Feb 16, 2022
Merged

Inspect API #1540

merged 8 commits into from
Feb 16, 2022

Conversation

prakashsvmx
Copy link
Member

@prakashsvmx prakashsvmx commented Feb 10, 2022

Inspect API ( mc admin inspect [--encrypt] <alias> <path> )

Steps to Test:

  • With Encryption flag
    • .enc file will be generated along with a decryption key
    • use inspect tool and enter the decryption key to get the .zip file
    • use xl-meta tool to verify the contents of .zip file
  • Without Encryption flag
    • use xl-meta tool to verify the contents of .zip file.

API URL : /api/v1/admin/inspect?file=test.txt%2Fxl.meta&volume=test-bucket&encrypt=true

Fixes https://github.com/miniohq/engineering/issues/479

@dvaldivia
Copy link
Collaborator

When I reach an invalid path (invalid bucket or objects) , I get status response 200 instead of 404

@harshavardhana
Copy link
Member

harshavardhana commented Feb 10, 2022

When I reach an invalid path (invalid bucket or objects) , I get status response 200 instead of 404

The API is not designed to get 404 it's expected to see failures since it's a "debugging" API - Do not think of it like S3 API as it is allowed to download any path any file in its RAW form.

Like you can download

  • alias/.minio.sys/format.json
  • alias/.minio.sys/** (recursively download all .minio.sys data from all nodes all drives)
  • alias/bucket/path/** (recursively download all xl.meta, part.1 data from all nodes all drives)
  • alias/bucket/path/object/* (just download files at the path - non-recursive but all files at this path)
  • alias/bucket/path/object//part.1 (download just part.1 for a specific object data-dir at uuid)

The response is a Zip stream, so failures are allowed and normal.

@harshavardhana
Copy link
Member

The UI should be designed to support these requirements

dvaldivia
dvaldivia previously approved these changes Feb 11, 2022
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dvaldivia dvaldivia merged commit 951d3bf into minio:master Feb 16, 2022
@prakashsvmx prakashsvmx mentioned this pull request Mar 16, 2022
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

Successfully merging this pull request may close these issues.

4 participants