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

Autopilot: PUT to /v1/operator/autopilot/configuration sets unspecified params to zero/false #10558

Closed
watsonian opened this issue Jul 6, 2021 · 1 comment · Fixed by #10559
Labels
theme/api Relating to the HTTP API interface type/bug Feature does not function as expected

Comments

@watsonian
Copy link
Contributor

Overview of the Issue

If you attempt to update a single field of the autopilot configuration via a PUT to /v1/operator/autopilot/configuration, this results in all unspecified fields being set to zero/false rather than the default values.

Reproduction Steps

$ consul operator autopilot get-config
CleanupDeadServers = true
LastContactThreshold = 200ms
MaxTrailingLogs = 250
MinQuorum = 0
ServerStabilizationTime = 10s
RedundancyZoneTag = ""
DisableUpgradeMigration = false
UpgradeVersionTag = ""

$ curl -XPUT localhost:8500/v1/operator/autopilot/configuration -d '{"DisableUpgradeMigration":true}'
true

$ consul operator autopilot get-config
CleanupDeadServers = false
LastContactThreshold = 0s
MaxTrailingLogs = 0
MinQuorum = 0
ServerStabilizationTime = 0s
RedundancyZoneTag = ""
DisableUpgradeMigration = true
UpgradeVersionTag = ""

Consul info for both Client and Server

This has been tested in fresh 1.6.9, 1.8.10, 1.9.7, and 1.10.0 versions.

@watsonian watsonian added type/bug Feature does not function as expected theme/api Relating to the HTTP API interface labels Jul 6, 2021
@blake blake linked a pull request Jul 6, 2021 that will close this issue
@jkirschner-hashicorp
Copy link
Contributor

Closed as of e517e74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api Relating to the HTTP API interface type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants