hashicorp / hashicorp/consul

CLI: consul operator autopilot set-config -disable-upgrade-migration false not working

Open
#19,266 3 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Overview of the Issue

After `disable-upgrade-migration ` is set to true, it can't be reset to false using the format of `-disable-upgrade-migration false`. Although `-disable-upgrade-migration=false` works, this inconsistency in the CLI will confuse the users.

Further, there might be more cli sub-command with boolean argument have this issue.

---

#### Reproduction Steps

Steps to reproduce this issue

1) start a single server agent,
2) `consul operator autopilot set-config -disable-upgrade-migration true` ,
3) `consul operator autopilot get-config` to verify disable-upgrade-migration is true,
4) `consul operator autopilot set-config -disable-upgrade-migration false` to set it back to false
5) `consul operator autopilot get-config` is still true and auto migration won't happen

### Consul info for both Client and Server

- Consul 1.16.2+ent
- Consul 1.17.0-rc1+ent

Contributor guide

Open the contributing guide

Research direction

Start with the `consul operator autopilot set-config` CLI entry point and reproduce the behavior using the documented true, false, and `=false` forms. Check how boolean arguments are parsed, then use `consul operator autopilot get-config` to verify that the false form resets `disable-upgrade-migration` and that related boolean subcommands are not regressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.