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

Expose error when checking if alias exists #12886

Merged
merged 2 commits into from
Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add additional nil pointer checks to Docker client code to deal with vSphere Integrated Containers {pull}12628[12628]
- Fixed `json.add_error_key` property setting for delivering error messages from beat events {pull}11298[11298]
- Fix Central Management enroll under Windows {issue}12797[12797] {pull}12799[12799]
- ILM: Use GET instead of HEAD when checking for alias to expose detailed error message. {pull}12886[12886]

*Auditbeat*

Expand Down
2 changes: 1 addition & 1 deletion libbeat/idxmgmt/ilm/client_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (h *ESClientHandler) HasILMPolicy(name string) (bool, error) {
// HasAlias queries Elasticsearch to see if alias exists.
func (h *ESClientHandler) HasAlias(name string) (bool, error) {
path := path.Join(esAliasPath, name)
status, b, err := h.client.Request("HEAD", path, "", nil, nil)
status, b, err := h.client.Request("GET", path, "", nil, nil)
if err != nil && status != 404 {
return false, wrapErrf(err, ErrRequestFailed,
"failed to check for alias '%v': (status=%v) %s", name, status, b)
Expand Down