summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2022-09-12 13:10:12 +0000
committerArne Juul <arnej@yahooinc.com>2022-09-12 13:10:12 +0000
commitca7e21478b731b632f107fb6abc6f6afdc33efa8 (patch)
treecb327cbdb0f0a75217e0a0c0fcf5c15974500e7c
parent76acc0b8688ebeba600f4606bdbb6f8b6c4b2cfe (diff)
minor tweaks
* add missing --force option * ensure output includes "OK" as before on success
-rw-r--r--client/go/cmd/clusterstate/set_node_state.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/go/cmd/clusterstate/set_node_state.go b/client/go/cmd/clusterstate/set_node_state.go
index a3545dd478b..04e06ff1daf 100644
--- a/client/go/cmd/clusterstate/set_node_state.go
+++ b/client/go/cmd/clusterstate/set_node_state.go
@@ -54,6 +54,8 @@ func NewSetNodeStateCmd() *cobra.Command {
},
}
addCommonOptions(cmd, &curOptions)
+ cmd.Flags().BoolVarP(&curOptions.Force, "force", "f", false,
+ "Force execution")
cmd.Flags().BoolVarP(&curOptions.NoWait, "no-wait", "n", false,
"Do not wait for node state changes to be visible in the cluster before returning.")
cmd.Flags().BoolVarP(&curOptions.SafeMode, "safe", "a", false,
@@ -142,7 +144,9 @@ func (cc *ClusterControllerSpec) setNodeUserState(s serviceSpec, wanted KnownSta
resCode, output := splitResultCode(result)
if resCode < 200 || resCode >= 300 {
fmt.Println(color.HiYellowString("failed with HTTP code %d", resCode))
+ fmt.Println(output)
+ } else {
+ fmt.Print(output, "OK\n")
}
- fmt.Println(output)
return err
}