-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
New "maint" command #625
New "maint" command #625
Conversation
@@ -1039,12 +1039,17 @@ func (a *Agent) EnableServiceMaintenance(serviceID string) error { | |||
return nil | |||
} | |||
|
|||
// Use default notes if no reason provided | |||
if reason == "" { | |||
reason = "Maintenance mode is enabled for this service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this a constant like DefaultReason
? I also think we should have some text like "no reason provided" somewhere in there, maybe in parenthesis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on the constant. Also a recommendation to make this a bit more verbose and add verbiage such as: "No specific reason was provided. This is a default message."
Added "list mode" to the |
LGTM! 🚢 |
This introduces the
consul maint
command, which utilizes the new service/node maintenance mode API's to enable or disable maintenance mode from the CLI. This will make it easy to do something along the lines ofAs part of this, I've also added the
reason
argument and associated API query parameters. This allows passing a reason for entering maintenance mode. If none is provided, a default is used.