diff --git a/Gopkg.lock b/Gopkg.lock index d156510b7aa..f12b3fab1d9 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -266,7 +266,7 @@ "pkg/metapb", "pkg/pdpb" ] - revision = "7f09068ced84187574699b956cf09530b54884c2" + revision = "5e6e69a5ed381bd4a8afe7cb96cc47f955f6d160" [[projects]] name = "github.com/prometheus/client_golang" @@ -500,6 +500,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "2bf7150e00a5771891754cdf0f5384ded938c1e9cefe9bc8f4822232aac736c9" + inputs-digest = "ac20fc02c52f46bfadc23c464c1e9377e5a00e60fd6be6255f58a8e240360b2d" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 870e03a4cb1..a60ac716d7e 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -27,4 +27,3 @@ [[constraint]] name = "github.com/pingcap/kvproto" branch = "master" - diff --git a/pdctl/command/config_command.go b/pdctl/command/config_command.go index 37a0852dadf..0104acda3e4 100644 --- a/pdctl/command/config_command.go +++ b/pdctl/command/config_command.go @@ -25,11 +25,12 @@ import ( ) var ( - configPrefix = "pd/api/v1/config" - schedulePrefix = "pd/api/v1/config/schedule" - replicationPrefix = "pd/api/v1/config/replicate" - namespacePrefix = "pd/api/v1/config/namespace" - labelPropertyPrefix = "pd/api/v1/config/label-property" + configPrefix = "pd/api/v1/config" + schedulePrefix = "pd/api/v1/config/schedule" + replicationPrefix = "pd/api/v1/config/replicate" + namespacePrefix = "pd/api/v1/config/namespace" + labelPropertyPrefix = "pd/api/v1/config/label-property" + clusterVersionPrefix = "pd/api/v1/config/cluster-version" ) // NewConfigCommand return a config subcommand of rootCmd @@ -55,6 +56,7 @@ func NewShowConfigCommand() *cobra.Command { sc.AddCommand(NewShowNamespaceConfigCommand()) sc.AddCommand(NewShowReplicationConfigCommand()) sc.AddCommand(NewShowLabelPropertyCommand()) + sc.AddCommand(NewShowClusterVersionCommand()) return sc } @@ -98,15 +100,26 @@ func NewShowLabelPropertyCommand() *cobra.Command { return sc } +// NewShowClusterVersionCommand returns a cluster version subcommand of show subcommand. +func NewShowClusterVersionCommand() *cobra.Command { + sc := &cobra.Command{ + Use: "cluster-version", + Short: "show the cluster version", + Run: showClusterVersionCommandFunc, + } + return sc +} + // NewSetConfigCommand return a set subcommand of configCmd func NewSetConfigCommand() *cobra.Command { sc := &cobra.Command{ - Use: "set