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

Improve consul secrets plugin error for failed bootstrap #20891

Merged
merged 2 commits into from
May 31, 2023

Conversation

tomhjp
Copy link
Contributor

@tomhjp tomhjp commented May 31, 2023

When returning a logical error, we need to include all of the information the user should see within the response. As seen in #18705, there is currently no indication of why the bootstrapping failed when it does.

Before:

$ vault write consul/config/access \
    address="https://127.0.0.1:8500"
Error writing data to consul/config/access: Error making API request.

URL: PUT http:https://127.0.0.1:8200/v1/consul/config/access
Code: 400. Errors:

* Token not provided and failed to bootstrap ACLs

After:

$ vault write consul/config/access \
    address="https://127.0.0.1:8500"
Error writing data to consul/config/access: Error making API request.

URL: PUT http:https://127.0.0.1:8200/v1/consul/config/access
Code: 400. Errors:

* Token not provided and failed to bootstrap ACLs: Put "https://127.0.0.1:8500/v1/acl/bootstrap": http: server gave HTTP response to HTTPS client

@tomhjp tomhjp added this to the 1.14 milestone May 31, 2023
@tomhjp tomhjp requested a review from a team May 31, 2023 13:04
@tomhjp tomhjp linked an issue May 31, 2023 that may be closed by this pull request
@tomhjp tomhjp merged commit 657ee31 into main May 31, 2023
102 checks passed
@tomhjp tomhjp deleted the 18705-consul-bootstrap-error branch May 31, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consul ACL bootstrap error
2 participants