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

Get Snapshot API: Listing all snapshots across all repositories does not work #75997

Closed
spinscale opened this issue Aug 3, 2021 · 4 comments · Fixed by #76036
Closed

Get Snapshot API: Listing all snapshots across all repositories does not work #75997

spinscale opened this issue Aug 3, 2021 · 4 comments · Fixed by #76036
Assignees
Labels
>bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team v7.13.4

Comments

@spinscale
Copy link
Contributor

Elasticsearch version (bin/elasticsearch --version): 7.13.4

Description of the problem including expected versus actual behavior:

The documentation for the GET Snapshot API states for its path parameters:

GET /_snapshot/<repository>/<snapshot>

<repository>
(Required, string) Snapshot repository name used to limit the request.

To get information about all snapshot repositories registered in the cluster, omit this parameter or use * or _all.

<snapshot>
(Required, string) Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*).

To get information about all snapshots in a registered repository, use a wildcard (*) or _all.

However trying to retrieve all snapshots from all repositories does not work.

Steps to reproduce:

GET _snapshot/_all/_all

returns

{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_missing_exception",
        "reason" : "[_all] missing"
      }
    ],
    "type" : "repository_missing_exception",
    "reason" : "[_all] missing"
  },
  "status" : 404
}

Either this is a bug, or maybe the documentation needs to state that this is not supported.

@spinscale spinscale added >bug needs:triage Requires assignment of a team area label labels Aug 3, 2021
@DaveCTurner DaveCTurner added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs and removed needs:triage Requires assignment of a team area label labels Aug 3, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Aug 3, 2021
@DaveCTurner DaveCTurner self-assigned this Aug 3, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner
Copy link
Contributor

TLDR this is a docs bug, you can only get from multiple repositories in ≥7.14.0, we shouldn't have backported this info to the docs for earlier versions.

Bit of a tricky one to disentangle however, we first introduced multi-repo support in master (#42090) but it was a breaking change to the response format so couldn't be backported to 7.x. But then we changed our minds about the new response format and adjusted master to keep using the old format (with slight tweaks). And then we backported a bunch of stuff in #74676 which included the multi-repo support.

The docs backport was #59238, looks like this went all the way back to 7.9.

lockewritesdocs pushed a commit that referenced this issue Aug 3, 2021
Removes the `_all` option for the `<snapshot>` parameter of the get snapshot API. The `_all` option is supported only for the `<repository>` parameter in 7.13.

Closes #75997
@lockewritesdocs lockewritesdocs linked a pull request Aug 3, 2021 that will close this issue
@jrodewig jrodewig added the >docs General docs changes label Aug 3, 2021
@elasticmachine elasticmachine added the Team:Docs Meta label for docs team label Aug 3, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@lockewritesdocs
Copy link
Contributor

Closed by #76036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team v7.13.4
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants