diff --git a/.github/workflows/integrate-cluster-cmd.yaml b/.github/workflows/integrate-cluster-cmd.yaml index f9c5839ba2..79b6416885 100644 --- a/.github/workflows/integrate-cluster-cmd.yaml +++ b/.github/workflows/integrate-cluster-cmd.yaml @@ -84,20 +84,24 @@ jobs: - name: Collect component log working-directory: ${{ env.working-directory }} - if: ${{ failure() }} # if: always() run: | docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs ls ${{ env.working-directory }} - tar czvf ${{ env.working-directory }}/logs.tar.gz ${{ env.working-directory }}/logs/ + + - name: Detect error log + working-directory: ${{ env.working-directory }} + # if: always() + run: | + bash ./tests/tiup-cluster/script/detect_error.sh ./logs/ - name: Upload component log if: ${{ failure() }} # if: always() - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: component_logs - path: ${{ env.working-directory }}/logs.tar.gz + path: ${{ env.working-directory }}/logs/ - name: Output cluster debug log working-directory: ${{ env.working-directory }} diff --git a/.github/workflows/integrate-cluster-scale.yaml b/.github/workflows/integrate-cluster-scale.yaml index 3b4c3b89ba..adbdca509a 100644 --- a/.github/workflows/integrate-cluster-scale.yaml +++ b/.github/workflows/integrate-cluster-scale.yaml @@ -84,20 +84,24 @@ jobs: - name: Collect component log working-directory: ${{ env.working-directory }} - if: ${{ failure() }} # if: always() run: | docker exec tiup-cluster-control bash /tiup-cluster/tests/tiup-cluster/script/pull_log.sh /tiup-cluster/logs ls ${{ env.working-directory }} - tar czvf ${{ env.working-directory }}/logs.tar.gz ${{ env.working-directory }}/logs/ + + - name: Detect error log + working-directory: ${{ env.working-directory }} + # if: always() + run: | + bash ./tests/tiup-cluster/script/detect_error.sh ./logs/ - name: Upload component log if: ${{ failure() }} # if: always() - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: cluster_logs - path: ${{ env.working-directory }}/logs.tar.gz + path: ${{ env.working-directory }}/logs/ - name: Output cluster debug log working-directory: ${{ env.working-directory }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d8539908ff..f66306b23f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,27 @@ TiUP Changelog +## [1.9.6] 2022-05-20 + +### Fix + +- Fix incorrect output of `display` in certain circumstances for `tiup-cluster` ([#1889](https://github.com/pingcap/tiup/pull/1889), [@srstack](https://github.com/srstack)) + +## [1.9.5] 2022-05-10 + +### Fixes + +- Fix `prune` incorrectly destroy pump/drainer node before they become `Tombstone` in `tiup-cluster` ([#1851](https://github.com/pingcap/tiup/pull/1851), [@srstack](https://github.com/srstack)) +- Report error when multiple pump nodes with the same `ip:port` found in `tiup-cluster` ([#1856](https://github.com/pingcap/tiup/pull/1856), [@srstack](https://github.com/srstack)) +- Get node status of pump/drainer from PD in `tiup-cluster` ([#1862](https://github.com/pingcap/tiup/pull/1862), [@srstack](https://github.com/srstack)) + +### Improvements + +- Check node status concurrently and support custom timeout for `display` in `tiup-cluster` ([#1867](https://github.com/pingcap/tiup/pull/1867), [@srstack](https://github.com/srstack)) +- Support `tidb-lightning` in `tiup-ctl` ([#1863](https://github.com/pingcap/tiup/pull/1863), [@nexustar](https://github.com/nexustar)) + ## [1.9.4] 2022-04-12 -## Fixes +### Fixes - Fix copy error when file is read only in `tiup-playground` ([#1816](https://github.com/pingcap/tiup/pull/1816), [@breeswish](https://github.com/breeswish)) - Fix `data-dir` not properly handled for TiCDC v6.0.0 in `tiup-cluster` ([#1838](https://github.com/pingcap/tiup/pull/1838), [@overvenus](https://github.com/overvenus)) diff --git a/cmd/root.go b/cmd/root.go index e9422ced8a..abd7edfd52 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -142,17 +142,25 @@ the latest stable version will be downloaded from the repository.`, return nil case "--binpath": if len(args) < 2 { - return fmt.Errorf("flag needs an argument: %s", args[0]) + return fmt.Errorf("flag %s needs an argument", args[0]) } binPath = args[1] args = args[2:] case "--tag", "-T": if len(args) < 2 { - return fmt.Errorf("flag needs an argument: %s", args[0]) + return fmt.Errorf("flag %s needs an argument", args[0]) } tag = args[1] args = args[2:] } + + // component may use tag from environment variable. as workaround, make tiup set the same tag + for i := 0; i < len(args)-1; i++ { + if args[i] == "--tag" || args[i] == "-T" { + tag = args[i+1] + } + } + if len(args) < 1 { return cmd.Help() } diff --git a/components/cluster/command/clean.go b/components/cluster/command/clean.go index e455f64a72..044866bccb 100644 --- a/components/cluster/command/clean.go +++ b/components/cluster/command/clean.go @@ -57,6 +57,14 @@ You can retain some nodes and roles data when cleanup the cluster, eg: return cm.CleanCluster(clusterName, gOpt, cleanOpt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringArrayVar(&cleanOpt.RetainDataNodes, "ignore-node", nil, "Specify the nodes or hosts whose data will be retained") diff --git a/components/cluster/command/deploy.go b/components/cluster/command/deploy.go index 77c4ca04eb..78caab41e4 100644 --- a/components/cluster/command/deploy.go +++ b/components/cluster/command/deploy.go @@ -67,6 +67,14 @@ func newDeploy() *cobra.Command { return cm.Deploy(clusterName, version, topoFile, opt, postDeployHook, skipConfirm, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 2: + return nil, cobra.ShellCompDirectiveDefault + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVarP(&opt.User, "user", "u", utils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") diff --git a/components/cluster/command/destroy.go b/components/cluster/command/destroy.go index 4325c607a5..d8d6e7a2dd 100644 --- a/components/cluster/command/destroy.go +++ b/components/cluster/command/destroy.go @@ -53,6 +53,14 @@ You can retain some nodes and roles data when destroy cluster, eg: return cm.DestroyCluster(clusterName, gOpt, destroyOpt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringArrayVar(&destroyOpt.RetainDataNodes, "retain-node-data", nil, "Specify the nodes or hosts whose data will be retained") diff --git a/components/cluster/command/disable.go b/components/cluster/command/disable.go index e0cb80972e..2e53c0ace0 100644 --- a/components/cluster/command/disable.go +++ b/components/cluster/command/disable.go @@ -36,6 +36,14 @@ func newDisableCmd() *cobra.Command { return cm.EnableCluster(clusterName, gOpt, false) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only disable specified roles") diff --git a/components/cluster/command/display.go b/components/cluster/command/display.go index 8e43adc3cc..b38b0b9557 100644 --- a/components/cluster/command/display.go +++ b/components/cluster/command/display.go @@ -16,8 +16,11 @@ package command import ( "errors" "fmt" + "strings" + "time" perrs "github.com/pingcap/errors" + "github.com/pingcap/tiup/pkg/cluster/manager" "github.com/pingcap/tiup/pkg/cluster/spec" "github.com/pingcap/tiup/pkg/meta" "github.com/spf13/cobra" @@ -29,6 +32,7 @@ func newDisplayCmd() *cobra.Command { showDashboardOnly bool showVersionOnly bool showTiKVLabels bool + statusTimeout uint64 ) cmd := &cobra.Command{ Use: "display ", @@ -38,6 +42,7 @@ func newDisplayCmd() *cobra.Command { return cmd.Help() } + gOpt.APITimeout = statusTimeout clusterName = args[0] clusterReport.ID = scrubClusterName(clusterName) teleCommand = append(teleCommand, scrubClusterName(clusterName)) @@ -67,13 +72,21 @@ func newDisplayCmd() *cobra.Command { if err != nil { return err } - return cm.DisplayDashboardInfo(clusterName, tlsCfg) + return cm.DisplayDashboardInfo(clusterName, time.Second*time.Duration(gOpt.APITimeout), tlsCfg) } if showTiKVLabels { return cm.DisplayTiKVLabels(clusterName, gOpt) } return cm.Display(clusterName, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only display specified roles") @@ -82,6 +95,18 @@ func newDisplayCmd() *cobra.Command { cmd.Flags().BoolVar(&showDashboardOnly, "dashboard", false, "Only display TiDB Dashboard information") cmd.Flags().BoolVar(&showVersionOnly, "version", false, "Only display TiDB cluster version") cmd.Flags().BoolVar(&showTiKVLabels, "labels", false, "Only display labels of specified TiKV role or nodes") + cmd.Flags().Uint64Var(&statusTimeout, "status-timeout", 10, "Timeout in seconds when getting node status") return cmd } + +func shellCompGetClusterName(cm *manager.Manager, toComplete string) ([]string, cobra.ShellCompDirective) { + var result []string + clusters, _ := cm.GetClusterList() + for _, c := range clusters { + if strings.HasPrefix(c.Name, toComplete) { + result = append(result, c.Name) + } + } + return result, cobra.ShellCompDirectiveNoFileComp +} diff --git a/components/cluster/command/edit_config.go b/components/cluster/command/edit_config.go index 7166a5c53b..a305c53ec4 100644 --- a/components/cluster/command/edit_config.go +++ b/components/cluster/command/edit_config.go @@ -34,6 +34,14 @@ func newEditConfigCmd() *cobra.Command { return cm.EditConfig(clusterName, opt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVarP(&opt.NewTopoFile, "topology-file", "", opt.NewTopoFile, "Use provided topology file to substitute the original one instead of editing it.") diff --git a/components/cluster/command/enable.go b/components/cluster/command/enable.go index 3a38b41092..f5a457c827 100644 --- a/components/cluster/command/enable.go +++ b/components/cluster/command/enable.go @@ -36,6 +36,14 @@ func newEnableCmd() *cobra.Command { return cm.EnableCluster(clusterName, gOpt, true) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only enable specified roles") diff --git a/components/cluster/command/exec.go b/components/cluster/command/exec.go index 17ad5c14c3..01566642c0 100644 --- a/components/cluster/command/exec.go +++ b/components/cluster/command/exec.go @@ -35,6 +35,14 @@ func newExecCmd() *cobra.Command { return cm.Exec(clusterName, opt, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVar(&opt.Command, "command", "ls", "the command run on cluster host") diff --git a/components/cluster/command/prune.go b/components/cluster/command/prune.go index 26b67374be..44f2aeb463 100644 --- a/components/cluster/command/prune.go +++ b/components/cluster/command/prune.go @@ -32,6 +32,14 @@ func newPruneCmd() *cobra.Command { return cm.DestroyTombstone(clusterName, gOpt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().BoolVar(&gOpt.Force, "force", false, "Ignore errors when deleting the instance with data from the cluster") diff --git a/components/cluster/command/reload.go b/components/cluster/command/reload.go index 3c5ea4bdc1..ff2096b5b8 100644 --- a/components/cluster/command/reload.go +++ b/components/cluster/command/reload.go @@ -39,6 +39,14 @@ func newReloadCmd() *cobra.Command { return cm.Reload(clusterName, gOpt, skipRestart, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().BoolVar(&gOpt.Force, "force", false, "Force reload without transferring PD leader and ignore remote error") diff --git a/components/cluster/command/restart.go b/components/cluster/command/restart.go index fb799fbadf..435a0a80da 100644 --- a/components/cluster/command/restart.go +++ b/components/cluster/command/restart.go @@ -36,6 +36,14 @@ func newRestartCmd() *cobra.Command { return cm.RestartCluster(clusterName, gOpt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only restart specified roles") diff --git a/components/cluster/command/scale_in.go b/components/cluster/command/scale_in.go index e976a89b95..441717f1a6 100644 --- a/components/cluster/command/scale_in.go +++ b/components/cluster/command/scale_in.go @@ -50,6 +50,14 @@ func newScaleInCmd() *cobra.Command { return cm.ScaleIn(clusterName, skipConfirm, gOpt, scale) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Nodes, "node", "N", nil, "Specify the nodes (required)") diff --git a/components/cluster/command/scale_out.go b/components/cluster/command/scale_out.go index b25a54fa2c..c7e5b9d4f8 100644 --- a/components/cluster/command/scale_out.go +++ b/components/cluster/command/scale_out.go @@ -76,6 +76,16 @@ func newScaleOutCmd() *cobra.Command { gOpt, ) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + case 1: + return nil, cobra.ShellCompDirectiveDefault + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVarP(&opt.User, "user", "u", utils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") diff --git a/components/cluster/command/show_config.go b/components/cluster/command/show_config.go index 8af796f481..08ca0de21e 100644 --- a/components/cluster/command/show_config.go +++ b/components/cluster/command/show_config.go @@ -32,6 +32,14 @@ func newShowConfigCmd() *cobra.Command { return cm.ShowConfig(clusterName) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } return cmd diff --git a/components/cluster/command/start.go b/components/cluster/command/start.go index 884cf880b1..3863e94945 100644 --- a/components/cluster/command/start.go +++ b/components/cluster/command/start.go @@ -80,6 +80,14 @@ func newStartCmd() *cobra.Command { } return nil }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().BoolVar(&initPasswd, "init", false, "Initialize a secure root password for the database") diff --git a/components/cluster/command/stop.go b/components/cluster/command/stop.go index 6d4fbf36e9..d281a40cd0 100644 --- a/components/cluster/command/stop.go +++ b/components/cluster/command/stop.go @@ -38,6 +38,14 @@ func newStopCmd() *cobra.Command { return cm.StopCluster(clusterName, gOpt, skipConfirm, evictLeader) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only stop specified roles") diff --git a/components/cluster/command/upgrade.go b/components/cluster/command/upgrade.go index a0c829be7f..887ecc8e4e 100644 --- a/components/cluster/command/upgrade.go +++ b/components/cluster/command/upgrade.go @@ -40,6 +40,14 @@ func newUpgradeCmd() *cobra.Command { return cm.Upgrade(clusterName, version, gOpt, skipConfirm, offlineMode) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().BoolVar(&gOpt.Force, "force", false, "Force upgrade without transferring PD leader") cmd.Flags().Uint64Var(&gOpt.APITimeout, "transfer-timeout", 600, "Timeout in seconds when transferring PD and TiKV store leaders") diff --git a/components/ctl/main.go b/components/ctl/main.go index 71719e2544..69fc4da719 100644 --- a/components/ctl/main.go +++ b/components/ctl/main.go @@ -27,7 +27,7 @@ func execute() error { return errors.New("component `ctl` cannot run in standalone mode") } rootCmd := &cobra.Command{ - Use: "tiup ctl {tidb/pd/tikv/binlog/etcd/cdc}", + Use: "tiup ctl {tidb/pd/tikv/binlog/etcd/cdc/tidb-lightning}", Short: "TiDB controllers", SilenceUsage: true, FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true}, @@ -89,14 +89,14 @@ func execute() error { func binaryPath(home, cmd string) (string, error) { switch cmd { - case "tidb", "tikv", "pd": + case "tidb", "tikv", "pd", "tidb-lightning": return path.Join(home, cmd+"-ctl"), nil case "binlog", "etcd": return path.Join(home, cmd+"ctl"), nil case "cdc": return path.Join(home, cmd+" cli"), nil default: - return "", errors.New("ctl only supports tidb, tikv, pd, binlog, etcd and cdc currently") + return "", errors.New("ctl only supports tidb, tikv, pd, binlog, tidb-lightning, etcd and cdc currently") } } diff --git a/components/dm/command/deploy.go b/components/dm/command/deploy.go index 4e7a165c38..7f7fc18110 100644 --- a/components/dm/command/deploy.go +++ b/components/dm/command/deploy.go @@ -22,10 +22,10 @@ import ( operator "github.com/pingcap/tiup/pkg/cluster/operation" "github.com/pingcap/tiup/pkg/cluster/spec" "github.com/pingcap/tiup/pkg/cluster/task" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/tui" "github.com/pingcap/tiup/pkg/utils" "github.com/spf13/cobra" - "golang.org/x/mod/semver" ) func newDeployCmd() *cobra.Command { @@ -59,6 +59,14 @@ func newDeployCmd() *cobra.Command { return cm.Deploy(clusterName, version, topoFile, opt, postDeployHook, skipConfirm, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 2: + return nil, cobra.ShellCompDirectiveDefault + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVarP(&opt.User, "user", "u", utils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") @@ -69,12 +77,7 @@ func newDeployCmd() *cobra.Command { } func supportVersion(vs string) error { - if !semver.IsValid(vs) { - return nil - } - - majorMinor := semver.MajorMinor(vs) - if semver.Compare(majorMinor, "v2.0") < 0 { + if !tidbver.DMSupportDeploy(vs) { return errors.Errorf("Only support version not less than v2.0") } diff --git a/components/dm/command/deploy_test.go b/components/dm/command/deploy_test.go index 82399c9fab..502bdd4621 100644 --- a/components/dm/command/deploy_test.go +++ b/components/dm/command/deploy_test.go @@ -10,12 +10,10 @@ func TestSupportVersion(t *testing.T) { assert := require.New(t) tests := map[string]bool{ // version to support or not - "v2.0.0": true, - "v3.0.0": true, - "v2.0.0-beta.1": true, - "v2.0.0-alpha": true, - "v1.0.1": false, - "v1.1.1": false, + "v2.0.0": true, + "v6.0.0": true, + "v1.0.1": false, + "v1.1.1": false, } for v, support := range tests { diff --git a/components/dm/command/destroy.go b/components/dm/command/destroy.go index 9f0cfd9a80..1b243f3ac7 100644 --- a/components/dm/command/destroy.go +++ b/components/dm/command/destroy.go @@ -45,6 +45,14 @@ func newDestroyCmd() *cobra.Command { return cm.DestroyCluster(clusterName, gOpt, destroyOpt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringArrayVar(&destroyOpt.RetainDataNodes, "retain-node-data", nil, "Specify the nodes or hosts whose data will be retained") diff --git a/components/dm/command/disable.go b/components/dm/command/disable.go index 3251c74646..28739f2fa8 100644 --- a/components/dm/command/disable.go +++ b/components/dm/command/disable.go @@ -34,6 +34,14 @@ func newDisableCmd() *cobra.Command { return cm.EnableCluster(clusterName, gOpt, false) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only disable specified roles") diff --git a/components/dm/command/display.go b/components/dm/command/display.go index 670e6e4f43..492de9276c 100644 --- a/components/dm/command/display.go +++ b/components/dm/command/display.go @@ -16,8 +16,10 @@ package command import ( "errors" "fmt" + "strings" perrs "github.com/pingcap/errors" + "github.com/pingcap/tiup/pkg/cluster/manager" "github.com/pingcap/tiup/pkg/cluster/spec" "github.com/pingcap/tiup/pkg/meta" "github.com/spf13/cobra" @@ -27,6 +29,7 @@ func newDisplayCmd() *cobra.Command { var ( clusterName string showVersionOnly bool + statusTimeout uint64 ) cmd := &cobra.Command{ Use: "display ", @@ -36,6 +39,7 @@ func newDisplayCmd() *cobra.Command { return cmd.Help() } + gOpt.APITimeout = statusTimeout clusterName = args[0] if showVersionOnly { @@ -49,12 +53,32 @@ func newDisplayCmd() *cobra.Command { return cm.Display(clusterName, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only display specified roles") cmd.Flags().StringSliceVarP(&gOpt.Nodes, "node", "N", nil, "Only display specified nodes") cmd.Flags().BoolVar(&showVersionOnly, "version", false, "Only display DM cluster version") cmd.Flags().BoolVar(&gOpt.ShowUptime, "uptime", false, "Display DM with uptime") + cmd.Flags().Uint64Var(&statusTimeout, "status-timeout", 10, "Timeout in seconds when getting node status") return cmd } + +func shellCompGetClusterName(cm *manager.Manager, toComplete string) ([]string, cobra.ShellCompDirective) { + var result []string + clusters, _ := cm.GetClusterList() + for _, c := range clusters { + if strings.HasPrefix(c.Name, toComplete) { + result = append(result, c.Name) + } + } + return result, cobra.ShellCompDirectiveNoFileComp +} diff --git a/components/dm/command/edit_config.go b/components/dm/command/edit_config.go index 05c2704f8b..e20b531128 100644 --- a/components/dm/command/edit_config.go +++ b/components/dm/command/edit_config.go @@ -32,6 +32,14 @@ func newEditConfigCmd() *cobra.Command { return cm.EditConfig(clusterName, opt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVarP(&opt.NewTopoFile, "topology-file", "", opt.NewTopoFile, "Use provided topology file to substitute the original one instead of editing it.") diff --git a/components/dm/command/enable.go b/components/dm/command/enable.go index 0a4ec5fe78..be2bd71812 100644 --- a/components/dm/command/enable.go +++ b/components/dm/command/enable.go @@ -34,6 +34,14 @@ func newEnableCmd() *cobra.Command { return cm.EnableCluster(clusterName, gOpt, true) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only enable specified roles") diff --git a/components/dm/command/exec.go b/components/dm/command/exec.go index e800ca1707..20161fb7d5 100644 --- a/components/dm/command/exec.go +++ b/components/dm/command/exec.go @@ -33,6 +33,14 @@ func newExecCmd() *cobra.Command { return cm.Exec(clusterName, opt, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVar(&opt.Command, "command", "ls", "the command run on cluster host") diff --git a/components/dm/command/prune.go b/components/dm/command/prune.go index 659ef246cd..c6bb13b97d 100644 --- a/components/dm/command/prune.go +++ b/components/dm/command/prune.go @@ -44,6 +44,14 @@ func newPruneCmd() *cobra.Command { return clearOutDatedEtcdInfo(clusterName, metadata, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } return cmd diff --git a/components/dm/command/reload.go b/components/dm/command/reload.go index ee77af7ee5..d4ba206316 100644 --- a/components/dm/command/reload.go +++ b/components/dm/command/reload.go @@ -37,6 +37,14 @@ func newReloadCmd() *cobra.Command { return cm.Reload(clusterName, gOpt, skipRestart, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only reload specified roles") diff --git a/components/dm/command/restart.go b/components/dm/command/restart.go index fc9e08e2d6..4dfdbbdefa 100644 --- a/components/dm/command/restart.go +++ b/components/dm/command/restart.go @@ -30,6 +30,14 @@ func newRestartCmd() *cobra.Command { return cm.RestartCluster(clusterName, gOpt, skipConfirm) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only restart specified roles") diff --git a/components/dm/command/scale_in.go b/components/dm/command/scale_in.go index 0e43130f04..17ddbdbac5 100644 --- a/components/dm/command/scale_in.go +++ b/components/dm/command/scale_in.go @@ -53,6 +53,14 @@ func newScaleInCmd() *cobra.Command { return cm.ScaleIn(clusterName, skipConfirm, gOpt, scale) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Nodes, "node", "N", nil, "Specify the nodes (required)") diff --git a/components/dm/command/scale_out.go b/components/dm/command/scale_out.go index b3832d2aa1..669303d762 100644 --- a/components/dm/command/scale_out.go +++ b/components/dm/command/scale_out.go @@ -42,6 +42,16 @@ func newScaleOutCmd() *cobra.Command { return cm.ScaleOut(clusterName, topoFile, postScaleOutHook, nil, opt, skipConfirm, gOpt) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + case 1: + return nil, cobra.ShellCompDirectiveDefault + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringVarP(&opt.User, "user", "u", utils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.") diff --git a/components/dm/command/start.go b/components/dm/command/start.go index 0b3bbc921d..fda235a8f6 100644 --- a/components/dm/command/start.go +++ b/components/dm/command/start.go @@ -30,6 +30,14 @@ func newStartCmd() *cobra.Command { return cm.StartCluster(clusterName, gOpt, false) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only start specified roles") diff --git a/components/dm/command/stop.go b/components/dm/command/stop.go index e8dc8be48c..950c10a9a4 100644 --- a/components/dm/command/stop.go +++ b/components/dm/command/stop.go @@ -30,6 +30,14 @@ func newStopCmd() *cobra.Command { return cm.StopCluster(clusterName, gOpt, skipConfirm, false) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().StringSliceVarP(&gOpt.Roles, "role", "R", nil, "Only stop specified roles") diff --git a/components/dm/command/upgrade.go b/components/dm/command/upgrade.go index 9b57b8ca2c..bb6abf0ac7 100644 --- a/components/dm/command/upgrade.go +++ b/components/dm/command/upgrade.go @@ -30,6 +30,14 @@ func newUpgradeCmd() *cobra.Command { return cm.Upgrade(args[0], args[1], gOpt, skipConfirm, offlineMode) }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + switch len(args) { + case 0: + return shellCompGetClusterName(cm, toComplete) + default: + return nil, cobra.ShellCompDirectiveNoFileComp + } + }, } cmd.Flags().BoolVarP(&offlineMode, "offline", "", false, "Upgrade a stopped cluster") diff --git a/components/dm/spec/logic.go b/components/dm/spec/logic.go index 0566d3003f..41f62c9aca 100644 --- a/components/dm/spec/logic.go +++ b/components/dm/spec/logic.go @@ -19,6 +19,7 @@ import ( "fmt" "path/filepath" "strings" + "sync" "time" "github.com/pingcap/tiup/pkg/cluster/ctxt" @@ -89,8 +90,8 @@ func (c *DMMasterComponent) Instances() []Instance { s.DataDir, }, StatusFn: s.Status, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return spec.UptimeByHost(s.Host, s.Port, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return spec.UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, topo: c.Topology, @@ -267,8 +268,8 @@ func (c *DMWorkerComponent) Instances() []Instance { s.DataDir, }, StatusFn: s.Status, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return spec.UptimeByHost(s.Host, s.Port, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return spec.UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, topo: c.Topology, @@ -440,12 +441,28 @@ func (topo *Specification) IterComponent(fn func(comp Component)) { } // IterInstance iterates all instances in component starting order -func (topo *Specification) IterInstance(fn func(instance Instance)) { +func (topo *Specification) IterInstance(fn func(instance Instance), concurrency ...int) { + maxWorkers := 1 + wg := sync.WaitGroup{} + if len(concurrency) > 0 && concurrency[0] > 1 { + maxWorkers = concurrency[0] + } + workerPool := make(chan struct{}, maxWorkers) + for _, comp := range topo.ComponentsByStartOrder() { for _, inst := range comp.Instances() { - fn(inst) + wg.Add(1) + workerPool <- struct{}{} + go func(inst Instance) { + defer func() { + <-workerPool + wg.Done() + }() + fn(inst) + }(inst) } } + wg.Wait() } // IterHost iterates one instance for each host diff --git a/components/dm/spec/topology_dm.go b/components/dm/spec/topology_dm.go index 8959f7bac0..a400688a0f 100644 --- a/components/dm/spec/topology_dm.go +++ b/components/dm/spec/topology_dm.go @@ -141,9 +141,13 @@ type MasterSpec struct { } // Status queries current status of the instance -func (s *MasterSpec) Status(_ context.Context, tlsCfg *tls.Config, _ ...string) string { +func (s *MasterSpec) Status(_ context.Context, timeout time.Duration, tlsCfg *tls.Config, _ ...string) string { + if timeout < time.Second { + timeout = statusQueryTimeout + } + addr := fmt.Sprintf("%s:%d", s.Host, s.Port) - dc := api.NewDMMasterClient([]string{addr}, statusQueryTimeout, tlsCfg) + dc := api.NewDMMasterClient([]string{addr}, timeout, tlsCfg) isFound, isActive, isLeader, err := dc.GetMaster(s.Name) if err != nil { return "Down" @@ -207,11 +211,15 @@ type WorkerSpec struct { } // Status queries current status of the instance -func (s *WorkerSpec) Status(_ context.Context, tlsCfg *tls.Config, masterList ...string) string { +func (s *WorkerSpec) Status(_ context.Context, timeout time.Duration, tlsCfg *tls.Config, masterList ...string) string { if len(masterList) < 1 { return "N/A" } - dc := api.NewDMMasterClient(masterList, statusQueryTimeout, tlsCfg) + + if timeout < time.Second { + timeout = statusQueryTimeout + } + dc := api.NewDMMasterClient(masterList, timeout, tlsCfg) stage, err := dc.GetWorker(s.Name) if err != nil { return "Down" diff --git a/components/playground/instance/ticdc.go b/components/playground/instance/ticdc.go index 562d42d504..da2d683913 100644 --- a/components/playground/instance/ticdc.go +++ b/components/playground/instance/ticdc.go @@ -20,8 +20,8 @@ import ( "strings" tiupexec "github.com/pingcap/tiup/pkg/exec" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/utils" - "golang.org/x/mod/semver" ) // TiCDC represent a ticdc instance. @@ -62,9 +62,8 @@ func (c *TiCDC) Start(ctx context.Context, version utils.Version) error { fmt.Sprintf("--log-file=%s", c.LogFile()), } clusterVersion := string(version) - if semver.Compare(clusterVersion, "v4.0.13") >= 0 { - if (semver.Major(clusterVersion) == "v4" && semver.Compare(clusterVersion, "v4.0.14") >= 0) || - (semver.Major(clusterVersion) == "v5" && semver.Compare(clusterVersion, "v5.0.3") >= 0) { + if tidbver.TiCDCSupportConfigFile(clusterVersion) { + if tidbver.TiCDCSupportDataDir(clusterVersion) { args = append(args, fmt.Sprintf("--data-dir=%s", filepath.Join(c.Dir, "data"))) } else { args = append(args, fmt.Sprintf("--sort-dir=%s/tmp/sorter", filepath.Join(c.Dir, "data"))) diff --git a/components/playground/instance/tiflash_config.go b/components/playground/instance/tiflash_config.go index 02a4b92ec4..ddf825c5ef 100644 --- a/components/playground/instance/tiflash_config.go +++ b/components/playground/instance/tiflash_config.go @@ -18,8 +18,8 @@ import ( "io" "strings" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/utils" - "golang.org/x/mod/semver" ) const tiflashDaemonConfig = ` @@ -104,7 +104,7 @@ func writeTiFlashConfig(w io.Writer, version utils.Version, tcpPort, httpPort, s logDir := fmt.Sprintf("%s/log", deployDir) ip := AdvertiseHost(host) var conf string - if semver.Compare(version.String(), "v5.4.0") >= 0 || version.IsNightly() { + if tidbver.TiFlashNotNeedSomeConfig(version.String()) { conf = fmt.Sprintf(tiflashConfig, pdAddrs, httpPort, tcpPort, deployDir, dataDir, tmpDir, logDir, servicePort, metricsPort, ip, strings.Join(tidbStatusAddrs, ","), clusterManagerPath, "") diff --git a/components/playground/instance/tiflash_proxy_config.go b/components/playground/instance/tiflash_proxy_config.go index 29bef476ad..868974711e 100644 --- a/components/playground/instance/tiflash_proxy_config.go +++ b/components/playground/instance/tiflash_proxy_config.go @@ -17,8 +17,8 @@ import ( "fmt" "io" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/utils" - "golang.org/x/mod/semver" ) const tiflashProxyConfig = ` @@ -52,7 +52,7 @@ func writeTiFlashProxyConfig(w io.Writer, version utils.Version, host, deployDir logDir := fmt.Sprintf("%s/log", deployDir) ip := AdvertiseHost(host) var statusAddr string - if semver.Compare(version.String(), "v4.0.5") >= 0 || version.IsNightly() { + if tidbver.TiFlashSupportAdvertiseStatusAddr(version.String()) { statusAddr = fmt.Sprintf(`status-addr = "0.0.0.0:%[2]d" advertise-status-addr = "%[1]s:%[2]d"`, ip, proxyStatusPort) } else { diff --git a/components/playground/main.go b/components/playground/main.go index bdade14803..5bae3291b3 100644 --- a/components/playground/main.go +++ b/components/playground/main.go @@ -72,6 +72,7 @@ var ( playgroundReport *telemetry.PlaygroundReport options = &BootOptions{} tag string + deleteWhenExit bool tiupDataDir string dataDir string log = logprinter.NewLogger("") @@ -164,24 +165,22 @@ Examples: if tiupHome == "" { tiupHome, _ = getAbsolutePath(filepath.Join("~", localdata.ProfileDirName)) } - if tiupDataDir == "" { - if tag == "" { - dataDir = filepath.Join(tiupHome, localdata.DataParentDir, utils.Base62Tag()) - } else { - dataDir = filepath.Join(tiupHome, localdata.DataParentDir, tag) - } - if dataDir == "" { - return errors.Errorf("cannot read environment variable %s nor %s", localdata.EnvNameInstanceDataDir, localdata.EnvNameHome) - } - err := os.MkdirAll(dataDir, os.ModePerm) - if err != nil { - return err - } - } else { + switch { + case tag != "": + dataDir = filepath.Join(tiupHome, localdata.DataParentDir, tag) + case tiupDataDir != "": dataDir = tiupDataDir + tag = dataDir[strings.LastIndex(dataDir, "/")+1:] + default: + tag = utils.Base62Tag() + dataDir = filepath.Join(tiupHome, localdata.DataParentDir, tag) + deleteWhenExit = true + } + err := os.MkdirAll(dataDir, os.ModePerm) + if err != nil { + return err } - instanceName := dataDir[strings.LastIndex(dataDir, "/")+1:] - fmt.Printf("\033]0;TiUP Playground: %s\a", instanceName) + fmt.Printf("\033]0;TiUP Playground: %s\a", tag) return nil }, RunE: func(cmd *cobra.Command, args []string) error { @@ -260,7 +259,6 @@ Examples: sig = (<-sc).(syscall.Signal) atomic.StoreInt32(&p.curSig, int32(syscall.SIGKILL)) if sig == syscall.SIGINT { - removeData() p.terminate(syscall.SIGKILL) } }() @@ -633,6 +631,7 @@ func main() { fmt.Println(color.RedString("Error: %v", err)) code = 1 } + removeData() if reportEnabled { f := func() { @@ -684,8 +683,7 @@ func main() { } func removeData() { - // remove if not set tag when run at standalone mode - if tiupDataDir == "" && tag == "" { + if deleteWhenExit { os.RemoveAll(dataDir) } } diff --git a/components/playground/playground.go b/components/playground/playground.go index 715aa8e1ca..231ccdbd88 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -137,7 +137,7 @@ func (p *Playground) binlogClient() (*api.BinlogClient, error) { addrs = append(addrs, inst.Addr()) } - return api.NewBinlogClient(addrs, nil) + return api.NewBinlogClient(addrs, 5*time.Second, nil) } func (p *Playground) pdClient() *api.PDClient { @@ -959,11 +959,14 @@ func (p *Playground) wait() error { } func (p *Playground) terminate(sig syscall.Signal) { - kill := func(pid int, wait func() error) { - if sig != syscall.SIGINT { - _ = syscall.Kill(pid, sig) + kill := func(name string, pid int, wait func() error) { + if sig == syscall.SIGKILL { + fmt.Printf("Force %s(%d) to quit...\n", name, pid) + } else if atomic.LoadInt32(&p.curSig) == int32(sig) { // In case of double ctr+c + fmt.Printf("Wait %s(%d) to quit...\n", name, pid) } + _ = syscall.Kill(pid, sig) timer := time.AfterFunc(forceKillAfterDuration, func() { _ = syscall.Kill(pid, syscall.SIGKILL) }) @@ -972,27 +975,38 @@ func (p *Playground) terminate(sig syscall.Signal) { timer.Stop() } - for i := len(p.startedInstances); i > 0; i-- { - inst := p.startedInstances[i-1] - if sig == syscall.SIGKILL { - fmt.Printf("Force %s(%d) to quit...\n", inst.Component(), inst.Pid()) - } else if atomic.LoadInt32(&p.curSig) == int32(sig) { // In case of double ctr+c - fmt.Printf("Wait %s(%d) to quit...\n", inst.Component(), inst.Pid()) - } - - kill(inst.Pid(), inst.Wait) - } - if p.monitor != nil { - kill(p.monitor.cmd.Process.Pid, p.monitor.wait) + go kill("prometheus", p.monitor.cmd.Process.Pid, p.monitor.wait) } if p.ngmonitoring != nil { - kill(p.ngmonitoring.cmd.Process.Pid, p.ngmonitoring.wait) + go kill("ng-monitoring", p.ngmonitoring.cmd.Process.Pid, p.ngmonitoring.wait) } if p.grafana != nil { - kill(p.grafana.cmd.Process.Pid, p.grafana.wait) + go kill("grafana", p.grafana.cmd.Process.Pid, p.grafana.wait) + } + for _, inst := range p.tiflashs { + kill(inst.Component(), inst.Pid(), inst.Wait) + } + for _, inst := range p.ticdcs { + kill(inst.Component(), inst.Pid(), inst.Wait) + } + for _, inst := range p.drainers { + kill(inst.Component(), inst.Pid(), inst.Wait) + } + // tidb must exit earlier then pd + for _, inst := range p.tidbs { + kill(inst.Component(), inst.Pid(), inst.Wait) + } + for _, inst := range p.pumps { + kill(inst.Component(), inst.Pid(), inst.Wait) + } + for _, inst := range p.tikvs { + kill(inst.Component(), inst.Pid(), inst.Wait) + } + for _, inst := range p.pds { + kill(inst.Component(), inst.Pid(), inst.Wait) } } diff --git a/embed/examples/dm/minimal.yaml b/embed/examples/dm/minimal.yaml index c93a5e3202..ab8300b10e 100644 --- a/embed/examples/dm/minimal.yaml +++ b/embed/examples/dm/minimal.yaml @@ -26,9 +26,6 @@ monitoring_servers: grafana_servers: - host: 172.19.0.101 - # config: # Enable this part if you want to use WebUI, make sure tiup dm -v newer than v1.9.0. - # auth.anonymous.enabled: true - # security.allow_embedding: true alertmanager_servers: - host: 172.19.0.101 diff --git a/embed/examples/dm/topology.example.yaml b/embed/examples/dm/topology.example.yaml index 0ed7bbf4e3..b6faa986a5 100644 --- a/embed/examples/dm/topology.example.yaml +++ b/embed/examples/dm/topology.example.yaml @@ -68,9 +68,6 @@ grafana_servers: # deploy_dir: /tidb-deploy/grafana-3000 # grafana dashboard dir on TiUP machine # dashboard_dir: /home/tidb/dashboards - # config: # Enable this part if you want to use WebUI, make sure tiup dm -v newer than v1.9.0. - # auth.anonymous.enabled: true - # security.allow_embedding: true alertmanager_servers: - host: 10.0.1.15 diff --git a/embed/templates/systemd/system.service.tpl b/embed/templates/systemd/system.service.tpl index d4fd62c9ce..3d9966ab13 100644 --- a/embed/templates/systemd/system.service.tpl +++ b/embed/templates/systemd/system.service.tpl @@ -25,7 +25,7 @@ LimitSTACK=10485760 AmbientCapabilities=CAP_NET_RAW {{- end}} User={{.User}} -ExecStart={{.DeployDir}}/scripts/run_{{.ServiceName}}.sh +ExecStart=/bin/bash -c '{{.DeployDir}}/scripts/run_{{.ServiceName}}.sh' {{- if eq .ServiceName "prometheus"}} ExecReload=/bin/bash -c 'kill -HUP $MAINPID $(pidof {{.DeployDir}}/bin/ng-monitoring-server)' {{end}} diff --git a/embed/templates/systemd/tispark.service.tpl b/embed/templates/systemd/tispark.service.tpl index c3545c97bc..843dbdebdb 100644 --- a/embed/templates/systemd/tispark.service.tpl +++ b/embed/templates/systemd/tispark.service.tpl @@ -7,8 +7,8 @@ User={{.User}} {{- if ne .JavaHome ""}} Environment="JAVA_HOME={{.JavaHome}}" {{- end}} -ExecStart={{.DeployDir}}/sbin/start-{{.ServiceName}}.sh -ExecStop={{.DeployDir}}/sbin/stop-{{.ServiceName}}.sh +ExecStart=/bin/bash -c '{{.DeployDir}}/sbin/start-{{.ServiceName}}.sh' +ExecStop=/bin/bash -c '{{.DeployDir}}/sbin/stop-{{.ServiceName}}.sh' Type=forking {{- if .Restart}} Restart={{.Restart}} diff --git a/go.mod b/go.mod index 3653b1c439..9ec53061b8 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.16 replace gopkg.in/yaml.v2 => github.com/july2993/yaml v0.0.0-20200423062752-adcfa5abe2ed require ( - github.com/AstroProfundis/sysinfo v0.0.0-20211201040748-b52c88acb418 + github.com/AstroProfundis/sysinfo v0.0.0-20220225042645-97eb85080e73 github.com/AstroProfundis/tabby v1.1.1-color - github.com/BurntSushi/toml v1.0.0 + github.com/BurntSushi/toml v1.1.0 github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 github.com/VividCortex/ewma v1.2.0 // indirect github.com/alecthomas/assert v1.0.0 @@ -16,7 +16,7 @@ require ( github.com/blevesearch/bleve v1.0.14 github.com/cavaliergopher/grab/v3 v3.0.1 github.com/cheggaaa/pb/v3 v3.0.8 - github.com/creasty/defaults v1.5.2 + github.com/creasty/defaults v1.6.0 github.com/docker/go-units v0.4.0 github.com/fatih/color v1.13.0 github.com/gibson042/canonicaljson-go v1.0.3 @@ -24,6 +24,7 @@ require ( github.com/gofrs/flock v0.8.1 github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 + github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -31,45 +32,51 @@ require ( github.com/joomcode/errorx v1.1.0 github.com/juju/ansiterm v0.0.0-20210929141451-8b71cc96ebdc github.com/kr/text v0.2.0 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-runewidth v0.0.13 github.com/otiai10/copy v1.7.0 github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0 github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3 - github.com/pingcap/failpoint v0.0.0-20220120024648-5d6fce1ad526 - github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059 - github.com/pingcap/kvproto v0.0.0-20220125073028-58f2ac94aa38 - github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee // indirect + github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 + github.com/pingcap/fn v1.0.0 + github.com/pingcap/kvproto v0.0.0-20220525022339-6aaebf466305 + github.com/pingcap/log v1.1.0 // indirect github.com/pingcap/tidb-insight/collector v0.0.0-20220111101533-227008e9835b github.com/pkg/errors v0.9.1 github.com/prometheus/client_model v0.2.0 - github.com/prometheus/common v0.32.1 - github.com/prometheus/prom2json v1.3.0 - github.com/r3labs/diff/v2 v2.14.8 + github.com/prometheus/common v0.34.0 + github.com/prometheus/prom2json v1.3.1 + github.com/r3labs/diff/v2 v2.15.1 github.com/relex/aini v1.5.0 github.com/sergi/go-diff v1.2.0 github.com/sethvargo/go-password v0.2.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 - github.com/spf13/cobra v1.3.0 + github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.1 github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 // indirect github.com/tj/go-termd v0.0.1 + github.com/tklauser/go-sysconf v0.3.10 // indirect + github.com/tklauser/numcpus v0.5.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.2 - go.etcd.io/etcd/client/v3 v3.5.2 + go.etcd.io/etcd/client/pkg/v3 v3.5.4 + go.etcd.io/etcd/client/v3 v3.5.4 go.uber.org/atomic v1.9.0 + go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 - golang.org/x/crypto v0.0.0-20220208233918-bba287dce954 + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e golang.org/x/mod v0.5.1 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220207234003-57398862261d - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 + golang.org/x/net v0.0.0-20220524220425-1d687d428aca // indirect + golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 golang.org/x/text v0.3.7 - google.golang.org/genproto v0.0.0-20220208230804-65c12eb4c068 - google.golang.org/grpc v1.44.0 - gopkg.in/ini.v1 v1.66.3 + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220525015930-6ca3db687a9d + google.golang.org/grpc v1.46.2 + gopkg.in/ini.v1 v1.66.4 gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b - software.sslmate.com/src/go-pkcs12 v0.0.0-20210415151418-c5206de65a78 + gopkg.in/yaml.v3 v3.0.0 + software.sslmate.com/src/go-pkcs12 v0.2.0 ) diff --git a/go.sum b/go.sum index 8549873514..51b7e37187 100644 --- a/go.sum +++ b/go.sum @@ -13,20 +13,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -35,7 +21,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -46,19 +31,18 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AstroProfundis/sysinfo v0.0.0-20211201040748-b52c88acb418 h1:mBWbJ+qSooaOMIAaSOtzA8PYDfhwyUWAJYT4AM8Rtoc= github.com/AstroProfundis/sysinfo v0.0.0-20211201040748-b52c88acb418/go.mod h1:WP2xTB42TPPFNpTmPiOm4Zjm9jdHwhi8wrMYGAv1BRA= +github.com/AstroProfundis/sysinfo v0.0.0-20220225042645-97eb85080e73 h1:kMnie41xMWsTe4NjXoceyw2j2VE1Xjivh37kKz09+54= +github.com/AstroProfundis/sysinfo v0.0.0-20220225042645-97eb85080e73/go.mod h1:WP2xTB42TPPFNpTmPiOm4Zjm9jdHwhi8wrMYGAv1BRA= github.com/AstroProfundis/tabby v1.1.1-color h1:gi/Fs4W2KVcC1m29lqa39tDnsGfZG/PYvZmwOhAH5m0= github.com/AstroProfundis/tabby v1.1.1-color/go.mod h1:Wcm+uinH1saEOFGLK2LdY37lAOts8HLevz64Y3y3M3Q= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= -github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 h1:VauE2GcJNZFun2Och6tIT2zJZK1v6jxALQDA9BIji/E= @@ -91,12 +75,7 @@ github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQY github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/appleboy/easyssh-proxy v1.3.10-0.20211209134747-6671f69d85f5 h1:4YNuL/4gurMQu1r10vp9kuD3X2z0Nn4VayQpmIjoJlY= github.com/appleboy/easyssh-proxy v1.3.10-0.20211209134747-6671f69d85f5/go.mod h1:SnOlkuIAoaj8FvRIGcWp2BbLOwvHZnNNOva+DBMbHWU= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= @@ -106,7 +85,6 @@ github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blevesearch/bleve v1.0.14 h1:Q8r+fHTt35jtGXJUM0ULwM3Tzg+MRfyai4ZkWDy2xO4= github.com/blevesearch/bleve v1.0.14/go.mod h1:e/LJTr+E7EaoVdkQZTfoz7dt4KoDNvDbLb8MSKuNTLQ= github.com/blevesearch/blevex v1.0.0 h1:pnilj2Qi3YSEGdWgLj1Pn9Io7ukfXPoQcpAI1Bv8n/o= @@ -133,8 +111,6 @@ github.com/blevesearch/zap/v15 v15.0.3/go.mod h1:iuwQrImsh1WjWJ0Ue2kBqY83a0rFtJT github.com/cavaliergopher/grab/v3 v3.0.1 h1:4z7TkBfmPjmLAAmkkAZNX/6QJ1nNFdv3SdIHXju0Fr4= github.com/cavaliergopher/grab/v3 v3.0.1/go.mod h1:1U/KNnD+Ft6JJiYoYBAimKH2XrYptb8Kl3DFGmsjpq4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb/v3 v3.0.8 h1:bC8oemdChbke2FHIIGy9mn4DPJ2caZYQnfbRqwmdCoA= @@ -142,19 +118,13 @@ github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/o github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -169,8 +139,8 @@ github.com/couchbase/vellum v1.0.2/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLB github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creasty/defaults v1.5.2 h1:/VfB6uxpyp6h0fr7SPp7n8WJBoV8jfxQXPCnkVSjyls= -github.com/creasty/defaults v1.5.2/go.mod h1:FPZ+Y0WNrbqOVw+c6av63eyHUAl6pMHZwqLPvXUZGfY= +github.com/creasty/defaults v1.6.0 h1:ltuE9cfphUtlrBeomuu8PEyISTXnxqkBIoQfXgv7BSc= +github.com/creasty/defaults v1.6.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d h1:SwD98825d6bdB+pEuTxWOXiSjBrHdOl/UVp75eI7JT8= github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= @@ -191,24 +161,17 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gibson042/canonicaljson-go v1.0.3 h1:EAyF8L74AWabkyUmrvEFHEt/AGFQeD6RfwbAuf0j1bI= github.com/gibson042/canonicaljson-go v1.0.3/go.mod h1:DsLpJTThXyGNO+KZlI85C1/KDcImpP67k/RKVjcaEqo= @@ -222,9 +185,11 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -235,14 +200,12 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -250,8 +213,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -267,13 +228,12 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -283,8 +243,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= @@ -292,8 +250,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -301,13 +257,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -316,8 +265,6 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/csrf v1.6.0/go.mod h1:7tSf8kmjNYr7IWDCYhd3U8Ck34iQ/Yw5CJu7bAkHEGI= @@ -330,41 +277,12 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ikawaha/kagome.ipadic v1.1.2/go.mod h1:DPSBbU0czaJhAb/5uKQZHMc9MTVRpDugJfX+HddPHHg= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -377,7 +295,6 @@ github.com/joomcode/errorx v1.1.0 h1:dizuSG6yHzlvXOOGHW00gwsmM4Sb9x/yWEfdtPztqcs github.com/joomcode/errorx v1.1.0/go.mod h1:eQzdtdlNyN7etw6YCS4W4+lu442waxZYw5yvz0ULrRo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -391,17 +308,13 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/july2993/yaml v0.0.0-20200423062752-adcfa5abe2ed h1:4dMu41sJad3+E9AMc2hCimGhll184HfPKdu05R6YJtc= github.com/july2993/yaml v0.0.0-20200423062752-adcfa5abe2ed/go.mod h1:7FtNkxNa9xDptPhcc7mWT/Ov++hkuMU/NKtgkPZPUwo= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -412,22 +325,14 @@ github.com/lorenzosaino/go-sysctl v0.2.0 h1:F+NhHQKbiIBFcdw55G7ggizehMe1on1603br github.com/lorenzosaino/go-sysctl v0.2.0/go.mod h1:A4LY2UFLJ2cuDay73t69qeRN1bloIK8TUQjOa1KQULo= github.com/lunixbochs/vtclean v1.0.0 h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.10/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -436,17 +341,10 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -470,10 +368,7 @@ github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6 github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.3 h1:7JgpsBaN0uMkyju4tbYHu0mnM55hNKVYLsXmwr15NQI= github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ= @@ -483,54 +378,51 @@ github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTw github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3 h1:LllgC9eGfqzkfubMgjKIDyZYaa609nNWAyNZtpy2B3M= github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3/go.mod h1:G7x87le1poQzLB/TqvTJI2ILrSgobnq4Ut7luOwvfvI= -github.com/pingcap/failpoint v0.0.0-20220120024648-5d6fce1ad526 h1:b5zs1HmzBLAhlOoajkfVpzkbgQXhgJ+XQb5V12CeGJY= -github.com/pingcap/failpoint v0.0.0-20220120024648-5d6fce1ad526/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= -github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059 h1:Pe2LbxRmbTfAoKJ65bZLmhahmvHm7n9DUxGRQT00208= -github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059/go.mod h1:fMRU1BA1y+r89AxUoaAar4JjrhUkVDt0o0Np6V8XbDQ= -github.com/pingcap/kvproto v0.0.0-20220125073028-58f2ac94aa38 h1:c27KOQNE7M//DDxZok4WSb3YKRWsMpqBts8RJ3iHaGI= -github.com/pingcap/kvproto v0.0.0-20220125073028-58f2ac94aa38/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= +github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 h1:kJolJWbyadVeL8RKBlqmXQR7FRKPsIeU85TUYyhbhiQ= +github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= +github.com/pingcap/fn v1.0.0 h1:CyA6AxcOZkQh52wIqYlAmaVmF6EvrcqFywP463pjA8g= +github.com/pingcap/fn v1.0.0/go.mod h1:u9WZ1ZiOD1RpNhcI42RucFh/lBuzTu6rw88a+oF2Z24= +github.com/pingcap/kvproto v0.0.0-20220525022339-6aaebf466305 h1:TZ0teMZoKHnZDlJxNkWrp5Sgv3w+ruNbrqtBYKsfaNw= +github.com/pingcap/kvproto v0.0.0-20220525022339-6aaebf466305/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= -github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee h1:VO2t6IBpfvW34TdtD/G10VvnGqjLic1jzOuHjUb5VqM= -github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= +github.com/pingcap/log v1.1.0 h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8= +github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= github.com/pingcap/tidb-insight/collector v0.0.0-20220111101533-227008e9835b h1:ajveYA5tnSRVq5/mhZmg8Nn6lZ9hrSA4Pj4Fabnm+KI= github.com/pingcap/tidb-insight/collector v0.0.0-20220111101533-227008e9835b/go.mod h1:w04Qnjn8hiTNR4fTMgm4+TfXtDBcCq2i1SKlXwqX69o= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= +github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prom2json v1.3.0 h1:BlqrtbT9lLH3ZsOVhXPsHzFrApCTKRifB7gjJuypu6Y= -github.com/prometheus/prom2json v1.3.0/go.mod h1:rMN7m0ApCowcoDlypBHlkNbp5eJQf/+1isKykIP5ZnM= -github.com/r3labs/diff/v2 v2.14.8 h1:2pL2CpOEFof3GzyNMF0oyoK+oIXGiZqdZv1CTMMns9g= -github.com/r3labs/diff/v2 v2.14.8/go.mod h1:I8noH9Fc2fjSaMxqF3G2lhDdC0b+JXCfyx85tWFM9kc= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/prom2json v1.3.1 h1:OogL5hsrJpLPz3jZ4LPz4sJRTtADzViCNRQoqrzUQvk= +github.com/prometheus/prom2json v1.3.1/go.mod h1:A8Oy9aiQx4wrJY9ya1i4nHOySGmkVp5EO0aU1iSJR+g= +github.com/r3labs/diff/v2 v2.15.1 h1:EOrVqPUzi+njlumoqJwiS/TgGgmZo83619FNDB9xQUg= +github.com/r3labs/diff/v2 v2.15.1/go.mod h1:I8noH9Fc2fjSaMxqF3G2lhDdC0b+JXCfyx85tWFM9kc= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/relex/aini v1.5.0 h1:6euW/m6b2Y2hkSY8rsyGzcYGpMUWx2dnTzXgQvunTzQ= github.com/relex/aini v1.5.0/go.mod h1:qUMEteDeWDTMHUP7WsaOTc7gawELU5Gcrn2YHz4EAr0= @@ -544,9 +436,6 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk= github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -563,22 +452,16 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= -github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/steveyen/gtreap v0.1.0 h1:CjhzTa274PyJLJuMZwIzCO1PfC00oRa8d1Kc78bFXJM= github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -588,9 +471,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= @@ -605,11 +488,13 @@ github.com/tj/go-css v0.0.0-20191108133013-220a796d1705 h1:+UA89aFRjPMqdccHd9A0H github.com/tj/go-css v0.0.0-20191108133013-220a796d1705/go.mod h1:e+JPLQ9wyQCgRnPenX2bo7MJoLphBHz5c1WUqaANSeA= github.com/tj/go-termd v0.0.1 h1:NRrUrpzPj3jVlimGNMdnNOry0vYgvEkMJcJWZkKAeZI= github.com/tj/go-termd v0.0.1/go.mod h1:qf28T7t3aasdTnAz6ehff7dfebsK+lAKK53duclZ/yQ= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/tklauser/numcpus v0.5.0 h1:ooe7gN0fg6myJ0EKoTAf5hebTZrH52px3New/D9iJ+A= +github.com/tklauser/numcpus v0.5.0/go.mod h1:OGzpTxpcIMNGYQdit2BYL1pvk/dSOaJWjKoflh+RQjo= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= @@ -632,22 +517,17 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= -go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE= -go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.etcd.io/etcd/client/v3 v3.5.2 h1:WdnejrUtQC4nCxK0/dLTMqKOB+U5TP/2Ya0BJL+1otA= -go.etcd.io/etcd/client/v3 v3.5.2/go.mod h1:kOOaWFFgHygyT0WlSmL8TJiXmMysO/nNUlEsSsN6W4o= +go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4 h1:lrneYvz923dvC14R54XcA7FXoZ3mlGZAgmwhfm7HqOg= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -663,8 +543,9 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -674,20 +555,17 @@ go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220208233918-bba287dce954 h1:BkypuErRT9A9I/iljuaG3/zdMjd/J6m8tKKJQtGfSdA= -golang.org/x/crypto v0.0.0-20220208233918-bba287dce954/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -710,7 +588,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= @@ -721,8 +598,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= @@ -730,7 +605,6 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -743,7 +617,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -760,37 +633,21 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220524220425-1d687d428aca h1:xTaFYiPROfpPhqrfTIDXj0ri1SpfueYT951s4bAuDO8= +golang.org/x/net v0.0.0-20220524220425-1d687d428aca/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -801,19 +658,17 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -824,19 +679,14 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -853,51 +703,38 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220207234003-57398862261d h1:Bm7BNOQt2Qv7ZqysjeLjgCBanX+88Z/OtdvsrEv1Djc= -golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= @@ -906,7 +743,6 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -919,7 +755,6 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -952,17 +787,9 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6 h1:SIasE1FVIQOWz2GEAHFOmoW7xchJcqlucjSULTL0Ag4= golang.org/x/tools v0.1.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= @@ -987,22 +814,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1042,41 +853,9 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220208230804-65c12eb4c068 h1:pwzFiZfBTH/GjBWz1BcDwMBaHBo8mZvpLa7eBKJpFAk= -google.golang.org/genproto v0.0.0-20220208230804-65c12eb4c068/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220525015930-6ca3db687a9d h1:8BnRR08DxAQ+e2pFx64Q3Ltg/AkrrxyG1LLa1WpomyA= +google.golang.org/genproto v0.0.0-20220525015930-6ca3db687a9d/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1090,24 +869,11 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1120,8 +886,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1131,16 +898,17 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w= -gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1154,5 +922,5 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -software.sslmate.com/src/go-pkcs12 v0.0.0-20210415151418-c5206de65a78 h1:SqYE5+A2qvRhErbsXFfUEUmpWEKxxRSMgGLkvRAFOV4= -software.sslmate.com/src/go-pkcs12 v0.0.0-20210415151418-c5206de65a78/go.mod h1:B7Wf0Ya4DHF9Yw+qfZuJijQYkWicqDa+79Ytmmq3Kjg= +software.sslmate.com/src/go-pkcs12 v0.2.0 h1:nlFkj7bTysH6VkC4fGphtjXRbezREPgrHuJG20hBGPE= +software.sslmate.com/src/go-pkcs12 v0.2.0/go.mod h1:23rNcYsMabIc1otwLpTkCCPwUq6kQsTyowttG/as0kQ= diff --git a/pkg/cluster/api/binlog.go b/pkg/cluster/api/binlog.go index a16b85f03c..c92efc65c3 100644 --- a/pkg/cluster/api/binlog.go +++ b/pkg/cluster/api/binlog.go @@ -20,6 +20,7 @@ import ( "fmt" "io" "net/http" + "strings" "time" "github.com/pingcap/errors" @@ -35,10 +36,14 @@ type BinlogClient struct { } // NewBinlogClient create a BinlogClient. -func NewBinlogClient(pdEndpoints []string, tlsConfig *tls.Config) (*BinlogClient, error) { +func NewBinlogClient(pdEndpoints []string, timeout time.Duration, tlsConfig *tls.Config) (*BinlogClient, error) { + if timeout < time.Second { + timeout = time.Second * 5 + } + etcdClient, err := clientv3.New(clientv3.Config{ Endpoints: pdEndpoints, - DialTimeout: time.Second * 5, + DialTimeout: timeout, TLS: tlsConfig, }) if err != nil { @@ -47,7 +52,7 @@ func NewBinlogClient(pdEndpoints []string, tlsConfig *tls.Config) (*BinlogClient return &BinlogClient{ tls: tlsConfig, - httpClient: utils.NewHTTPClient(5*time.Second, tlsConfig).Client(), + httpClient: utils.NewHTTPClient(timeout, tlsConfig).Client(), etcdClient: etcdClient, }, nil } @@ -99,35 +104,32 @@ func (c *BinlogClient) IsDrainerTombstone(ctx context.Context, addr string) (boo } func (c *BinlogClient) isTombstone(ctx context.Context, ty string, nodeID string) (bool, error) { - status, err := c.nodeStatus(ctx, ty) + s, err := c.nodeStatus(ctx, ty, nodeID) if err != nil { return false, err } - for _, s := range status { - if s.NodeID == nodeID { - if s.State == "offline" { - return true, nil - } - return false, nil - } + if s.State == "offline" { + return true, nil } - - return false, errors.Errorf("node not exist: %s", nodeID) + return false, nil } // nolint (unused) func (c *BinlogClient) pumpNodeStatus(ctx context.Context) (status []*NodeStatus, err error) { - return c.nodeStatus(ctx, "pumps") + return c.nodesStatus(ctx, "pumps") } // nolint (unused) func (c *BinlogClient) drainerNodeStatus(ctx context.Context) (status []*NodeStatus, err error) { - return c.nodeStatus(ctx, "drainers") + return c.nodesStatus(ctx, "drainers") } func (c *BinlogClient) nodeID(ctx context.Context, addr, ty string) (string, error) { - nodes, err := c.nodeStatus(ctx, ty) + // the number of nodes with the same ip:port + targetNodes := []string{} + + nodes, err := c.nodesStatus(ctx, ty) if err != nil { return "", err } @@ -135,12 +137,20 @@ func (c *BinlogClient) nodeID(ctx context.Context, addr, ty string) (string, err addrs := []string{} for _, node := range nodes { if addr == node.Addr { - return node.NodeID, nil + targetNodes = append(targetNodes, node.NodeID) + continue } addrs = append(addrs, addr) } - return "", errors.Errorf("%s node id for address %s not found, found address: %s", ty, addr, addrs) + switch len(targetNodes) { + case 0: + return "", errors.Errorf("%s node id for address %s not found, found address: %s", ty, addr, addrs) + case 1: + return targetNodes[0], nil + default: + return "", errors.Errorf("found multiple %s nodes with the same host, found nodes: %s", ty, strings.Join(targetNodes, ",")) + } } // UpdateDrainerState update the specify state as the specified state. @@ -163,34 +173,25 @@ func (c *BinlogClient) UpdatePumpState(ctx context.Context, addr string, state s // updateStatus update the specify state as the specified state. func (c *BinlogClient) updateStatus(ctx context.Context, ty string, nodeID string, state string) error { - key := fmt.Sprintf("/tidb-binlog/v1/%s/%s", ty, nodeID) - - resp, err := c.etcdClient.KV.Get(ctx, key) - if err != nil { - return errors.AddStack(err) - } - - if len(resp.Kvs) == 0 { - return errors.Errorf("no pump with node id: %v", nodeID) - } - - var nodeStatus NodeStatus - err = json.Unmarshal(resp.Kvs[0].Value, &nodeStatus) + ctx, f := context.WithTimeout(ctx, c.httpClient.Timeout) + defer f() + s, err := c.nodeStatus(ctx, ty, nodeID) if err != nil { return errors.AddStack(err) } - if nodeStatus.State == state { + if s.State == state { return nil } - nodeStatus.State = state + s.State = state - data, err := json.Marshal(&nodeStatus) + data, err := json.Marshal(&s) if err != nil { return errors.AddStack(err) } + key := fmt.Sprintf("/tidb-binlog/v1/%s/%s", ty, nodeID) _, err = c.etcdClient.Put(ctx, key, string(data)) if err != nil { return errors.AddStack(err) @@ -199,9 +200,12 @@ func (c *BinlogClient) updateStatus(ctx context.Context, ty string, nodeID strin return nil } -func (c *BinlogClient) nodeStatus(ctx context.Context, ty string) (status []*NodeStatus, err error) { +func (c *BinlogClient) nodesStatus(ctx context.Context, ty string) (status []*NodeStatus, err error) { key := fmt.Sprintf("/tidb-binlog/v1/%s", ty) + // set timeout, otherwise it will keep retrying + ctx, f := context.WithTimeout(ctx, c.httpClient.Timeout) + defer f() resp, err := c.etcdClient.KV.Get(ctx, key, clientv3.WithPrefix()) if err != nil { return nil, errors.AddStack(err) @@ -220,6 +224,25 @@ func (c *BinlogClient) nodeStatus(ctx context.Context, ty string) (status []*Nod return } +// nodeStatus get nodeStatus with nodeID +func (c *BinlogClient) nodeStatus(ctx context.Context, ty string, nodeID string) (node *NodeStatus, err error) { + key := fmt.Sprintf("/tidb-binlog/v1/%s/%s", ty, nodeID) + + resp, err := c.etcdClient.KV.Get(ctx, key) + if err != nil { + return nil, errors.AddStack(err) + } + + if len(resp.Kvs) > 0 { + err = json.Unmarshal(resp.Kvs[0].Value, &node) + if err != nil { + return nil, errors.Annotatef(err, "key: %s,data: %s", string(resp.Kvs[0].Key), string(resp.Kvs[0].Value)) + } + return + } + return nil, errors.Errorf("%s node-id: %s not found, found address: %s", ty, nodeID, key) +} + func (c *BinlogClient) offline(addr string, nodeID string) error { url := c.getOfflineURL(addr, nodeID) req, err := http.NewRequest("PUT", url, nil) @@ -262,6 +285,16 @@ func (c *BinlogClient) OfflinePump(ctx context.Context, addr string) error { if err != nil { return err } + + s, err := c.nodeStatus(ctx, "pumps", nodeID) + if err != nil { + return err + } + + if s.State == "offline" { + return nil + } + return c.offline(addr, nodeID) } @@ -271,5 +304,15 @@ func (c *BinlogClient) OfflineDrainer(ctx context.Context, addr string) error { if err != nil { return err } + + s, err := c.nodeStatus(ctx, "drainers", nodeID) + if err != nil { + return err + } + + if s.State == "offline" { + return nil + } + return c.offline(addr, nodeID) } diff --git a/pkg/cluster/manager/basic.go b/pkg/cluster/manager/basic.go index 0096d775df..8647d3a8da 100644 --- a/pkg/cluster/manager/basic.go +++ b/pkg/cluster/manager/basic.go @@ -31,9 +31,9 @@ import ( "github.com/pingcap/tiup/pkg/cluster/task" "github.com/pingcap/tiup/pkg/meta" "github.com/pingcap/tiup/pkg/set" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/tui" "github.com/pingcap/tiup/pkg/utils" - "golang.org/x/mod/semver" ) // EnableCluster enable/disable the service in a cluster @@ -296,7 +296,7 @@ func getMonitorHosts(topo spec.Topology) (map[string]hostInfo, set.StringSet) { func checkTiFlashWithTLS(topo spec.Topology, version string) error { if clusterSpec, ok := topo.(*spec.Specification); ok { if clusterSpec.GlobalOptions.TLSEnabled { - if (semver.Compare(version, "v4.0.5") < 0 && + if (!tidbver.TiFlashSupportTLS(version) && len(clusterSpec.TiFlashServers) > 0) && version != utils.NightlyVersionAlias { return fmt.Errorf("TiFlash %s is not supported in TLS enabled cluster", version) diff --git a/pkg/cluster/manager/check.go b/pkg/cluster/manager/check.go index f8aa399625..951d4d2dd5 100644 --- a/pkg/cluster/manager/check.go +++ b/pkg/cluster/manager/check.go @@ -334,6 +334,14 @@ func checkSystemInfo( topo, opt.Opr, ). + // check for time zone + CheckSys( + inst.GetHost(), + "", + task.CheckTypeTimeZone, + topo, + opt.Opr, + ). // check for system limits Shell( inst.GetHost(), diff --git a/pkg/cluster/manager/destroy.go b/pkg/cluster/manager/destroy.go index c89d01d952..1d53084322 100644 --- a/pkg/cluster/manager/destroy.go +++ b/pkg/cluster/manager/destroy.go @@ -159,7 +159,8 @@ func (m *Manager) DestroyTombstone( Func("FindTomestoneNodes", func(ctx context.Context) (err error) { if !skipConfirm { err = tui.PromptForConfirmOrAbortError( - color.HiYellowString(fmt.Sprintf("Will destroy these nodes: %v\nDo you confirm this action? [y/N]:", nodes)), + fmt.Sprintf("%s\nDo you confirm this action? [y/N]:", + color.HiYellowString("Will destroy these nodes: %v", nodes)), ) if err != nil { return err diff --git a/pkg/cluster/manager/display.go b/pkg/cluster/manager/display.go index 2ddb9c0ce4..2f3c0d0eda 100644 --- a/pkg/cluster/manager/display.go +++ b/pkg/cluster/manager/display.go @@ -24,10 +24,12 @@ import ( "sort" "strconv" "strings" + "sync" "time" "github.com/fatih/color" perrs "github.com/pingcap/errors" + "github.com/pingcap/tiup/pkg/checkpoint" "github.com/pingcap/tiup/pkg/cluster/api" "github.com/pingcap/tiup/pkg/cluster/clusterutil" "github.com/pingcap/tiup/pkg/cluster/ctxt" @@ -109,6 +111,8 @@ func (m *Manager) Display(name string, opt operator.Options) error { topo := metadata.GetTopology() base := metadata.GetBaseMeta() cyan := color.New(color.FgCyan, color.Bold) + + statusTimeout := time.Duration(opt.APITimeout) * time.Second // display cluster meta var j *JSONOutput if m.logger.GetDisplayMode() == logprinter.DisplayModeJSON { @@ -201,7 +205,7 @@ func (m *Manager) Display(name string, opt operator.Options) error { ) if t, ok := topo.(*spec.Specification); ok { var err error - dashboardAddr, err = t.GetDashboardAddress(ctx, tlsCfg, masterActive...) + dashboardAddr, err = t.GetDashboardAddress(ctx, tlsCfg, statusTimeout, masterActive...) if err == nil && !set.NewStringSet("", "auto", "none").Exist(dashboardAddr) { scheme := "http" if tlsCfg != nil { @@ -288,6 +292,7 @@ func (m *Manager) DisplayTiKVLabels(name string, opt operator.Options) error { metadata, _ := m.meta(name) topo := metadata.GetTopology() base := metadata.GetBaseMeta() + statusTimeout := time.Duration(opt.APITimeout) * time.Second // display cluster meta cyan := color.New(color.FgCyan, color.Bold) @@ -358,15 +363,19 @@ func (m *Manager) DisplayTiKVLabels(name string, opt operator.Options) error { if err != nil { return err } + + var mu sync.Mutex topo.IterInstance(func(ins spec.Instance) { if ins.ComponentName() == spec.ComponentPD { - status := ins.Status(ctx, tlsCfg, masterList...) + status := ins.Status(ctx, statusTimeout, tlsCfg, masterList...) if strings.HasPrefix(status, "Up") || strings.HasPrefix(status, "Healthy") { instAddr := fmt.Sprintf("%s:%d", ins.GetHost(), ins.GetPort()) + mu.Lock() masterActive = append(masterActive, instAddr) + mu.Unlock() } } - }) + }, opt.Concurrency) var ( labelInfoArr []api.LabelInfo @@ -455,6 +464,8 @@ func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstI topo := metadata.GetTopology() base := metadata.GetBaseMeta() + statusTimeout := time.Duration(opt.APITimeout) * time.Second + err = SetSSHKeySet(ctx, m.specManager.Path(name, "ssh", "id_rsa"), m.specManager.Path(name, "ssh", "id_rsa.pub")) if err != nil { return nil, err @@ -476,21 +487,25 @@ func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstI masterActive := make([]string, 0) masterStatus := make(map[string]string) + var mu sync.Mutex topo.IterInstance(func(ins spec.Instance) { if ins.ComponentName() != spec.ComponentPD && ins.ComponentName() != spec.ComponentDMMaster { return } - status := ins.Status(ctx, tlsCfg, masterList...) + + status := ins.Status(ctx, statusTimeout, tlsCfg, masterList...) + mu.Lock() if strings.HasPrefix(status, "Up") || strings.HasPrefix(status, "Healthy") { instAddr := fmt.Sprintf("%s:%d", ins.GetHost(), ins.GetPort()) masterActive = append(masterActive, instAddr) } masterStatus[ins.ID()] = status - }) + mu.Unlock() + }, opt.Concurrency) var dashboardAddr string if t, ok := topo.(*spec.Specification); ok { - dashboardAddr, _ = t.GetDashboardAddress(ctx, tlsCfg, masterActive...) + dashboardAddr, _ = t.GetDashboardAddress(ctx, tlsCfg, statusTimeout, masterActive...) } clusterInstInfos := []InstInfo{} @@ -523,19 +538,20 @@ func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstI case spec.ComponentDMMaster: status = masterStatus[ins.ID()] default: - status = ins.Status(ctx, tlsCfg, masterActive...) + status = ins.Status(ctx, statusTimeout, tlsCfg, masterActive...) } since := "-" if opt.ShowUptime { - since = formatInstanceSince(ins.Uptime(ctx, tlsCfg)) + since = formatInstanceSince(ins.Uptime(ctx, statusTimeout, tlsCfg)) } // Query the service status and uptime if status == "-" || (opt.ShowUptime && since == "-") { e, found := ctxt.GetInner(ctx).GetExecutor(ins.GetHost()) if found { - active, _ := operator.GetServiceStatus(ctx, e, ins.ServiceName()) + nctx := checkpoint.NewContext(ctx) + active, _ := operator.GetServiceStatus(nctx, e, ins.ServiceName()) if status == "-" { if parts := strings.Split(strings.TrimSpace(active), " "); len(parts) > 2 { if parts[1] == "active" { @@ -556,6 +572,7 @@ func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstI if ins.IsPatched() { roleName += " (patched)" } + mu.Lock() clusterInstInfos = append(clusterInstInfos, InstInfo{ ID: ins.ID(), Role: roleName, @@ -569,7 +586,8 @@ func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstI Port: ins.GetPort(), Since: since, }) - }) + mu.Unlock() + }, opt.Concurrency) // Sort by role,host,ports sort.Slice(clusterInstInfos, func(i, j int) bool { @@ -605,7 +623,7 @@ func formatInstanceStatus(status string) string { return color.GreenString(status) case startsWith("down", "err", "inactive"): // down, down|ui return color.RedString(status) - case startsWith("tombstone", "disconnected", "n/a"), strings.Contains(status, "offline"): + case startsWith("tombstone", "disconnected", "n/a"), strings.Contains(strings.ToLower(status), "offline"): return color.YellowString(status) default: return status @@ -715,7 +733,7 @@ func SetClusterSSH(ctx context.Context, topo spec.Topology, deployUser string, s } // DisplayDashboardInfo prints the dashboard address of cluster -func (m *Manager) DisplayDashboardInfo(clusterName string, tlsCfg *tls.Config) error { +func (m *Manager) DisplayDashboardInfo(clusterName string, timeout time.Duration, tlsCfg *tls.Config) error { metadata, err := spec.ClusterMetadata(clusterName) if err != nil && !errors.Is(perrs.Cause(err), meta.ErrValidate) && !errors.Is(perrs.Cause(err), spec.ErrNoTiSparkMaster) { @@ -728,7 +746,7 @@ func (m *Manager) DisplayDashboardInfo(clusterName string, tlsCfg *tls.Config) e } ctx := context.WithValue(context.Background(), logprinter.ContextKeyLogger, m.logger) - pdAPI := api.NewPDClient(ctx, pdEndpoints, 2*time.Second, tlsCfg) + pdAPI := api.NewPDClient(ctx, pdEndpoints, timeout, tlsCfg) dashboardAddr, err := pdAPI.GetDashboardAddress() if err != nil { return fmt.Errorf("failed to retrieve TiDB Dashboard instance from PD: %s", err) diff --git a/pkg/cluster/manager/scale_in.go b/pkg/cluster/manager/scale_in.go index bb770a750d..1923243ac5 100644 --- a/pkg/cluster/manager/scale_in.go +++ b/pkg/cluster/manager/scale_in.go @@ -17,6 +17,7 @@ import ( "context" "crypto/tls" "errors" + "fmt" "strings" "github.com/fatih/color" @@ -28,6 +29,7 @@ import ( "github.com/pingcap/tiup/pkg/cluster/spec" "github.com/pingcap/tiup/pkg/cluster/task" "github.com/pingcap/tiup/pkg/meta" + "github.com/pingcap/tiup/pkg/set" "github.com/pingcap/tiup/pkg/tui" ) @@ -51,6 +53,21 @@ func (m *Manager) ScaleIn( force bool = gOpt.Force nodes []string = gOpt.Nodes ) + + metadata, err := m.meta(name) + if err != nil && + !errors.Is(perrs.Cause(err), meta.ErrValidate) && + !errors.Is(perrs.Cause(err), spec.ErrMultipleTiSparkMaster) && + !errors.Is(perrs.Cause(err), spec.ErrMultipleTisparkWorker) && + !errors.Is(perrs.Cause(err), spec.ErrNoTiSparkMaster) { + // ignore conflict check error, node may be deployed by former version + // that lack of some certain conflict checks + return err + } + + topo := metadata.GetTopology() + base := metadata.GetBaseMeta() + if !skipConfirm { if force { m.logger.Warnf(color.HiRedString(tui.ASCIIArtWarning)) @@ -74,23 +91,13 @@ func (m *Manager) ScaleIn( return err } - m.logger.Infof("Scale-in nodes...") - } + if err := checkAsyncComps(topo, nodes); err != nil { + return err + } - metadata, err := m.meta(name) - if err != nil && - !errors.Is(perrs.Cause(err), meta.ErrValidate) && - !errors.Is(perrs.Cause(err), spec.ErrMultipleTiSparkMaster) && - !errors.Is(perrs.Cause(err), spec.ErrMultipleTisparkWorker) && - !errors.Is(perrs.Cause(err), spec.ErrNoTiSparkMaster) { - // ignore conflict check error, node may be deployed by former version - // that lack of some certain conflict checks - return err + m.logger.Infof("Scale-in nodes...") } - topo := metadata.GetTopology() - base := metadata.GetBaseMeta() - // Regenerate configuration gOpt.IgnoreConfigCheck = true regenConfigTasks, hasImported := buildInitConfigTasks(m, name, topo, base, gOpt, nodes) @@ -137,3 +144,25 @@ func (m *Manager) ScaleIn( return nil } + +// checkAsyncComps +func checkAsyncComps(topo spec.Topology, nodes []string) error { + var asyncOfflineComps = set.NewStringSet(spec.ComponentPump, spec.ComponentTiKV, spec.ComponentTiFlash, spec.ComponentDrainer) + deletedNodes := set.NewStringSet(nodes...) + delAsyncOfflineComps := set.NewStringSet() + topo.IterInstance(func(instance spec.Instance) { + if deletedNodes.Exist(instance.ID()) { + if asyncOfflineComps.Exist(instance.ComponentName()) { + delAsyncOfflineComps.Insert(instance.ComponentName()) + } + } + }) + + if len(delAsyncOfflineComps.Slice()) > 0 { + return tui.PromptForConfirmOrAbortError(fmt.Sprintf( + "%s\nDo you want to continue? [y/N]:", color.YellowString( + "The component `%s` will become tombstone, maybe exists in several minutes or hours, after that you can use the prune command to clean it", + delAsyncOfflineComps.Slice()))) + } + return nil +} diff --git a/pkg/cluster/operation/check.go b/pkg/cluster/operation/check.go index 08e6a0c3df..682238533b 100644 --- a/pkg/cluster/operation/check.go +++ b/pkg/cluster/operation/check.go @@ -24,6 +24,7 @@ import ( "github.com/AstroProfundis/sysinfo" "github.com/pingcap/tidb-insight/collector/insight" + "github.com/pingcap/tiup/pkg/checkpoint" "github.com/pingcap/tiup/pkg/cluster/ctxt" "github.com/pingcap/tiup/pkg/cluster/module" "github.com/pingcap/tiup/pkg/cluster/spec" @@ -64,6 +65,7 @@ var ( CheckNameTHP = "thp" CheckNameDirPermission = "permission" CheckNameDirExist = "exist" + CheckNameTimeZone = "timezone" ) // CheckResult is the result of a check @@ -165,6 +167,16 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult { // check OS vendor switch osInfo.Vendor { + case "kylin": + msg := "kylin support is not fully tested, be careful" + result.Err = fmt.Errorf("%s (%s)", result.Msg, msg) + result.Warn = true + // VERSION_ID="V10" + if ver, _ := strconv.ParseFloat(strings.Trim(osInfo.Version, "V"), 64); ver < 10 { + result.Err = fmt.Errorf("%s %s not supported, use version V10 or higher(%s)", + osInfo.Name, osInfo.Release, msg) + return result + } case "amzn": // Amazon Linux 2 is based on CentOS 7 and is recommended for // AWS Graviton 2 (ARM64) deployments. @@ -177,8 +189,8 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult { // check version // CentOS 8 is known to be not working, and we don't have plan to support it // as of now, we may add support for RHEL 8 based systems in the future. - if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 7 || ver >= 8 { - result.Err = fmt.Errorf("%s %s not supported, use version 7 please", + if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 7 { + result.Err = fmt.Errorf("%s %s not supported, use version 8 please", osInfo.Name, osInfo.Release) return result } @@ -845,7 +857,8 @@ func CheckJRE(ctx context.Context, e ctxt.Executor, host string, topo *spec.Spec } // check if java cli is available - stdout, stderr, err := e.Execute(ctx, "java -version", false) + // the checkpoint part of context can't be shared between goroutines + stdout, stderr, err := e.Execute(checkpoint.NewContext(ctx), "java -version", false) if err != nil { results = append(results, &CheckResult{ Name: CheckNameCommand, @@ -938,3 +951,49 @@ func CheckDirIsExist(ctx context.Context, e ctxt.Executor, path string) []*Check return results } + +// CheckTimeZone performs checks if time zone is the same +func CheckTimeZone(ctx context.Context, topo *spec.Specification, host string, rawData []byte) []*CheckResult { + var results []*CheckResult + var insightInfo, pd0insightInfo insight.InsightInfo + if err := json.Unmarshal(rawData, &insightInfo); err != nil { + return append(results, &CheckResult{ + Name: CheckNameTimeZone, + Err: err, + }) + } + + if len(topo.PDServers) < 1 { + return append(results, &CheckResult{ + Name: CheckNameTimeZone, + Err: fmt.Errorf("no pd found"), + }) + } + // skip compare with itself + if topo.PDServers[0].Host == host { + return nil + } + pd0stdout, _, _ := ctxt.GetInner(ctx).GetOutputs(topo.PDServers[0].Host) + if err := json.Unmarshal(pd0stdout, &pd0insightInfo); err != nil { + return append(results, &CheckResult{ + Name: CheckNameTimeZone, + Err: err, + }) + } + + timezone := insightInfo.SysInfo.Node.Timezone + pd0timezone := pd0insightInfo.SysInfo.Node.Timezone + + if timezone == pd0timezone { + results = append(results, &CheckResult{ + Name: CheckNameTimeZone, + Msg: "time zone is the same as the first PD machine: " + timezone, + }) + } else { + results = append(results, &CheckResult{ + Name: CheckNameTimeZone, + Err: fmt.Errorf("time zone is %s, but the firt PD is %s", timezone, pd0timezone), + }) + } + return results +} diff --git a/pkg/cluster/operation/destroy.go b/pkg/cluster/operation/destroy.go index b92a62200c..44e59515f3 100644 --- a/pkg/cluster/operation/destroy.go +++ b/pkg/cluster/operation/destroy.go @@ -491,7 +491,7 @@ func DestroyClusterTombstone( defer tcpProxy.Close(closeC) pdEndpoints = tcpProxy.GetEndpoints() } - binlogClient, err := api.NewBinlogClient(pdEndpoints, tlsCfg) + binlogClient, err := api.NewBinlogClient(pdEndpoints, 5*time.Second, tlsCfg) if err != nil { return nil, err } diff --git a/pkg/cluster/operation/scale_in.go b/pkg/cluster/operation/scale_in.go index 2999e98da2..94fc3be0d7 100644 --- a/pkg/cluster/operation/scale_in.go +++ b/pkg/cluster/operation/scale_in.go @@ -180,7 +180,7 @@ func ScaleInCluster( defer tcpProxy.Close(closeC) pdEndpoints = tcpProxy.GetEndpoints() } - binlogClient, err := api.NewBinlogClient(pdEndpoints, tlsCfg) + binlogClient, err := api.NewBinlogClient(pdEndpoints, 5*time.Second, tlsCfg) if err != nil { return err } diff --git a/pkg/cluster/spec/alertmanager.go b/pkg/cluster/spec/alertmanager.go index a220715494..276a9997bf 100644 --- a/pkg/cluster/spec/alertmanager.go +++ b/pkg/cluster/spec/alertmanager.go @@ -108,11 +108,11 @@ func (c *AlertManagerComponent) Instances() []Instance { s.DeployDir, s.DataDir, }, - StatusFn: func(_ context.Context, _ *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.WebPort, "/-/ready", nil) + StatusFn: func(_ context.Context, timeout time.Duration, _ *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.WebPort, "/-/ready", timeout, nil) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.WebPort, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.WebPort, timeout, tlsCfg) }, }, topo: c.Topology, diff --git a/pkg/cluster/spec/cdc.go b/pkg/cluster/spec/cdc.go index 7a53b11921..82d5f79552 100644 --- a/pkg/cluster/spec/cdc.go +++ b/pkg/cluster/spec/cdc.go @@ -24,7 +24,7 @@ import ( "github.com/pingcap/tiup/pkg/cluster/ctxt" "github.com/pingcap/tiup/pkg/cluster/template/scripts" "github.com/pingcap/tiup/pkg/meta" - "golang.org/x/mod/semver" + "github.com/pingcap/tiup/pkg/tidbver" ) // CDCSpec represents the Drainer topology specification in topology.yaml @@ -104,11 +104,11 @@ func (c *CDCComponent) Instances() []Instance { Dirs: []string{ s.DeployDir, }, - StatusFn: func(_ context.Context, tlsCfg *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.Port, "/status", tlsCfg) + StatusFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.Port, "/status", timeout, tlsCfg) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.Port, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, c.Topology} if s.DataDir != "" { @@ -163,7 +163,7 @@ func (i *CDCInstance) InitConfig( globalConfig := topo.ServerConfigs.CDC instanceConfig := spec.Config - if semver.Compare(clusterVersion, "v4.0.13") == -1 { + if !tidbver.TiCDCSupportConfigFile(clusterVersion) { if len(globalConfig)+len(instanceConfig) > 0 { return perrs.New("server_config is only supported with TiCDC version v4.0.13 or later") } diff --git a/pkg/cluster/spec/drainer.go b/pkg/cluster/spec/drainer.go index 80676d46c4..66efadb4bc 100644 --- a/pkg/cluster/spec/drainer.go +++ b/pkg/cluster/spec/drainer.go @@ -22,6 +22,7 @@ import ( "strconv" "time" + "github.com/pingcap/tiup/pkg/cluster/api" "github.com/pingcap/tiup/pkg/cluster/ctxt" "github.com/pingcap/tiup/pkg/cluster/template/scripts" "github.com/pingcap/tiup/pkg/meta" @@ -47,6 +48,31 @@ type DrainerSpec struct { OS string `yaml:"os,omitempty"` } +// Status queries current status of the instance +func (s *DrainerSpec) Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdList ...string) string { + if timeout < time.Second { + timeout = statusQueryTimeout + } + + state := statusByHost(s.Host, s.Port, "/status", timeout, tlsCfg) + + if s.Offline { + binlogClient, err := api.NewBinlogClient(pdList, timeout, tlsCfg) + if err != nil { + return state + } + id := s.Host + ":" + strconv.Itoa(s.Port) + tombstone, _ := binlogClient.IsDrainerTombstone(ctx, id) + + if tombstone { + state = "Tombstone" + } else { + state = "Pending Offline" + } + } + return state +} + // Role returns the component role of the instance func (s *DrainerSpec) Role() string { return ComponentDrainer @@ -104,11 +130,9 @@ func (c *DrainerComponent) Instances() []Instance { s.DeployDir, s.DataDir, }, - StatusFn: func(_ context.Context, tlsCfg *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.Port, "/status", tlsCfg) - }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.Port, tlsCfg) + StatusFn: s.Status, + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, c.Topology}) } diff --git a/pkg/cluster/spec/grafana.go b/pkg/cluster/spec/grafana.go index 42af998589..0aa56b4a0e 100644 --- a/pkg/cluster/spec/grafana.go +++ b/pkg/cluster/spec/grafana.go @@ -114,11 +114,11 @@ func (c *GrafanaComponent) Instances() []Instance { Dirs: []string{ s.DeployDir, }, - StatusFn: func(_ context.Context, _ *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.Port, "", nil) + StatusFn: func(_ context.Context, timeout time.Duration, _ *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.Port, "", timeout, nil) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.Port, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, topo: c.Topology, diff --git a/pkg/cluster/spec/instance.go b/pkg/cluster/spec/instance.go index d69f7884b1..1956e003e3 100644 --- a/pkg/cluster/spec/instance.go +++ b/pkg/cluster/spec/instance.go @@ -94,8 +94,8 @@ type Instance interface { DeployDir() string UsedPorts() []int UsedDirs() []string - Status(ctx context.Context, tlsCfg *tls.Config, pdList ...string) string - Uptime(ctx context.Context, tlsCfg *tls.Config) time.Duration + Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdList ...string) string + Uptime(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration DataDir() string LogDir() string OS() string // only linux supported now @@ -139,8 +139,8 @@ type BaseInstance struct { Ports []int Dirs []string - StatusFn func(ctx context.Context, tlsCfg *tls.Config, pdHosts ...string) string - UptimeFn func(ctx context.Context, tlsCfg *tls.Config) time.Duration + StatusFn func(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdHosts ...string) string + UptimeFn func(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration } // Ready implements Instance interface @@ -464,11 +464,11 @@ func (i *BaseInstance) UsedDirs() []string { } // Status implements Instance interface -func (i *BaseInstance) Status(ctx context.Context, tlsCfg *tls.Config, pdList ...string) string { - return i.StatusFn(ctx, tlsCfg, pdList...) +func (i *BaseInstance) Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdList ...string) string { + return i.StatusFn(ctx, timeout, tlsCfg, pdList...) } // Uptime implements Instance interface -func (i *BaseInstance) Uptime(ctx context.Context, tlsCfg *tls.Config) time.Duration { - return i.UptimeFn(ctx, tlsCfg) +func (i *BaseInstance) Uptime(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return i.UptimeFn(ctx, timeout, tlsCfg) } diff --git a/pkg/cluster/spec/monitoring.go b/pkg/cluster/spec/monitoring.go index 9587cf4a8d..ccf21a949a 100644 --- a/pkg/cluster/spec/monitoring.go +++ b/pkg/cluster/spec/monitoring.go @@ -127,11 +127,11 @@ func (c *MonitorComponent) Instances() []Instance { s.DeployDir, s.DataDir, }, - StatusFn: func(_ context.Context, _ *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.Port, "/-/ready", nil) + StatusFn: func(_ context.Context, timeout time.Duration, _ *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.Port, "/-/ready", timeout, nil) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.Port, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, c.Topology} if s.NgPort > 0 { diff --git a/pkg/cluster/spec/pd.go b/pkg/cluster/spec/pd.go index fd47a02769..e6ac6451a1 100644 --- a/pkg/cluster/spec/pd.go +++ b/pkg/cluster/spec/pd.go @@ -54,9 +54,13 @@ type PDSpec struct { } // Status queries current status of the instance -func (s *PDSpec) Status(ctx context.Context, tlsCfg *tls.Config, _ ...string) string { +func (s *PDSpec) Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, _ ...string) string { + if timeout < time.Second { + timeout = statusQueryTimeout + } + addr := fmt.Sprintf("%s:%d", s.Host, s.ClientPort) - pc := api.NewPDClient(ctx, []string{addr}, statusQueryTimeout, tlsCfg) + pc := api.NewPDClient(ctx, []string{addr}, timeout, tlsCfg) // check health err := pc.CheckHealth() @@ -138,8 +142,8 @@ func (c *PDComponent) Instances() []Instance { s.DataDir, }, StatusFn: s.Status, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.ClientPort, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.ClientPort, timeout, tlsCfg) }, }, topo: c.Topology, diff --git a/pkg/cluster/spec/profile.go b/pkg/cluster/spec/profile.go index cf852cb2e7..7ad4ba7c5d 100644 --- a/pkg/cluster/spec/profile.go +++ b/pkg/cluster/spec/profile.go @@ -59,14 +59,19 @@ var initialized = false // The directory will be created before return if it does not already exist. func Initialize(base string) error { tiupData := os.Getenv(tiuplocaldata.EnvNameComponentDataDir) - if tiupData == "" { + tiupHome := os.Getenv(tiuplocaldata.EnvNameHome) + + switch { + case tiupData != "": + profileDir = tiupData + case tiupHome != "": + profileDir = path.Join(tiupHome, tiuplocaldata.StorageParentDir, base) + default: homeDir, err := getHomeDir() if err != nil { return errors.Trace(err) } profileDir = path.Join(homeDir, ".tiup", tiuplocaldata.StorageParentDir, base) - } else { - profileDir = tiupData } clusterBaseDir := filepath.Join(profileDir, TiUPClusterDir) diff --git a/pkg/cluster/spec/pump.go b/pkg/cluster/spec/pump.go index ddea53e97c..0a5e210a58 100644 --- a/pkg/cluster/spec/pump.go +++ b/pkg/cluster/spec/pump.go @@ -19,8 +19,10 @@ import ( "fmt" "os" "path/filepath" + "strconv" "time" + "github.com/pingcap/tiup/pkg/cluster/api" "github.com/pingcap/tiup/pkg/cluster/ctxt" "github.com/pingcap/tiup/pkg/cluster/template/scripts" "github.com/pingcap/tiup/pkg/meta" @@ -45,6 +47,31 @@ type PumpSpec struct { OS string `yaml:"os,omitempty"` } +// Status queries current status of the instance +func (s *PumpSpec) Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdList ...string) string { + if timeout < time.Second { + timeout = statusQueryTimeout + } + + state := statusByHost(s.Host, s.Port, "/status", timeout, tlsCfg) + + if s.Offline { + binlogClient, err := api.NewBinlogClient(pdList, timeout, tlsCfg) + if err != nil { + return state + } + id := s.Host + ":" + strconv.Itoa(s.Port) + tombstone, _ := binlogClient.IsPumpTombstone(ctx, id) + + if tombstone { + state = "Tombstone" + } else { + state = "Pending Offline" + } + } + return state +} + // Role returns the component role of the instance func (s *PumpSpec) Role() string { return ComponentPump @@ -102,11 +129,9 @@ func (c *PumpComponent) Instances() []Instance { s.DeployDir, s.DataDir, }, - StatusFn: func(_ context.Context, tlsCfg *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.Port, "/status", tlsCfg) - }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.Port, tlsCfg) + StatusFn: s.Status, + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.Port, timeout, tlsCfg) }, }, c.Topology}) } diff --git a/pkg/cluster/spec/spec.go b/pkg/cluster/spec/spec.go index 72c7f3fdc4..19c62cf0f5 100644 --- a/pkg/cluster/spec/spec.go +++ b/pkg/cluster/spec/spec.go @@ -20,6 +20,7 @@ import ( "path/filepath" "reflect" "strings" + "sync" "time" "github.com/creasty/defaults" @@ -30,11 +31,10 @@ import ( "github.com/pingcap/tiup/pkg/cluster/template/scripts" "github.com/pingcap/tiup/pkg/meta" "github.com/pingcap/tiup/pkg/proxy" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/tui" - "github.com/pingcap/tiup/pkg/utils" clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" - "golang.org/x/mod/semver" ) const ( @@ -158,7 +158,7 @@ type Topology interface { ComponentsByStartOrder() []Component ComponentsByStopOrder() []Component ComponentsByUpdateOrder() []Component - IterInstance(fn func(instance Instance)) + IterInstance(fn func(instance Instance), concurrency ...int) GetMonitoredOptions() *MonitoredOptions // count how many time a path is used by instances in cluster CountDir(host string, dir string) int @@ -412,12 +412,12 @@ func (s *Specification) GetPDList() []string { // AdjustByVersion modify the spec by cluster version. func (s *Specification) AdjustByVersion(clusterVersion string) { // CDC does not support data dir for version below v4.0.13, and also v5.0.0-rc, set it to empty. - if semver.Compare(clusterVersion, "v4.0.13") == -1 || clusterVersion == "v5.0.0-rc" { + if !tidbver.TiCDCSupportConfigFile(clusterVersion) { for _, server := range s.CDCServers { server.DataDir = "" } } - if semver.Compare(clusterVersion, "v5.4.0") >= 0 || strings.Contains(clusterVersion, utils.NightlyVersionAlias) { + if tidbver.NgMonitorDeployByDefault(clusterVersion) { for _, m := range s.Monitors { if m.NgPort == 0 { m.NgPort = 12020 @@ -427,8 +427,12 @@ func (s *Specification) AdjustByVersion(clusterVersion string) { } // GetDashboardAddress returns the cluster's dashboard addr -func (s *Specification) GetDashboardAddress(ctx context.Context, tlsCfg *tls.Config, pdList ...string) (string, error) { - pc := api.NewPDClient(ctx, pdList, statusQueryTimeout, tlsCfg) +func (s *Specification) GetDashboardAddress(ctx context.Context, tlsCfg *tls.Config, timeout time.Duration, pdList ...string) (string, error) { + if timeout < time.Second { + timeout = statusQueryTimeout + } + + pc := api.NewPDClient(ctx, pdList, timeout, tlsCfg) dashboardAddr, err := pc.GetDashboardAddress() if err != nil { return "", err @@ -727,12 +731,28 @@ func (s *Specification) IterComponent(fn func(comp Component)) { } // IterInstance iterates all instances in component starting order -func (s *Specification) IterInstance(fn func(instance Instance)) { +func (s *Specification) IterInstance(fn func(instance Instance), concurrency ...int) { + maxWorkers := 1 + wg := sync.WaitGroup{} + if len(concurrency) > 0 && concurrency[0] > 1 { + maxWorkers = concurrency[0] + } + workerPool := make(chan struct{}, maxWorkers) + for _, comp := range s.ComponentsByStartOrder() { for _, inst := range comp.Instances() { - fn(inst) + wg.Add(1) + workerPool <- struct{}{} + go func(inst Instance) { + defer func() { + <-workerPool + wg.Done() + }() + fn(inst) + }(inst) } } + wg.Wait() } // IterHost iterates one instance for each host diff --git a/pkg/cluster/spec/spec_manager_test.go b/pkg/cluster/spec/spec_manager_test.go index 254fc39afd..76926878e2 100644 --- a/pkg/cluster/spec/spec_manager_test.go +++ b/pkg/cluster/spec/spec_manager_test.go @@ -101,7 +101,7 @@ func (t *TestTopology) ComponentsByUpdateOrder() []Component { return nil } -func (t *TestTopology) IterInstance(fn func(instance Instance)) { +func (t *TestTopology) IterInstance(fn func(instance Instance), concurrency ...int) { } func (t *TestTopology) GetMonitoredOptions() *MonitoredOptions { diff --git a/pkg/cluster/spec/spec_test.go b/pkg/cluster/spec/spec_test.go index b9fa52ef55..2c63e49426 100644 --- a/pkg/cluster/spec/spec_test.go +++ b/pkg/cluster/spec/spec_test.go @@ -740,8 +740,6 @@ cdc_servers: "v5.1.0": {true, true, true}, "v5.0.0-rc": {false, false, false}, - "v5.1.0-alpha": {true, true, false}, - "v5.2.0-alpha": {true, true, false}, "v6.0.0-alpha": {true, true, true}, "v6.1.0": {true, true, true}, "v99.0.0": {true, true, true}, diff --git a/pkg/cluster/spec/tidb.go b/pkg/cluster/spec/tidb.go index 046511b242..469dc22104 100644 --- a/pkg/cluster/spec/tidb.go +++ b/pkg/cluster/spec/tidb.go @@ -24,7 +24,7 @@ import ( "github.com/pingcap/tiup/pkg/cluster/ctxt" "github.com/pingcap/tiup/pkg/cluster/template/scripts" "github.com/pingcap/tiup/pkg/meta" - "golang.org/x/mod/semver" + "github.com/pingcap/tiup/pkg/tidbver" ) // TiDBSpec represents the TiDB topology specification in topology.yaml @@ -105,11 +105,11 @@ func (c *TiDBComponent) Instances() []Instance { Dirs: []string{ s.DeployDir, }, - StatusFn: func(_ context.Context, tlsCfg *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.StatusPort, "/status", tlsCfg) + StatusFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.StatusPort, "/status", timeout, tlsCfg) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.StatusPort, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.StatusPort, timeout, tlsCfg) }, }, c.Topology}) } @@ -146,7 +146,7 @@ func (i *TiDBInstance) InitConfig( AppendEndpoints(topo.Endpoints(deployUser)...). WithListenHost(i.GetListenHost()). WithAdvertiseAddr(spec.Host). - SupportSecureBootstrap(semver.Compare(clusterVersion, "v5.3.0") >= 0) + SupportSecureBootstrap(tidbver.TiDBSupportSecureBoot(clusterVersion)) fp := filepath.Join(paths.Cache, fmt.Sprintf("run_tidb_%s_%d.sh", i.GetHost(), i.GetPort())) if err := cfg.ConfigToFile(fp); err != nil { return err diff --git a/pkg/cluster/spec/tiflash.go b/pkg/cluster/spec/tiflash.go index 3fb7b33ac1..771edb8f23 100644 --- a/pkg/cluster/spec/tiflash.go +++ b/pkg/cluster/spec/tiflash.go @@ -34,8 +34,8 @@ import ( "github.com/pingcap/tiup/pkg/cluster/template/scripts" "github.com/pingcap/tiup/pkg/meta" "github.com/pingcap/tiup/pkg/set" + "github.com/pingcap/tiup/pkg/tidbver" "github.com/pingcap/tiup/pkg/utils" - "golang.org/x/mod/semver" "gopkg.in/yaml.v2" ) @@ -66,7 +66,7 @@ type TiFlashSpec struct { } // Status queries current status of the instance -func (s *TiFlashSpec) Status(ctx context.Context, tlsCfg *tls.Config, pdList ...string) string { +func (s *TiFlashSpec) Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdList ...string) string { storeAddr := fmt.Sprintf("%s:%d", s.Host, s.FlashServicePort) state := checkStoreStatus(ctx, storeAddr, tlsCfg, pdList...) if s.Offline && strings.ToLower(state) == "offline" { @@ -234,7 +234,7 @@ func (c *TiFlashComponent) Instances() []Instance { s.DataDir, }, StatusFn: s.Status, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { return 0 }, }, c.Topology}) @@ -363,7 +363,7 @@ func (i *TiFlashInstance) CheckIncorrectConfigs() error { // need to check the configuration after clusterVersion >= v4.0.9. func checkTiFlashStorageConfigWithVersion(clusterVersion string, config map[string]interface{}) (bool, error) { - if semver.Compare(clusterVersion, "v4.0.9") >= 0 || utils.Version(clusterVersion).IsNightly() { + if tidbver.TiFlashSupportMultiDisksDeployment(clusterVersion) { return checkTiFlashStorageConfig(config) } return false, nil @@ -388,7 +388,7 @@ func (i *TiFlashInstance) initTiFlashConfig(ctx context.Context, cfg *scripts.Ti pathConfig = fmt.Sprintf(`path: "%s"`, cfg.DataDir) } - if (semver.Compare(clusterVersion, "v4.0.12") >= 0 && semver.Compare(clusterVersion, "v5.0.0-rc") != 0) || utils.Version(clusterVersion).IsNightly() { + if tidbver.TiFlashDeprecatedUsersConfig(clusterVersion) { // For v4.0.12 or later, 5.0.0 or later, TiFlash can ignore these `user.*`, `quotas.*` settings deprecatedUsersConfig = "#" } else { @@ -429,7 +429,7 @@ func (i *TiFlashInstance) initTiFlashConfig(ctx context.Context, cfg *scripts.Ti topo := Specification{} - if semver.Compare(clusterVersion, "v5.4.0") >= 0 || utils.Version(clusterVersion).IsNightly() { + if tidbver.TiFlashNotNeedSomeConfig(clusterVersion) { // For 5.4.0 or later, TiFlash can ignore application.runAsDaemon setting daemonConfig = "#" } else { @@ -499,7 +499,7 @@ func (i *TiFlashInstance) InitTiFlashLearnerConfig(ctx context.Context, cfg *scr firstDataDir := strings.Split(cfg.DataDir, ",")[0] - if semver.Compare(clusterVersion, "v4.0.5") >= 0 || utils.Version(clusterVersion).IsNightly() { + if tidbver.TiFlashSupportAdvertiseStatusAddr(clusterVersion) { statusAddr = fmt.Sprintf(`server.status-addr: "0.0.0.0:%[2]d" server.advertise-status-addr: "%[1]s:%[2]d"`, cfg.IP, cfg.FlashProxyStatusPort) } else { diff --git a/pkg/cluster/spec/tikv.go b/pkg/cluster/spec/tikv.go index b4af65e067..7cc1478625 100644 --- a/pkg/cluster/spec/tikv.go +++ b/pkg/cluster/spec/tikv.go @@ -84,7 +84,7 @@ func checkStoreStatus(ctx context.Context, storeAddr string, tlsCfg *tls.Config, } // Status queries current status of the instance -func (s *TiKVSpec) Status(ctx context.Context, tlsCfg *tls.Config, pdList ...string) string { +func (s *TiKVSpec) Status(ctx context.Context, timeout time.Duration, tlsCfg *tls.Config, pdList ...string) string { storeAddr := addr(s) state := checkStoreStatus(ctx, storeAddr, tlsCfg, pdList...) if s.Offline && strings.ToLower(state) == "offline" { @@ -183,8 +183,8 @@ func (c *TiKVComponent) Instances() []Instance { s.DataDir, }, StatusFn: s.Status, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { - return UptimeByHost(s.Host, s.StatusPort, tlsCfg) + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + return UptimeByHost(s.Host, s.StatusPort, timeout, tlsCfg) }, }, c.Topology}) } diff --git a/pkg/cluster/spec/tispark.go b/pkg/cluster/spec/tispark.go index bc9199d77d..fb68e0b450 100644 --- a/pkg/cluster/spec/tispark.go +++ b/pkg/cluster/spec/tispark.go @@ -151,10 +151,10 @@ func (c *TiSparkMasterComponent) Instances() []Instance { Dirs: []string{ s.DeployDir, }, - StatusFn: func(_ context.Context, tlsCfg *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.WebPort, "", tlsCfg) + StatusFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.WebPort, "", timeout, tlsCfg) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { return 0 }, }, @@ -332,10 +332,10 @@ func (c *TiSparkWorkerComponent) Instances() []Instance { Dirs: []string{ s.DeployDir, }, - StatusFn: func(_ context.Context, tlsCfg *tls.Config, _ ...string) string { - return statusByHost(s.Host, s.WebPort, "", tlsCfg) + StatusFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config, _ ...string) string { + return statusByHost(s.Host, s.WebPort, "", timeout, tlsCfg) }, - UptimeFn: func(_ context.Context, tlsCfg *tls.Config) time.Duration { + UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration { return 0 }, }, diff --git a/pkg/cluster/spec/util.go b/pkg/cluster/spec/util.go index 0e1a523ccb..49a790e927 100644 --- a/pkg/cluster/spec/util.go +++ b/pkg/cluster/spec/util.go @@ -124,8 +124,12 @@ func LoadClientCert(dir string) (*tls.Config, error) { } // statusByHost queries current status of the instance by http status api. -func statusByHost(host string, port int, path string, tlsCfg *tls.Config) string { - client := utils.NewHTTPClient(statusQueryTimeout, tlsCfg) +func statusByHost(host string, port int, path string, timeout time.Duration, tlsCfg *tls.Config) string { + if timeout < time.Second { + timeout = statusQueryTimeout + } + + client := utils.NewHTTPClient(timeout, tlsCfg) scheme := "http" if tlsCfg != nil { @@ -145,14 +149,18 @@ func statusByHost(host string, port int, path string, tlsCfg *tls.Config) string } // UptimeByHost queries current uptime of the instance by http Prometheus metric api. -func UptimeByHost(host string, port int, tlsCfg *tls.Config) time.Duration { +func UptimeByHost(host string, port int, timeout time.Duration, tlsCfg *tls.Config) time.Duration { + if timeout < time.Second { + timeout = statusQueryTimeout + } + scheme := "http" if tlsCfg != nil { scheme = "https" } url := fmt.Sprintf("%s://%s:%d/metrics", scheme, host, port) - client := utils.NewHTTPClient(statusQueryTimeout, tlsCfg) + client := utils.NewHTTPClient(timeout, tlsCfg) body, err := client.Get(context.TODO(), url) if err != nil || body == nil { diff --git a/pkg/cluster/task/check.go b/pkg/cluster/task/check.go index 5d26aae9b1..d9e2aa1978 100644 --- a/pkg/cluster/task/check.go +++ b/pkg/cluster/task/check.go @@ -37,6 +37,7 @@ var ( CheckTypeFIO = "fio" CheckTypePermission = "permission" ChecktypeIsExist = "exist" + CheckTypeTimeZone = "timezone" ) // place the check utilities are stored @@ -155,6 +156,8 @@ func (c *CheckSys) Execute(ctx context.Context) error { } // check partition mount options for data_dir storeResults(ctx, c.host, operator.CheckDirIsExist(ctx, e, c.checkDir)) + case CheckTypeTimeZone: + storeResults(ctx, c.host, operator.CheckTimeZone(ctx, c.topo, c.host, stdout)) } return nil diff --git a/pkg/cluster/template/config/prometheus.go b/pkg/cluster/template/config/prometheus.go index b21cb2846f..69ef056d2b 100644 --- a/pkg/cluster/template/config/prometheus.go +++ b/pkg/cluster/template/config/prometheus.go @@ -21,7 +21,7 @@ import ( "text/template" "github.com/pingcap/tiup/embed" - "golang.org/x/mod/semver" + "github.com/pingcap/tiup/pkg/tidbver" ) // PrometheusConfig represent the data to generate Prometheus config @@ -57,14 +57,11 @@ type PrometheusConfig struct { // NewPrometheusConfig returns a PrometheusConfig func NewPrometheusConfig(clusterName, clusterVersion string, enableTLS bool) *PrometheusConfig { cfg := &PrometheusConfig{ - ClusterName: clusterName, - TLSEnabled: enableTLS, + ClusterName: clusterName, + TLSEnabled: enableTLS, + HasTiKVAccelerateRules: tidbver.PrometheusHasTiKVAccelerateRules(clusterVersion), } - // tikv.accelerate.rules.yml was first introduced in v4.0.0 - if semver.Compare(clusterVersion, "v4.0.0") >= 0 { - cfg.HasTiKVAccelerateRules = true - } return cfg } diff --git a/pkg/cluster/template/scripts/cdc.go b/pkg/cluster/template/scripts/cdc.go index 4b4b6298f4..9775323544 100644 --- a/pkg/cluster/template/scripts/cdc.go +++ b/pkg/cluster/template/scripts/cdc.go @@ -20,7 +20,7 @@ import ( "text/template" "github.com/pingcap/tiup/embed" - "golang.org/x/mod/semver" + "github.com/pingcap/tiup/pkg/tidbver" ) // CDCScript represent the data to generate cdc config @@ -126,25 +126,14 @@ func (c *CDCScript) AppendEndpoints(ends ...*PDScript) *CDCScript { func (c *CDCScript) PatchByVersion(clusterVersion, dataDir string) *CDCScript { // config support since v4.0.13, ignore v5.0.0-rc // the same to data-dir, but we treat it as --sort-dir - if semver.Compare(clusterVersion, "v4.0.13") >= 0 && clusterVersion != "v5.0.0-rc" { + if tidbver.TiCDCSupportConfigFile(clusterVersion) { c = c.WithConfigFileEnabled().WithDataDir(dataDir) } // cdc support --data-dir since v4.0.14 and v5.0.3 - if semver.Major(clusterVersion) == "v4" && semver.Compare(clusterVersion, "v4.0.14") >= 0 { + if tidbver.TiCDCSupportDataDir(clusterVersion) { c = c.WithDataDirEnabled() } - // for those version above v5.0.3, cdc does not support --data-dir - ignoreVersion := map[string]struct{}{ - "v5.1.0-alpha": {}, - "v5.2.0-alpha": {}, - } - if semver.Compare(clusterVersion, "v5.0.3") >= 0 { - if _, ok := ignoreVersion[clusterVersion]; !ok { - c = c.WithDataDirEnabled() - } - } - return c } diff --git a/pkg/cluster/template/scripts/tikv.go b/pkg/cluster/template/scripts/tikv.go index 33222da0e2..d5ba933f83 100644 --- a/pkg/cluster/template/scripts/tikv.go +++ b/pkg/cluster/template/scripts/tikv.go @@ -21,11 +21,7 @@ import ( "text/template" "github.com/pingcap/tiup/embed" - "golang.org/x/mod/semver" -) - -const ( - advertiseStatusAddrSupportedFrom = "v4.0.1" + "github.com/pingcap/tiup/pkg/tidbver" ) // TiKVScript represent the data to generate TiKV config @@ -55,7 +51,7 @@ func NewTiKVScript(version, ip string, port, statusPort int, deployDir, dataDir, DeployDir: deployDir, DataDir: dataDir, LogDir: logDir, - SupportAdvertiseStatusAddr: semver.Compare(version, advertiseStatusAddrSupportedFrom) >= 0, + SupportAdvertiseStatusAddr: tidbver.TiKVSupportAdvertiseStatusAddr(version), } } diff --git a/pkg/repository/testdata/manifests/root.json b/pkg/repository/testdata/manifests/root.json index 82144b743f..eb7de68e7b 100644 --- a/pkg/repository/testdata/manifests/root.json +++ b/pkg/repository/testdata/manifests/root.json @@ -1 +1 @@ -{"signatures":[{"keyid":"8ddc33c926240004eff0863b81a2f6a4bbf8861bba3f6fb2d606c284cb9a1a48","sig":"izKXX6mSLGBzWqfpxVKba8JUIlwweEoaO2V2ocpDMLThtwal5AG3IseFLlOFhawh6hZMzdnr0zuP3vfxrh5KpsTVgAbHWkYuScdR/fdxk5aFNGEx5wiNs7f5ILEue8/hg3nLN/Q5TTEaziC3Edud9dqE/y0aZpF5vRfoGngaFclEqA9mF+jr2N1dW+YTXQsjZ2VGdlaRAJAiq/BtcCvLeII9ZhlOwoCFxGlmC532dt0PbCP8HULatv1W3g4MeSdXZAF0fhGmhsVS8dya27XP6xXAbaBbs/hTIlexB/kRaXAd70XMFGVXBlaQZ6MNUYMMxpuDHB5xCSU3QiSMxd4MsQ=="},{"keyid":"10b0d4973ca384ddaed975f2c0551aed1b3f0a36602e4df1ae9cb59e5409b0ad","sig":"RG/Poo7RJ/opEehhC9jHI8TZeBxE925KQ5V42SXE66l/FXEVsAKhsUhZRBLonBSkufbYWt59sx9i5EjR7QwRqUJcyXi8CA1R2dYrT1hSF3nVD53gp/dj9wyw4BZWLlVVeGxnAXGe5M2CC31xztOMxIZJ28TpGxS0OLUVCUOHXy1mKl2u8+BX0iLj9TBbKbAO0gp09muzE1Tl4HD5lPDlLscivUpoTC9aLVyPDv8ezTfXFcqZhW9lS9qnToJ6IuXdcRg/xLql6RmZ086ZG+iYUEb17MB0spakLkdsV4XoQO1lupK8T2QssgLpBYApJSjAmvLDm+9eGftm5eEOKXne9Q=="},{"keyid":"793feef223a92b4ff1a0c8259bfae2eef9fc5aa4a2f4a018fbd9e46542195a52","sig":"S4k3zqejwVoCr6/v69p8IhjvbL+6VyDt6oDqxn+LzY24u2Q35VGXOwmpPmhjmrvrZzpDUTri04ewR4s2aOSXJOJOXVLKUmcseQMLoxUqf2AiJ4QZQs4S8eCXt1+7VafHIjBl01B2cK8dLYKH09lcj5hS9TpmplqkdYjGYxIVLxMwaIReByIZmdPib33EDxjftNro56KEEIXTO3akWv3MPlc1FnRL0Lz/01bUUXFIwJZsFVcJHp9zPgnqJ+smkrV1Hsj8LnvhyiaAxlvh7fhKuiiKH87g51BPXyJ0BFjIkjEqitgqYiHu/245eZfLDlToDovEDzr7WPSHzP0ombUvvg=="}],"signed":{"_type":"root","expires":"2031-10-21T08:19:55+08:00","roles":{"index":{"keys":{"c7b9a2470b206ec002c02bf508b58df0f0a72474f27eae0e70a9836baa084f2d":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvk0fF7XTB2BFQv3+M5Gx\noqRn1WDv74OtvSNztn+xVhSa1QzMroFVIbFJfC5SriR1VbdiK4V///OBtuEACn9q\nTBlbAFQ7r41N+jogG0yT+26F3R08izs6KUd6RZiqHbn9Gn30dsrqkzWrxfuETLAJ\ndC2lKum8I7D/SvkX1GdpBI2t0h+5OQtNgaK1CgRMxSMYA8KNKvOs2ICQReKoLiG2\n/N7PGCzeXB+QczXgJcBs2kP1bAm3Zi6VJEJBkjfov+nM10SWBbbBPuhqeQzmSPmv\nnpg6m2m/T6jTdRqGGjmWm5xczOgabKo1Ums24WpcGwCZBFogeRnmiVDm7u8H3zpi\nsQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"10b0d4973ca384ddaed975f2c0551aed1b3f0a36602e4df1ae9cb59e5409b0ad":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0eYvswxGngF9+xvvDoyH\nZl49iB5iWDsYjAEaLsXn1wrpMkQBqxEiJJDO92ANJ3hjYYPgYbfJIsEKSLwq4iLD\nRm16sIngDRm0nWf+pIdKSvZhu3/9WZ2WNsAyf4tQyB+fG7m/45X6Aajm8A/o8fDj\nHuY0OZRE1om/PUhd9U1XNeNYDnG8NIdVP56SJC3x/s1Vo0CM1910dpryT1MCst5l\ng7RcfNJT09MP0yN1EuEmbpcVM5uoZPS1nAYJxJerxzd0SI/onH1kFqmQQfYZDCKc\nPt0Oxkelw4AsA7siCW4Iqe9pJuWD5AkZCarVK8aCNdQAk+LMFITipHZV2Wtzd3de\nHwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"793feef223a92b4ff1a0c8259bfae2eef9fc5aa4a2f4a018fbd9e46542195a52":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzr87ltVVJAa+GFjYsS7\nLuxyDyIhjRU3Lz9U7TfrjPI8V2znO+/pfz1D4ByWQK/KuT3STpoMci8K/YPC/vQQ\nO/Zg4RpsiZ4wS+HH3JpIqjaj9rAk2NOaFbK8ntNDtcXoeFjMT5yXTB+SGpvpPCRF\nG8/hnJVwNq6ouHzBc5iSs/yShSiRwADPeHgt09jg18zwbMYcfYWLjMVlxpFF/RpC\nUpYzs9XZ/exKOj4RbB/Ckl193r+Ve+UPIokEG5E/neVKyxa3dGcyglODLmZiSeE+\nBq2xTfTHi3ENYHpwAruBMvA46T3sryCJDEWjDj0EIhrMod7AiHCODQ6rGQSzcoKU\nvQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"8ddc33c926240004eff0863b81a2f6a4bbf8861bba3f6fb2d606c284cb9a1a48":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuqD5zVSWWUhcpZ4MgbfV\noq1RkQdY6hmoZXMwRrHTcru1tAcQHv+pqrkTU3P7T1mKeX9YMbG63GSBQJQuAxrF\nHXwKU6geEwSBsP2b4c6dZ8srPLwwklA9Ilr6x1gd74YgN5LskUNjLo6YWp0trG0c\neMbQ1fD8Ng7qNxH1m7uZaPOXIoVBMEQvveGPGqEGYFmYw9nk+yKJA4ldl7nEVUq2\n1otty9yLYAB5D6At7Ve1G/V9bL0P1lQzuTXnWWsSenCDb+NhrPaFiXaKcOtBfAIF\nLbXL7oOu004ThnVmv9H0kGr3IHh4dsHOzxsVvwV90ysMDMVwWaMH/l1aYogt5i+f\naQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"c0bc219c07f04771557c54fac348c4d3a3122e715442d25021600d39274de064":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwFNV21CSUy8kBa93fn8T\n7kfR7WM4EekWQqHvGGsgYQ1cFiUp6YrLPS7zVSwAia1yriUtkFyZKN+g0cZOCSCq\nFWeKGR1wewwKb+5P/NGpzDzc4AlqeAs9CBjPKG75j47WJ+jG7q2JPhXiogZ9WJxn\nBe97U8G0sGnFHpby5CW10OEkQG1NltVruVXGk0fNtQw/tzfoXFNTiNO9rJfkSWAw\nkpiA44IWqv7UBGjD2aFhhd4Qe06o5cOp0WIyRAopTVfTzxvrmaqLLrOrNxQkdm0e\nY5c+/+IOS2iFn3xnEukpIQdnKJMRM18LK4wp/PYCroFkWf+itxN9qIU2tH6mnGHX\nEQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"db75ccab60452c4fde6c7a42a70d91b26f24bd56ae315dbd1acdf2356664f1e0":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuMmedZUl11SjJiGL3kba\nxTrs3p7p3j5ZQ14KcRdPULVuUi/e72OtUQJsNzCu7Q2n2Zh99smFizWpJnFDfn2s\nv5l46lE2xzfPw6JFnkpCua8rBWPEMzhi68pJNKfOPp4cVk1Rbu0TA+NCHMAF3QSb\nux6+a+71jvqayC9At+pJiR/8Kf0fP+tsdmp9XSQ/hQ9ZLV7VuE+1cTP0yhC94urr\nFZxlOpfXhyHkc1pABvbddadr0JMCv+pgEGjIdP51Z9R3KPOXzEkJCZ7fs2/VB7ny\nJ4PffEAl7eKA2RPKrPjyjcMOT8q+ST6/Mbe6YBUJVZckM3DrZi4O8P0Q4Meb1w8g\npwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":1}} \ No newline at end of file +{"signatures":[{"keyid":"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae","sig":"aptcBUxk5mIY3a2lqNChLU6dXUP/tcaIiwv7e/nQFZjsL3YOm9VG8OQzc4Sy+sv1DqFDvmwNZVp4FyfbPluXRyRgMRYJ194Z9Z1GXHQBmaWaVhMX9qpwzcSe8XNsReaDugHl+iJYfFif34vVm6fbhQgwxggXgJ37TbScVe3OB4LZ7RuSo3RExj3ojMkZr5wWtb4nFKd0VwfGH7KROmz06Pdok/k5PmI7spBLCFUWSAheVThA4jFXtlFPXGmbgBnPMRaRR5uWf59QFD0YQ4xTsJvWLHVmLtIgvDQnouVKYURXooCbYj/OfnvWIQIy3HzuEJC09ZQJokzpluhXaI8J+g=="},{"keyid":"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e","sig":"wENeklsuDdoRNLCvvzsD3sJRymbAjMNT/ZTWsPX7tdPtfvq6+jyvvAgXiPMM92Kvb/WUVjBp5lwD5txGfD/2QLWRER9eDbz0XoZ1hGbAERQCWW7BZIc0tgc7EDLoPUxNQBMVYvHi1XTn1kEZqXHu8lrDLSpL2jIRMJOuLqJv6mmBraxGOc+loIwH2hQkXCvp8C8fW9M/bK5YKzuV3FafKyLuCkqMV7AIkKH2PztPXEVDQ3Mhrxzz9P1q7d6E07Hee9FP/xSm2B4MR9eqHiQTJW+aH/9BI60OaWLNxOg2GEr3t72j7mgDZq4d5i99zWwDG3YyWNw7AXtcuPPvKl6Vzg=="},{"keyid":"818c3ab5ddd59a79d4cff76ebb594be56e5a630c05cfcae382f32e07899e7ab7","sig":"PVoqno+m+HiHzkE+wMskafuHU/WUGw/eT/QRkXKgmAdDce6C5yvEVM1H37OpMPvfAjf70Q9opdaxBpkiTo3637EJbHGo7Eqs61hyIYecbYP9/LMinBSQZNOaTdtMUMYB28Cm9rERZCekxs2izLnkwX0py+V3IvfATOKy8jes13fiUF44A27J0X0n8601WicrOrDK37c0pSg66sd4xg5TucMcDsdxlGRW6+puvXLjAt2xk+qHSzbFEoMramfagWBF+hveKcv+buoZ81+f/H+3VBiNAxtTQLgDDqHI5IqAf1HlT20ThNimmN9q8bonirxYx6xhn0y4HvXLOn6nwMrqLQ=="},{"keyid":"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002","sig":"VOIfdL0qGiHvHmCAu4vLG2s5Ny1+zBZ7ZovPFo8eJT8ppquUDR7POzNBlk+xgteCfUFx56imsvBxKu77zCIe2yT2FcwYdpzcDzaJqOxsEhdusZa7gXdvDVs+JYoZMtRWrjo9InfXVpT8s8SOKglQAnuwcS5/Y+5T5czdXqeWOW9Lnk0Xpt09PUrW3tqrVKhWq1WqRSIayCNV1nnlM3Tj2240DiuYiTEIZn95p8ThB0ZzNLPVNzrvs5/7ZjTdmYCeDSNRwseHO3XFPUOtApEvSWNwjhH4x/YJOo64hqwnaO99utN4jGOKcXkHwQpKPDWKRecgo5+n8VzEZeA+XKLvow=="},{"keyid":"5607181203a2fb60b9d725109388ccb19ccdc236a4b1d1441fbea7ad07616c4a","sig":"QkVHaGa0K8UBc146leEndu2RFQY6tBzoZXGQ9osUyzLVpn3706LLxwD70zOqDhKHaWnnyf5sd3wJrzlhHXjpz3p380xgparaSyEky5d7OB7s5mBToy2bnA7f85IX3sRq7eyb4gcZfFTiZaTT+ygWzPClJaZsiF8p+XzQSkBXXycn3xl8XKtP81+CQOwhdhF9l1oXSEVFKjwMZC9WG4X9ipLS1MPr7J08YVxiMpMKiXtTQtlPdbqP1r65dWDtdJ1y7zMcatWjYGY4JakIrawIcfYJlYrMpAGUzyxx/Tm21d85b+NzyNN7sMpoUKLNHS3vUHOD2a9vSCiwFTjIrsxJDQ=="}],"signed":{"_type":"root","expires":"2023-07-26T11:18:30+08:00","roles":{"index":{"keys":{"7fce7ec4f9c36d51dec7ec96065bb64958b743e46ea8141da668cd2ce58a9e61":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5kVA7MlBfSe7EBaExjl\nKbwoDkn1aYi74s29mFgtRo8nejbrVvZQMCIUhvKc0pFa/l9JD/QY6/nAOCE1lpzi\nwwNkSntfOo3p3HQIR+Ut7hZ4Sxfe/5JagGo3LQ+Hd3EJWUxyEfQ/Bff07F3XAbqM\n5+cKNrdsKWZJcPiJDW621qGwCx52f+gzl9bnFe4/hx34OUgirwqh5DS+LhIO+/yt\nbOiN1AyjQKlnb8lUnblElS4Njd+F4io5VzSrZYi2+4AbTkO6wLwbsWHMzXfv9qwn\nvllufOHpB6EwiQ/xBOMuvJJymHnZvs8AH4SuydQIXLaJuv1ysFaBs0KB/ktbakSK\nLwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"5607181203a2fb60b9d725109388ccb19ccdc236a4b1d1441fbea7ad07616c4a":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyDwCfCl30vhyJW7fB1bs\npRYKtBKzl7o0qnJTm+IksjQ8RXxj8osUpMLmSvOzCaJ5Wxe+Pm1LpSTDbbubbgvd\nnmEFL6228sifviNIu2HlIl+agfzmXuJ9OBlzGUaI4gAd1Z6pF6+mjlcjz2PbWF84\nAbXZdK49uluqulp7HrGB/qNjGcIRUCHgDU4nnq0OkI1BZZSKm9ovonqDkIK76x/S\niAD9OjKsjQ/s57tE+5WTVObKpfrfK0JeHdpAUsA/2n4L1Z6FmZD4LZWqb0i+C7xj\nMElC99KtjlwRntcjeVWG9YjU8AcEN0n1gON9S2oRdyyAzDTgGb7WueDnn6qstt5w\nSQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"818c3ab5ddd59a79d4cff76ebb594be56e5a630c05cfcae382f32e07899e7ab7":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA37V4zn8sYuhC5HbIos/6\nf3zhnr7WSnV0GtrOj2q6tCvo/1rGXDKbL8KJgLBHcQT6P732sm5BmZ+y8hRXZDqy\njTBqT70Vc0fGfCkH5Z0FU8WWlhQ2Ck3W20TxXPJY7p+wnuUCmcLzD7cKwUGOshjs\nyozqAMQ7C/HSmJFCUY8PaASvQCCg/YyMr3Ft8xpyc5IGmIi4NkVjf/JWIUFFv7kr\nIkRbT5K1nKJ2earot1TIcWUY2O4OvbhtueJ+IN0Lkdg+v98W/pvlF+ji24DBlcGw\nLdOeGRt5z6GnHKlAuZ/tbjRHeXnq1KxMETlXCgu2xCwsSK/10SE8oTaXbFoMHNBN\nAQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOgQkwLOh31QV9OpbO9v\n6o83durJFGPOnVXZiab83pKaSk7HEK9WzXBq0BaPvtFwSfROVdpgtopri5lZi+uH\naMKLUn5F8XRnSMl/7m5vM4XpZZYa4aQId4TWdbFtTu31eHGZ3eEC5nDRJ5NhZOJd\nKLFBu/xmxrh/eNZt4QbdWLZayjHnzyoy5AnfNTR6nJgPAv+rBOqyqT/r14q4Pngh\n3z0I3pNFr5qmxsp013XV+kgOW1F7zT7IMU8xRIgo85UWUNhax0/bjY/2NI1Z+WjR\nyhZmUBMVYWvfw97xDUrvBvrJxZPgg0lGvxJC6LF2dM7wgLaNx9khT6HMBVxjxLMs\nDQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnayxhw6KeoKK+Ax9RW6v\n66YjrpRpGLewLmSSAzJGX8nL5/a2nEbXbeF9po265KcBSFWol8jLBsmG56ruwwxp\noWWhJPncqGqy8wMeRMmTf7ATGa+tk+To7UAQD0MYzt7rRlIdpqi9Us3J6076Z83k\n2sxFnX9sVflhOsotGWL7hmrn/CJWxKsO6OVCoqbIlnJV8xFazE2eCfaDTIEEEgnh\nLIGDsmv1AN8ImUIn/hyKcm1PfhDZrF5qhEVhfz5D8aX3cUcEJw8BvCaNloXyHf+y\nDKjqO/dJ7YFWVt7nPqOvaEkBQGMd54ETJ/BbO9r3WTsjXKleoPovBSQ/oOxApypb\nNQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0kgU3v3SxYzm5J6P+GPP\nmy6toBnKYtTViAVmpUJiIEjdZ9NLpoJU0na9q0CD8sIgo2Js/W/owJUvSj6rm8us\nsu/Ve5KsoJN6zca2am1uZ5IKnc48i0mCv76WXawCxM+NFGqSCMJcltlhj3fC/GDS\ngu+BiIbrgR1PgJf6Jk6l7uMJdN3TL6JJQcEC4lz+2hj5zoVNYkq06ZC79j2tPDCI\nkTAYGF/TAAVLH08/kGH5ZeRPlVKJ7cwW3OniLM5NeFnS8+shRNb6AYr7xju3Ikbw\nDo14ipIghBI0iAxn6Lvr/iilc7TM7RWJ4OiTrmK3SQSJ+U6H2N2/I5OGEHBEKzbA\nOQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"8660a9f40687fb33e6f8ad563f21ee81b9ce7b91c90827cc7ae2416c5e0e94e9":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqTZx29eJR5EumjqM4YTb\nFlKbim1GNYmtbCLH51BbU2lt46ddmfGvtGsxTD3mIZ/GEHVFv6Aei3xx5nIfhGP0\nrG78JRz394uU8Pd62DiIFWYizr5o+ZBZu29D2YK5ZtxoLFpgt0ibnINK2NcesDC8\nSqfIUbMiQFT6yB/MYD275SjfRGHOeYTPmKdjMJrhLL2cfIPYnQ0QFYIyMvXBG1Fj\nU0rc9UclYQHh9YheIDVYI9YCo/DWP3KFfRJpoTjQRGoPSK9TXcpCAEzQpEG3jOek\n9PdV9Ol6/O8JbrFwXWF3LhkUThg+zCjV4qHtP4oqp5QCqzTQTXGQ9qxWUSlHi4Eu\nIwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"66d4ea1da00076c822a6e1b4df5eb1e529eb38f6edcedff323e62f2bfe3eaddd":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzTgV5iKhMnunUDxt4PB\npYqTMPaJN/ZdOOsP6cS3DeCE/EcYGfgCjvP7KD3gjG98VDBTVcuwZClSy+/zvHhV\nIq7VWu+yxQL5c6oa1xpCyHoA96JiLIDPhmqEdscdRybcRQ2CYywzKA8jSwEQCnEK\nc8a74ceY352l/MEcOem0+AtKrOjqcjbXCayDwC9yTg/c78bkp+4T8AhSWgt6Tlrt\nY8jLE7zwojFtIYtMwobWRIW2O3nJDXiSBbTPG3M9kF1G43INshSdBcuq5Tmy8lpE\n/XiG/E7+hP63Hm+KAcdvl553Zs7pLhAZxV0kqlApqRRwhscw+JQci8sVONun5t9t\nNwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":3}} \ No newline at end of file diff --git a/pkg/repository/testdata/polluted/bin/root.json b/pkg/repository/testdata/polluted/bin/root.json index 78e85862f0..eb7de68e7b 100644 --- a/pkg/repository/testdata/polluted/bin/root.json +++ b/pkg/repository/testdata/polluted/bin/root.json @@ -1 +1 @@ -{"signatures":[{"keyid":"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae","sig":"jDFZCtE+VfJtpXJk5m5/TwIOpvkJe08+HWKCfPAhERKlqrGPAAdgLnXqftzZhcmDSR3uP2qxwqAZSO/ZUrWsie7XT5Xutva9SL//UXIk2N7RwS/PjN4AcaJydm4+V37h/sowlFz3nxeKobj21wpUAw/KxcY7mqu+XhLiPM2f5yhuGBC6MeoqBN5tlqCGoadHkGYibqXNS/1aBAtk/vCrCv86PRL3yzpfpKUB3ElyJJaQR2zUr5bqPNen31/qM2xxGp/amN7UxXddtAPGfZ2CNI959puyoTXwRULXS8J74BM8Lg7TAkDr+n9hkjmXi3MNhulPb5luPJ/eGQYw9l/vnw=="},{"keyid":"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e","sig":"sa9m4ftMfe9PsnLA2pgUsTdv48tyJlSo2g0NYAnGBt81P5Ky+dYdWoplsJIgsvgF5rjd1JDt6eybh/ozlWKvyAG+ge8yWQkiaBMVofSTVpm1OovuLQ015NP78lfVSqUb4MaFBgfoqChszAk7Kx/av0DymLSiN7qhFsxf68naau9R83Ao2RSTc8QxJeTqoiJvgVRc9ILHoaVjhqEixGfcLPUKG3gLEyYglZSk3F1ixIa29/QHj2B7ICzS4Hceyk1RKKIUCcX3zF+eh29tZdGU7sZPnKlt2svzAfy1xiMUJikugQBucvvFox/txU2Tp2+rP3qgP6poZ/j1uxI9JaDaUQ=="},{"keyid":"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002","sig":"Bsn2hbGAZH9kpEJx5za7XMdtJI/QSlKDy00JDo8/Jdnjqp1AVMhKbbl6KedNHfwb5OPmohJzT6ukASUqTzCcMPjJAZCKPJWDS9vrrtc9Nqvdfn2kIYj41pLNOdFBiKa79x6Rio+jLdL81Nt8T0d/izMfGO2vJ+LkZElUGG8VDj19UWRKKZPp/V3oFBfGIRemJWbDBsTt9cVwNa9ed3OXS01qS4/asrd9l19BQ+tZfZ+dXzDuMlv1THJNWB5UAdv0Ku7lSeV87oGOVMD4gkfdWAzFioT+hwXF8f3JUobNskyZIJTMqNPHST+ACJgQjgLH0FkN8xjw+YYv/ktgoZrSIA=="},{"keyid":"2001b18089c9a865cebee793dbc23f9b1f5ce457f96b8d0b2c0909c26b00c643","sig":"Ca+w4Cf7avansD74a014IUJBobcCz+X8aIbmWma9Ch8Ccdksedgf6MEWi0fHUJXloLauLP/I56PzhzfvB+0+YgO9lMkECkEcjed2NC0YCuRDZ07q8ndsZPQ94KKg7BWXo+1xXkDz5W7AKpFYdxYnAWfVSpvc/iceTd3bX+3vz4bs/FiyZtFig6rTWdS+gKrGTqFJ//AOP+9iC3kheSEZXlXV2HS0EB8s461PqSpdMLcXBughRSIzbFHPid+5Nch0zJzCIuLXjZE7n2w1M+9j5eyF9USga5cjQiXIJ0LTINSzFkPjuUk3PzWYkNobGr9fxlrePzUHlzFEGHz8kxG0gQ=="},{"keyid":"545c31fd615bbaa4c5424509a9305eb280e019996b043a576dc12b758aa0890a","sig":"ftsm8N54OgIHhFrIKDnCrocY+rxCzZBgjyX37Ixm2vJifk3RhXA2cUEQepqFcRKH1oEmt90lzV6VWqy1EUUzYJSGA6edq2tix6nntcRgDJkIqCAPViBgaR1OCKFhf/2ldRvnjtuOkG6h+5qAmuAB51DdDHGjHW+DKvxflTK7p59cSZLvmJImPWYTz2qF1U+IKMSb7glYVqXUsFKUq5GP7gawE8Ez/2N0bMkD9s6GPtErCGxIkH2x1/5eYLVlbdGwy/PsW1/cE2uRAGCsPC6NknlWXYHFXYVgJWJ16H9H7Ih2NfkizBOwhWkVr+VPLkXllo9HutxSkNl2dEk4rAzzDQ=="}],"signed":{"_type":"root","expires":"2022-05-26T11:18:30+08:00","roles":{"index":{"keys":{"7fce7ec4f9c36d51dec7ec96065bb64958b743e46ea8141da668cd2ce58a9e61":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5kVA7MlBfSe7EBaExjl\nKbwoDkn1aYi74s29mFgtRo8nejbrVvZQMCIUhvKc0pFa/l9JD/QY6/nAOCE1lpzi\nwwNkSntfOo3p3HQIR+Ut7hZ4Sxfe/5JagGo3LQ+Hd3EJWUxyEfQ/Bff07F3XAbqM\n5+cKNrdsKWZJcPiJDW621qGwCx52f+gzl9bnFe4/hx34OUgirwqh5DS+LhIO+/yt\nbOiN1AyjQKlnb8lUnblElS4Njd+F4io5VzSrZYi2+4AbTkO6wLwbsWHMzXfv9qwn\nvllufOHpB6EwiQ/xBOMuvJJymHnZvs8AH4SuydQIXLaJuv1ysFaBs0KB/ktbakSK\nLwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"2001b18089c9a865cebee793dbc23f9b1f5ce457f96b8d0b2c0909c26b00c643":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1LB2sQGelCEaKTKPzdim\n5V0RrdDOyZTSsZlWjzqZQn7lIRKG9Yjah//ReBdy3gmTwbZWUYzGFeclS+1+H05f\nvvxJUN1ttNgy6xsKql6s1ZhdwoBLbkjTqHjbRRQ2+fMJQdhusb1TXEP5Vut2jlyo\nSoGSa9mDC0VbGW9Xs/4HqfyH6m4dV6GeFYwDUX0ok6l6DHk28UIFyieKITFNkrKv\n5xoUPS3P49tX7wprXiFBKiP1Tr72O+GSTBFXuUhPASBVCXoxj7g5fB024P464ku/\nTHECfX1F5q7htz2zkgn7V9A9kedASwoqbrC5glHXfrfiQOctHkyKaGLswWe+8OAp\n5wIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"545c31fd615bbaa4c5424509a9305eb280e019996b043a576dc12b758aa0890a":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzlxJStPfdjMERTUs2GH\nMKMPAflgMTId3rhKsyLGAoRraAE3+crZEkXz+sEgCSW7590qDofcZYFeS9QOebD2\nI1/PYbDqMOwWkRSta6BRJyhgGKmG8QuxiYQQEQSgBhTQap3jnxiduXiZ+6uTiNkS\n44/Z12GN+vXLDLCVBlxFZx2Am9QFVCyP7f9Dxj0EkaVKRGu6+utjaWGyQLq5splk\nNbFvMLYJLkzrk8dzLwr1E85NRCAVLnRJR4fYllglJmJi6laHdOgXf9GOL1vQ/qUh\nRXqYkGiZ/15vurMMyUaIdzLY95XHw6vsjOwV9kBs8z/cxBVLxpNWUiOBsfDpmBc3\nCwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOgQkwLOh31QV9OpbO9v\n6o83durJFGPOnVXZiab83pKaSk7HEK9WzXBq0BaPvtFwSfROVdpgtopri5lZi+uH\naMKLUn5F8XRnSMl/7m5vM4XpZZYa4aQId4TWdbFtTu31eHGZ3eEC5nDRJ5NhZOJd\nKLFBu/xmxrh/eNZt4QbdWLZayjHnzyoy5AnfNTR6nJgPAv+rBOqyqT/r14q4Pngh\n3z0I3pNFr5qmxsp013XV+kgOW1F7zT7IMU8xRIgo85UWUNhax0/bjY/2NI1Z+WjR\nyhZmUBMVYWvfw97xDUrvBvrJxZPgg0lGvxJC6LF2dM7wgLaNx9khT6HMBVxjxLMs\nDQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnayxhw6KeoKK+Ax9RW6v\n66YjrpRpGLewLmSSAzJGX8nL5/a2nEbXbeF9po265KcBSFWol8jLBsmG56ruwwxp\noWWhJPncqGqy8wMeRMmTf7ATGa+tk+To7UAQD0MYzt7rRlIdpqi9Us3J6076Z83k\n2sxFnX9sVflhOsotGWL7hmrn/CJWxKsO6OVCoqbIlnJV8xFazE2eCfaDTIEEEgnh\nLIGDsmv1AN8ImUIn/hyKcm1PfhDZrF5qhEVhfz5D8aX3cUcEJw8BvCaNloXyHf+y\nDKjqO/dJ7YFWVt7nPqOvaEkBQGMd54ETJ/BbO9r3WTsjXKleoPovBSQ/oOxApypb\nNQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0kgU3v3SxYzm5J6P+GPP\nmy6toBnKYtTViAVmpUJiIEjdZ9NLpoJU0na9q0CD8sIgo2Js/W/owJUvSj6rm8us\nsu/Ve5KsoJN6zca2am1uZ5IKnc48i0mCv76WXawCxM+NFGqSCMJcltlhj3fC/GDS\ngu+BiIbrgR1PgJf6Jk6l7uMJdN3TL6JJQcEC4lz+2hj5zoVNYkq06ZC79j2tPDCI\nkTAYGF/TAAVLH08/kGH5ZeRPlVKJ7cwW3OniLM5NeFnS8+shRNb6AYr7xju3Ikbw\nDo14ipIghBI0iAxn6Lvr/iilc7TM7RWJ4OiTrmK3SQSJ+U6H2N2/I5OGEHBEKzbA\nOQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"8660a9f40687fb33e6f8ad563f21ee81b9ce7b91c90827cc7ae2416c5e0e94e9":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqTZx29eJR5EumjqM4YTb\nFlKbim1GNYmtbCLH51BbU2lt46ddmfGvtGsxTD3mIZ/GEHVFv6Aei3xx5nIfhGP0\nrG78JRz394uU8Pd62DiIFWYizr5o+ZBZu29D2YK5ZtxoLFpgt0ibnINK2NcesDC8\nSqfIUbMiQFT6yB/MYD275SjfRGHOeYTPmKdjMJrhLL2cfIPYnQ0QFYIyMvXBG1Fj\nU0rc9UclYQHh9YheIDVYI9YCo/DWP3KFfRJpoTjQRGoPSK9TXcpCAEzQpEG3jOek\n9PdV9Ol6/O8JbrFwXWF3LhkUThg+zCjV4qHtP4oqp5QCqzTQTXGQ9qxWUSlHi4Eu\nIwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"66d4ea1da00076c822a6e1b4df5eb1e529eb38f6edcedff323e62f2bfe3eaddd":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzTgV5iKhMnunUDxt4PB\npYqTMPaJN/ZdOOsP6cS3DeCE/EcYGfgCjvP7KD3gjG98VDBTVcuwZClSy+/zvHhV\nIq7VWu+yxQL5c6oa1xpCyHoA96JiLIDPhmqEdscdRybcRQ2CYywzKA8jSwEQCnEK\nc8a74ceY352l/MEcOem0+AtKrOjqcjbXCayDwC9yTg/c78bkp+4T8AhSWgt6Tlrt\nY8jLE7zwojFtIYtMwobWRIW2O3nJDXiSBbTPG3M9kF1G43INshSdBcuq5Tmy8lpE\n/XiG/E7+hP63Hm+KAcdvl553Zs7pLhAZxV0kqlApqRRwhscw+JQci8sVONun5t9t\nNwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":2}} \ No newline at end of file +{"signatures":[{"keyid":"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae","sig":"aptcBUxk5mIY3a2lqNChLU6dXUP/tcaIiwv7e/nQFZjsL3YOm9VG8OQzc4Sy+sv1DqFDvmwNZVp4FyfbPluXRyRgMRYJ194Z9Z1GXHQBmaWaVhMX9qpwzcSe8XNsReaDugHl+iJYfFif34vVm6fbhQgwxggXgJ37TbScVe3OB4LZ7RuSo3RExj3ojMkZr5wWtb4nFKd0VwfGH7KROmz06Pdok/k5PmI7spBLCFUWSAheVThA4jFXtlFPXGmbgBnPMRaRR5uWf59QFD0YQ4xTsJvWLHVmLtIgvDQnouVKYURXooCbYj/OfnvWIQIy3HzuEJC09ZQJokzpluhXaI8J+g=="},{"keyid":"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e","sig":"wENeklsuDdoRNLCvvzsD3sJRymbAjMNT/ZTWsPX7tdPtfvq6+jyvvAgXiPMM92Kvb/WUVjBp5lwD5txGfD/2QLWRER9eDbz0XoZ1hGbAERQCWW7BZIc0tgc7EDLoPUxNQBMVYvHi1XTn1kEZqXHu8lrDLSpL2jIRMJOuLqJv6mmBraxGOc+loIwH2hQkXCvp8C8fW9M/bK5YKzuV3FafKyLuCkqMV7AIkKH2PztPXEVDQ3Mhrxzz9P1q7d6E07Hee9FP/xSm2B4MR9eqHiQTJW+aH/9BI60OaWLNxOg2GEr3t72j7mgDZq4d5i99zWwDG3YyWNw7AXtcuPPvKl6Vzg=="},{"keyid":"818c3ab5ddd59a79d4cff76ebb594be56e5a630c05cfcae382f32e07899e7ab7","sig":"PVoqno+m+HiHzkE+wMskafuHU/WUGw/eT/QRkXKgmAdDce6C5yvEVM1H37OpMPvfAjf70Q9opdaxBpkiTo3637EJbHGo7Eqs61hyIYecbYP9/LMinBSQZNOaTdtMUMYB28Cm9rERZCekxs2izLnkwX0py+V3IvfATOKy8jes13fiUF44A27J0X0n8601WicrOrDK37c0pSg66sd4xg5TucMcDsdxlGRW6+puvXLjAt2xk+qHSzbFEoMramfagWBF+hveKcv+buoZ81+f/H+3VBiNAxtTQLgDDqHI5IqAf1HlT20ThNimmN9q8bonirxYx6xhn0y4HvXLOn6nwMrqLQ=="},{"keyid":"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002","sig":"VOIfdL0qGiHvHmCAu4vLG2s5Ny1+zBZ7ZovPFo8eJT8ppquUDR7POzNBlk+xgteCfUFx56imsvBxKu77zCIe2yT2FcwYdpzcDzaJqOxsEhdusZa7gXdvDVs+JYoZMtRWrjo9InfXVpT8s8SOKglQAnuwcS5/Y+5T5czdXqeWOW9Lnk0Xpt09PUrW3tqrVKhWq1WqRSIayCNV1nnlM3Tj2240DiuYiTEIZn95p8ThB0ZzNLPVNzrvs5/7ZjTdmYCeDSNRwseHO3XFPUOtApEvSWNwjhH4x/YJOo64hqwnaO99utN4jGOKcXkHwQpKPDWKRecgo5+n8VzEZeA+XKLvow=="},{"keyid":"5607181203a2fb60b9d725109388ccb19ccdc236a4b1d1441fbea7ad07616c4a","sig":"QkVHaGa0K8UBc146leEndu2RFQY6tBzoZXGQ9osUyzLVpn3706LLxwD70zOqDhKHaWnnyf5sd3wJrzlhHXjpz3p380xgparaSyEky5d7OB7s5mBToy2bnA7f85IX3sRq7eyb4gcZfFTiZaTT+ygWzPClJaZsiF8p+XzQSkBXXycn3xl8XKtP81+CQOwhdhF9l1oXSEVFKjwMZC9WG4X9ipLS1MPr7J08YVxiMpMKiXtTQtlPdbqP1r65dWDtdJ1y7zMcatWjYGY4JakIrawIcfYJlYrMpAGUzyxx/Tm21d85b+NzyNN7sMpoUKLNHS3vUHOD2a9vSCiwFTjIrsxJDQ=="}],"signed":{"_type":"root","expires":"2023-07-26T11:18:30+08:00","roles":{"index":{"keys":{"7fce7ec4f9c36d51dec7ec96065bb64958b743e46ea8141da668cd2ce58a9e61":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5kVA7MlBfSe7EBaExjl\nKbwoDkn1aYi74s29mFgtRo8nejbrVvZQMCIUhvKc0pFa/l9JD/QY6/nAOCE1lpzi\nwwNkSntfOo3p3HQIR+Ut7hZ4Sxfe/5JagGo3LQ+Hd3EJWUxyEfQ/Bff07F3XAbqM\n5+cKNrdsKWZJcPiJDW621qGwCx52f+gzl9bnFe4/hx34OUgirwqh5DS+LhIO+/yt\nbOiN1AyjQKlnb8lUnblElS4Njd+F4io5VzSrZYi2+4AbTkO6wLwbsWHMzXfv9qwn\nvllufOHpB6EwiQ/xBOMuvJJymHnZvs8AH4SuydQIXLaJuv1ysFaBs0KB/ktbakSK\nLwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"5607181203a2fb60b9d725109388ccb19ccdc236a4b1d1441fbea7ad07616c4a":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyDwCfCl30vhyJW7fB1bs\npRYKtBKzl7o0qnJTm+IksjQ8RXxj8osUpMLmSvOzCaJ5Wxe+Pm1LpSTDbbubbgvd\nnmEFL6228sifviNIu2HlIl+agfzmXuJ9OBlzGUaI4gAd1Z6pF6+mjlcjz2PbWF84\nAbXZdK49uluqulp7HrGB/qNjGcIRUCHgDU4nnq0OkI1BZZSKm9ovonqDkIK76x/S\niAD9OjKsjQ/s57tE+5WTVObKpfrfK0JeHdpAUsA/2n4L1Z6FmZD4LZWqb0i+C7xj\nMElC99KtjlwRntcjeVWG9YjU8AcEN0n1gON9S2oRdyyAzDTgGb7WueDnn6qstt5w\nSQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"818c3ab5ddd59a79d4cff76ebb594be56e5a630c05cfcae382f32e07899e7ab7":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA37V4zn8sYuhC5HbIos/6\nf3zhnr7WSnV0GtrOj2q6tCvo/1rGXDKbL8KJgLBHcQT6P732sm5BmZ+y8hRXZDqy\njTBqT70Vc0fGfCkH5Z0FU8WWlhQ2Ck3W20TxXPJY7p+wnuUCmcLzD7cKwUGOshjs\nyozqAMQ7C/HSmJFCUY8PaASvQCCg/YyMr3Ft8xpyc5IGmIi4NkVjf/JWIUFFv7kr\nIkRbT5K1nKJ2earot1TIcWUY2O4OvbhtueJ+IN0Lkdg+v98W/pvlF+ji24DBlcGw\nLdOeGRt5z6GnHKlAuZ/tbjRHeXnq1KxMETlXCgu2xCwsSK/10SE8oTaXbFoMHNBN\nAQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOgQkwLOh31QV9OpbO9v\n6o83durJFGPOnVXZiab83pKaSk7HEK9WzXBq0BaPvtFwSfROVdpgtopri5lZi+uH\naMKLUn5F8XRnSMl/7m5vM4XpZZYa4aQId4TWdbFtTu31eHGZ3eEC5nDRJ5NhZOJd\nKLFBu/xmxrh/eNZt4QbdWLZayjHnzyoy5AnfNTR6nJgPAv+rBOqyqT/r14q4Pngh\n3z0I3pNFr5qmxsp013XV+kgOW1F7zT7IMU8xRIgo85UWUNhax0/bjY/2NI1Z+WjR\nyhZmUBMVYWvfw97xDUrvBvrJxZPgg0lGvxJC6LF2dM7wgLaNx9khT6HMBVxjxLMs\nDQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnayxhw6KeoKK+Ax9RW6v\n66YjrpRpGLewLmSSAzJGX8nL5/a2nEbXbeF9po265KcBSFWol8jLBsmG56ruwwxp\noWWhJPncqGqy8wMeRMmTf7ATGa+tk+To7UAQD0MYzt7rRlIdpqi9Us3J6076Z83k\n2sxFnX9sVflhOsotGWL7hmrn/CJWxKsO6OVCoqbIlnJV8xFazE2eCfaDTIEEEgnh\nLIGDsmv1AN8ImUIn/hyKcm1PfhDZrF5qhEVhfz5D8aX3cUcEJw8BvCaNloXyHf+y\nDKjqO/dJ7YFWVt7nPqOvaEkBQGMd54ETJ/BbO9r3WTsjXKleoPovBSQ/oOxApypb\nNQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0kgU3v3SxYzm5J6P+GPP\nmy6toBnKYtTViAVmpUJiIEjdZ9NLpoJU0na9q0CD8sIgo2Js/W/owJUvSj6rm8us\nsu/Ve5KsoJN6zca2am1uZ5IKnc48i0mCv76WXawCxM+NFGqSCMJcltlhj3fC/GDS\ngu+BiIbrgR1PgJf6Jk6l7uMJdN3TL6JJQcEC4lz+2hj5zoVNYkq06ZC79j2tPDCI\nkTAYGF/TAAVLH08/kGH5ZeRPlVKJ7cwW3OniLM5NeFnS8+shRNb6AYr7xju3Ikbw\nDo14ipIghBI0iAxn6Lvr/iilc7TM7RWJ4OiTrmK3SQSJ+U6H2N2/I5OGEHBEKzbA\nOQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"8660a9f40687fb33e6f8ad563f21ee81b9ce7b91c90827cc7ae2416c5e0e94e9":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqTZx29eJR5EumjqM4YTb\nFlKbim1GNYmtbCLH51BbU2lt46ddmfGvtGsxTD3mIZ/GEHVFv6Aei3xx5nIfhGP0\nrG78JRz394uU8Pd62DiIFWYizr5o+ZBZu29D2YK5ZtxoLFpgt0ibnINK2NcesDC8\nSqfIUbMiQFT6yB/MYD275SjfRGHOeYTPmKdjMJrhLL2cfIPYnQ0QFYIyMvXBG1Fj\nU0rc9UclYQHh9YheIDVYI9YCo/DWP3KFfRJpoTjQRGoPSK9TXcpCAEzQpEG3jOek\n9PdV9Ol6/O8JbrFwXWF3LhkUThg+zCjV4qHtP4oqp5QCqzTQTXGQ9qxWUSlHi4Eu\nIwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"66d4ea1da00076c822a6e1b4df5eb1e529eb38f6edcedff323e62f2bfe3eaddd":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzTgV5iKhMnunUDxt4PB\npYqTMPaJN/ZdOOsP6cS3DeCE/EcYGfgCjvP7KD3gjG98VDBTVcuwZClSy+/zvHhV\nIq7VWu+yxQL5c6oa1xpCyHoA96JiLIDPhmqEdscdRybcRQ2CYywzKA8jSwEQCnEK\nc8a74ceY352l/MEcOem0+AtKrOjqcjbXCayDwC9yTg/c78bkp+4T8AhSWgt6Tlrt\nY8jLE7zwojFtIYtMwobWRIW2O3nJDXiSBbTPG3M9kF1G43INshSdBcuq5Tmy8lpE\n/XiG/E7+hP63Hm+KAcdvl553Zs7pLhAZxV0kqlApqRRwhscw+JQci8sVONun5t9t\nNwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":3}} \ No newline at end of file diff --git a/pkg/repository/v1manifest/testdata/polluted/bin/root.json b/pkg/repository/v1manifest/testdata/polluted/bin/root.json index 78e85862f0..eb7de68e7b 100644 --- a/pkg/repository/v1manifest/testdata/polluted/bin/root.json +++ b/pkg/repository/v1manifest/testdata/polluted/bin/root.json @@ -1 +1 @@ -{"signatures":[{"keyid":"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae","sig":"jDFZCtE+VfJtpXJk5m5/TwIOpvkJe08+HWKCfPAhERKlqrGPAAdgLnXqftzZhcmDSR3uP2qxwqAZSO/ZUrWsie7XT5Xutva9SL//UXIk2N7RwS/PjN4AcaJydm4+V37h/sowlFz3nxeKobj21wpUAw/KxcY7mqu+XhLiPM2f5yhuGBC6MeoqBN5tlqCGoadHkGYibqXNS/1aBAtk/vCrCv86PRL3yzpfpKUB3ElyJJaQR2zUr5bqPNen31/qM2xxGp/amN7UxXddtAPGfZ2CNI959puyoTXwRULXS8J74BM8Lg7TAkDr+n9hkjmXi3MNhulPb5luPJ/eGQYw9l/vnw=="},{"keyid":"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e","sig":"sa9m4ftMfe9PsnLA2pgUsTdv48tyJlSo2g0NYAnGBt81P5Ky+dYdWoplsJIgsvgF5rjd1JDt6eybh/ozlWKvyAG+ge8yWQkiaBMVofSTVpm1OovuLQ015NP78lfVSqUb4MaFBgfoqChszAk7Kx/av0DymLSiN7qhFsxf68naau9R83Ao2RSTc8QxJeTqoiJvgVRc9ILHoaVjhqEixGfcLPUKG3gLEyYglZSk3F1ixIa29/QHj2B7ICzS4Hceyk1RKKIUCcX3zF+eh29tZdGU7sZPnKlt2svzAfy1xiMUJikugQBucvvFox/txU2Tp2+rP3qgP6poZ/j1uxI9JaDaUQ=="},{"keyid":"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002","sig":"Bsn2hbGAZH9kpEJx5za7XMdtJI/QSlKDy00JDo8/Jdnjqp1AVMhKbbl6KedNHfwb5OPmohJzT6ukASUqTzCcMPjJAZCKPJWDS9vrrtc9Nqvdfn2kIYj41pLNOdFBiKa79x6Rio+jLdL81Nt8T0d/izMfGO2vJ+LkZElUGG8VDj19UWRKKZPp/V3oFBfGIRemJWbDBsTt9cVwNa9ed3OXS01qS4/asrd9l19BQ+tZfZ+dXzDuMlv1THJNWB5UAdv0Ku7lSeV87oGOVMD4gkfdWAzFioT+hwXF8f3JUobNskyZIJTMqNPHST+ACJgQjgLH0FkN8xjw+YYv/ktgoZrSIA=="},{"keyid":"2001b18089c9a865cebee793dbc23f9b1f5ce457f96b8d0b2c0909c26b00c643","sig":"Ca+w4Cf7avansD74a014IUJBobcCz+X8aIbmWma9Ch8Ccdksedgf6MEWi0fHUJXloLauLP/I56PzhzfvB+0+YgO9lMkECkEcjed2NC0YCuRDZ07q8ndsZPQ94KKg7BWXo+1xXkDz5W7AKpFYdxYnAWfVSpvc/iceTd3bX+3vz4bs/FiyZtFig6rTWdS+gKrGTqFJ//AOP+9iC3kheSEZXlXV2HS0EB8s461PqSpdMLcXBughRSIzbFHPid+5Nch0zJzCIuLXjZE7n2w1M+9j5eyF9USga5cjQiXIJ0LTINSzFkPjuUk3PzWYkNobGr9fxlrePzUHlzFEGHz8kxG0gQ=="},{"keyid":"545c31fd615bbaa4c5424509a9305eb280e019996b043a576dc12b758aa0890a","sig":"ftsm8N54OgIHhFrIKDnCrocY+rxCzZBgjyX37Ixm2vJifk3RhXA2cUEQepqFcRKH1oEmt90lzV6VWqy1EUUzYJSGA6edq2tix6nntcRgDJkIqCAPViBgaR1OCKFhf/2ldRvnjtuOkG6h+5qAmuAB51DdDHGjHW+DKvxflTK7p59cSZLvmJImPWYTz2qF1U+IKMSb7glYVqXUsFKUq5GP7gawE8Ez/2N0bMkD9s6GPtErCGxIkH2x1/5eYLVlbdGwy/PsW1/cE2uRAGCsPC6NknlWXYHFXYVgJWJ16H9H7Ih2NfkizBOwhWkVr+VPLkXllo9HutxSkNl2dEk4rAzzDQ=="}],"signed":{"_type":"root","expires":"2022-05-26T11:18:30+08:00","roles":{"index":{"keys":{"7fce7ec4f9c36d51dec7ec96065bb64958b743e46ea8141da668cd2ce58a9e61":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5kVA7MlBfSe7EBaExjl\nKbwoDkn1aYi74s29mFgtRo8nejbrVvZQMCIUhvKc0pFa/l9JD/QY6/nAOCE1lpzi\nwwNkSntfOo3p3HQIR+Ut7hZ4Sxfe/5JagGo3LQ+Hd3EJWUxyEfQ/Bff07F3XAbqM\n5+cKNrdsKWZJcPiJDW621qGwCx52f+gzl9bnFe4/hx34OUgirwqh5DS+LhIO+/yt\nbOiN1AyjQKlnb8lUnblElS4Njd+F4io5VzSrZYi2+4AbTkO6wLwbsWHMzXfv9qwn\nvllufOHpB6EwiQ/xBOMuvJJymHnZvs8AH4SuydQIXLaJuv1ysFaBs0KB/ktbakSK\nLwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"2001b18089c9a865cebee793dbc23f9b1f5ce457f96b8d0b2c0909c26b00c643":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1LB2sQGelCEaKTKPzdim\n5V0RrdDOyZTSsZlWjzqZQn7lIRKG9Yjah//ReBdy3gmTwbZWUYzGFeclS+1+H05f\nvvxJUN1ttNgy6xsKql6s1ZhdwoBLbkjTqHjbRRQ2+fMJQdhusb1TXEP5Vut2jlyo\nSoGSa9mDC0VbGW9Xs/4HqfyH6m4dV6GeFYwDUX0ok6l6DHk28UIFyieKITFNkrKv\n5xoUPS3P49tX7wprXiFBKiP1Tr72O+GSTBFXuUhPASBVCXoxj7g5fB024P464ku/\nTHECfX1F5q7htz2zkgn7V9A9kedASwoqbrC5glHXfrfiQOctHkyKaGLswWe+8OAp\n5wIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"545c31fd615bbaa4c5424509a9305eb280e019996b043a576dc12b758aa0890a":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzlxJStPfdjMERTUs2GH\nMKMPAflgMTId3rhKsyLGAoRraAE3+crZEkXz+sEgCSW7590qDofcZYFeS9QOebD2\nI1/PYbDqMOwWkRSta6BRJyhgGKmG8QuxiYQQEQSgBhTQap3jnxiduXiZ+6uTiNkS\n44/Z12GN+vXLDLCVBlxFZx2Am9QFVCyP7f9Dxj0EkaVKRGu6+utjaWGyQLq5splk\nNbFvMLYJLkzrk8dzLwr1E85NRCAVLnRJR4fYllglJmJi6laHdOgXf9GOL1vQ/qUh\nRXqYkGiZ/15vurMMyUaIdzLY95XHw6vsjOwV9kBs8z/cxBVLxpNWUiOBsfDpmBc3\nCwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOgQkwLOh31QV9OpbO9v\n6o83durJFGPOnVXZiab83pKaSk7HEK9WzXBq0BaPvtFwSfROVdpgtopri5lZi+uH\naMKLUn5F8XRnSMl/7m5vM4XpZZYa4aQId4TWdbFtTu31eHGZ3eEC5nDRJ5NhZOJd\nKLFBu/xmxrh/eNZt4QbdWLZayjHnzyoy5AnfNTR6nJgPAv+rBOqyqT/r14q4Pngh\n3z0I3pNFr5qmxsp013XV+kgOW1F7zT7IMU8xRIgo85UWUNhax0/bjY/2NI1Z+WjR\nyhZmUBMVYWvfw97xDUrvBvrJxZPgg0lGvxJC6LF2dM7wgLaNx9khT6HMBVxjxLMs\nDQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnayxhw6KeoKK+Ax9RW6v\n66YjrpRpGLewLmSSAzJGX8nL5/a2nEbXbeF9po265KcBSFWol8jLBsmG56ruwwxp\noWWhJPncqGqy8wMeRMmTf7ATGa+tk+To7UAQD0MYzt7rRlIdpqi9Us3J6076Z83k\n2sxFnX9sVflhOsotGWL7hmrn/CJWxKsO6OVCoqbIlnJV8xFazE2eCfaDTIEEEgnh\nLIGDsmv1AN8ImUIn/hyKcm1PfhDZrF5qhEVhfz5D8aX3cUcEJw8BvCaNloXyHf+y\nDKjqO/dJ7YFWVt7nPqOvaEkBQGMd54ETJ/BbO9r3WTsjXKleoPovBSQ/oOxApypb\nNQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0kgU3v3SxYzm5J6P+GPP\nmy6toBnKYtTViAVmpUJiIEjdZ9NLpoJU0na9q0CD8sIgo2Js/W/owJUvSj6rm8us\nsu/Ve5KsoJN6zca2am1uZ5IKnc48i0mCv76WXawCxM+NFGqSCMJcltlhj3fC/GDS\ngu+BiIbrgR1PgJf6Jk6l7uMJdN3TL6JJQcEC4lz+2hj5zoVNYkq06ZC79j2tPDCI\nkTAYGF/TAAVLH08/kGH5ZeRPlVKJ7cwW3OniLM5NeFnS8+shRNb6AYr7xju3Ikbw\nDo14ipIghBI0iAxn6Lvr/iilc7TM7RWJ4OiTrmK3SQSJ+U6H2N2/I5OGEHBEKzbA\nOQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"8660a9f40687fb33e6f8ad563f21ee81b9ce7b91c90827cc7ae2416c5e0e94e9":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqTZx29eJR5EumjqM4YTb\nFlKbim1GNYmtbCLH51BbU2lt46ddmfGvtGsxTD3mIZ/GEHVFv6Aei3xx5nIfhGP0\nrG78JRz394uU8Pd62DiIFWYizr5o+ZBZu29D2YK5ZtxoLFpgt0ibnINK2NcesDC8\nSqfIUbMiQFT6yB/MYD275SjfRGHOeYTPmKdjMJrhLL2cfIPYnQ0QFYIyMvXBG1Fj\nU0rc9UclYQHh9YheIDVYI9YCo/DWP3KFfRJpoTjQRGoPSK9TXcpCAEzQpEG3jOek\n9PdV9Ol6/O8JbrFwXWF3LhkUThg+zCjV4qHtP4oqp5QCqzTQTXGQ9qxWUSlHi4Eu\nIwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"66d4ea1da00076c822a6e1b4df5eb1e529eb38f6edcedff323e62f2bfe3eaddd":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzTgV5iKhMnunUDxt4PB\npYqTMPaJN/ZdOOsP6cS3DeCE/EcYGfgCjvP7KD3gjG98VDBTVcuwZClSy+/zvHhV\nIq7VWu+yxQL5c6oa1xpCyHoA96JiLIDPhmqEdscdRybcRQ2CYywzKA8jSwEQCnEK\nc8a74ceY352l/MEcOem0+AtKrOjqcjbXCayDwC9yTg/c78bkp+4T8AhSWgt6Tlrt\nY8jLE7zwojFtIYtMwobWRIW2O3nJDXiSBbTPG3M9kF1G43INshSdBcuq5Tmy8lpE\n/XiG/E7+hP63Hm+KAcdvl553Zs7pLhAZxV0kqlApqRRwhscw+JQci8sVONun5t9t\nNwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":2}} \ No newline at end of file +{"signatures":[{"keyid":"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae","sig":"aptcBUxk5mIY3a2lqNChLU6dXUP/tcaIiwv7e/nQFZjsL3YOm9VG8OQzc4Sy+sv1DqFDvmwNZVp4FyfbPluXRyRgMRYJ194Z9Z1GXHQBmaWaVhMX9qpwzcSe8XNsReaDugHl+iJYfFif34vVm6fbhQgwxggXgJ37TbScVe3OB4LZ7RuSo3RExj3ojMkZr5wWtb4nFKd0VwfGH7KROmz06Pdok/k5PmI7spBLCFUWSAheVThA4jFXtlFPXGmbgBnPMRaRR5uWf59QFD0YQ4xTsJvWLHVmLtIgvDQnouVKYURXooCbYj/OfnvWIQIy3HzuEJC09ZQJokzpluhXaI8J+g=="},{"keyid":"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e","sig":"wENeklsuDdoRNLCvvzsD3sJRymbAjMNT/ZTWsPX7tdPtfvq6+jyvvAgXiPMM92Kvb/WUVjBp5lwD5txGfD/2QLWRER9eDbz0XoZ1hGbAERQCWW7BZIc0tgc7EDLoPUxNQBMVYvHi1XTn1kEZqXHu8lrDLSpL2jIRMJOuLqJv6mmBraxGOc+loIwH2hQkXCvp8C8fW9M/bK5YKzuV3FafKyLuCkqMV7AIkKH2PztPXEVDQ3Mhrxzz9P1q7d6E07Hee9FP/xSm2B4MR9eqHiQTJW+aH/9BI60OaWLNxOg2GEr3t72j7mgDZq4d5i99zWwDG3YyWNw7AXtcuPPvKl6Vzg=="},{"keyid":"818c3ab5ddd59a79d4cff76ebb594be56e5a630c05cfcae382f32e07899e7ab7","sig":"PVoqno+m+HiHzkE+wMskafuHU/WUGw/eT/QRkXKgmAdDce6C5yvEVM1H37OpMPvfAjf70Q9opdaxBpkiTo3637EJbHGo7Eqs61hyIYecbYP9/LMinBSQZNOaTdtMUMYB28Cm9rERZCekxs2izLnkwX0py+V3IvfATOKy8jes13fiUF44A27J0X0n8601WicrOrDK37c0pSg66sd4xg5TucMcDsdxlGRW6+puvXLjAt2xk+qHSzbFEoMramfagWBF+hveKcv+buoZ81+f/H+3VBiNAxtTQLgDDqHI5IqAf1HlT20ThNimmN9q8bonirxYx6xhn0y4HvXLOn6nwMrqLQ=="},{"keyid":"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002","sig":"VOIfdL0qGiHvHmCAu4vLG2s5Ny1+zBZ7ZovPFo8eJT8ppquUDR7POzNBlk+xgteCfUFx56imsvBxKu77zCIe2yT2FcwYdpzcDzaJqOxsEhdusZa7gXdvDVs+JYoZMtRWrjo9InfXVpT8s8SOKglQAnuwcS5/Y+5T5czdXqeWOW9Lnk0Xpt09PUrW3tqrVKhWq1WqRSIayCNV1nnlM3Tj2240DiuYiTEIZn95p8ThB0ZzNLPVNzrvs5/7ZjTdmYCeDSNRwseHO3XFPUOtApEvSWNwjhH4x/YJOo64hqwnaO99utN4jGOKcXkHwQpKPDWKRecgo5+n8VzEZeA+XKLvow=="},{"keyid":"5607181203a2fb60b9d725109388ccb19ccdc236a4b1d1441fbea7ad07616c4a","sig":"QkVHaGa0K8UBc146leEndu2RFQY6tBzoZXGQ9osUyzLVpn3706LLxwD70zOqDhKHaWnnyf5sd3wJrzlhHXjpz3p380xgparaSyEky5d7OB7s5mBToy2bnA7f85IX3sRq7eyb4gcZfFTiZaTT+ygWzPClJaZsiF8p+XzQSkBXXycn3xl8XKtP81+CQOwhdhF9l1oXSEVFKjwMZC9WG4X9ipLS1MPr7J08YVxiMpMKiXtTQtlPdbqP1r65dWDtdJ1y7zMcatWjYGY4JakIrawIcfYJlYrMpAGUzyxx/Tm21d85b+NzyNN7sMpoUKLNHS3vUHOD2a9vSCiwFTjIrsxJDQ=="}],"signed":{"_type":"root","expires":"2023-07-26T11:18:30+08:00","roles":{"index":{"keys":{"7fce7ec4f9c36d51dec7ec96065bb64958b743e46ea8141da668cd2ce58a9e61":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5kVA7MlBfSe7EBaExjl\nKbwoDkn1aYi74s29mFgtRo8nejbrVvZQMCIUhvKc0pFa/l9JD/QY6/nAOCE1lpzi\nwwNkSntfOo3p3HQIR+Ut7hZ4Sxfe/5JagGo3LQ+Hd3EJWUxyEfQ/Bff07F3XAbqM\n5+cKNrdsKWZJcPiJDW621qGwCx52f+gzl9bnFe4/hx34OUgirwqh5DS+LhIO+/yt\nbOiN1AyjQKlnb8lUnblElS4Njd+F4io5VzSrZYi2+4AbTkO6wLwbsWHMzXfv9qwn\nvllufOHpB6EwiQ/xBOMuvJJymHnZvs8AH4SuydQIXLaJuv1ysFaBs0KB/ktbakSK\nLwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"5607181203a2fb60b9d725109388ccb19ccdc236a4b1d1441fbea7ad07616c4a":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyDwCfCl30vhyJW7fB1bs\npRYKtBKzl7o0qnJTm+IksjQ8RXxj8osUpMLmSvOzCaJ5Wxe+Pm1LpSTDbbubbgvd\nnmEFL6228sifviNIu2HlIl+agfzmXuJ9OBlzGUaI4gAd1Z6pF6+mjlcjz2PbWF84\nAbXZdK49uluqulp7HrGB/qNjGcIRUCHgDU4nnq0OkI1BZZSKm9ovonqDkIK76x/S\niAD9OjKsjQ/s57tE+5WTVObKpfrfK0JeHdpAUsA/2n4L1Z6FmZD4LZWqb0i+C7xj\nMElC99KtjlwRntcjeVWG9YjU8AcEN0n1gON9S2oRdyyAzDTgGb7WueDnn6qstt5w\nSQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"818c3ab5ddd59a79d4cff76ebb594be56e5a630c05cfcae382f32e07899e7ab7":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA37V4zn8sYuhC5HbIos/6\nf3zhnr7WSnV0GtrOj2q6tCvo/1rGXDKbL8KJgLBHcQT6P732sm5BmZ+y8hRXZDqy\njTBqT70Vc0fGfCkH5Z0FU8WWlhQ2Ck3W20TxXPJY7p+wnuUCmcLzD7cKwUGOshjs\nyozqAMQ7C/HSmJFCUY8PaASvQCCg/YyMr3Ft8xpyc5IGmIi4NkVjf/JWIUFFv7kr\nIkRbT5K1nKJ2earot1TIcWUY2O4OvbhtueJ+IN0Lkdg+v98W/pvlF+ji24DBlcGw\nLdOeGRt5z6GnHKlAuZ/tbjRHeXnq1KxMETlXCgu2xCwsSK/10SE8oTaXbFoMHNBN\nAQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOgQkwLOh31QV9OpbO9v\n6o83durJFGPOnVXZiab83pKaSk7HEK9WzXBq0BaPvtFwSfROVdpgtopri5lZi+uH\naMKLUn5F8XRnSMl/7m5vM4XpZZYa4aQId4TWdbFtTu31eHGZ3eEC5nDRJ5NhZOJd\nKLFBu/xmxrh/eNZt4QbdWLZayjHnzyoy5AnfNTR6nJgPAv+rBOqyqT/r14q4Pngh\n3z0I3pNFr5qmxsp013XV+kgOW1F7zT7IMU8xRIgo85UWUNhax0/bjY/2NI1Z+WjR\nyhZmUBMVYWvfw97xDUrvBvrJxZPgg0lGvxJC6LF2dM7wgLaNx9khT6HMBVxjxLMs\nDQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnayxhw6KeoKK+Ax9RW6v\n66YjrpRpGLewLmSSAzJGX8nL5/a2nEbXbeF9po265KcBSFWol8jLBsmG56ruwwxp\noWWhJPncqGqy8wMeRMmTf7ATGa+tk+To7UAQD0MYzt7rRlIdpqi9Us3J6076Z83k\n2sxFnX9sVflhOsotGWL7hmrn/CJWxKsO6OVCoqbIlnJV8xFazE2eCfaDTIEEEgnh\nLIGDsmv1AN8ImUIn/hyKcm1PfhDZrF5qhEVhfz5D8aX3cUcEJw8BvCaNloXyHf+y\nDKjqO/dJ7YFWVt7nPqOvaEkBQGMd54ETJ/BbO9r3WTsjXKleoPovBSQ/oOxApypb\nNQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0kgU3v3SxYzm5J6P+GPP\nmy6toBnKYtTViAVmpUJiIEjdZ9NLpoJU0na9q0CD8sIgo2Js/W/owJUvSj6rm8us\nsu/Ve5KsoJN6zca2am1uZ5IKnc48i0mCv76WXawCxM+NFGqSCMJcltlhj3fC/GDS\ngu+BiIbrgR1PgJf6Jk6l7uMJdN3TL6JJQcEC4lz+2hj5zoVNYkq06ZC79j2tPDCI\nkTAYGF/TAAVLH08/kGH5ZeRPlVKJ7cwW3OniLM5NeFnS8+shRNb6AYr7xju3Ikbw\nDo14ipIghBI0iAxn6Lvr/iilc7TM7RWJ4OiTrmK3SQSJ+U6H2N2/I5OGEHBEKzbA\nOQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"8660a9f40687fb33e6f8ad563f21ee81b9ce7b91c90827cc7ae2416c5e0e94e9":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqTZx29eJR5EumjqM4YTb\nFlKbim1GNYmtbCLH51BbU2lt46ddmfGvtGsxTD3mIZ/GEHVFv6Aei3xx5nIfhGP0\nrG78JRz394uU8Pd62DiIFWYizr5o+ZBZu29D2YK5ZtxoLFpgt0ibnINK2NcesDC8\nSqfIUbMiQFT6yB/MYD275SjfRGHOeYTPmKdjMJrhLL2cfIPYnQ0QFYIyMvXBG1Fj\nU0rc9UclYQHh9YheIDVYI9YCo/DWP3KFfRJpoTjQRGoPSK9TXcpCAEzQpEG3jOek\n9PdV9Ol6/O8JbrFwXWF3LhkUThg+zCjV4qHtP4oqp5QCqzTQTXGQ9qxWUSlHi4Eu\nIwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"66d4ea1da00076c822a6e1b4df5eb1e529eb38f6edcedff323e62f2bfe3eaddd":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzTgV5iKhMnunUDxt4PB\npYqTMPaJN/ZdOOsP6cS3DeCE/EcYGfgCjvP7KD3gjG98VDBTVcuwZClSy+/zvHhV\nIq7VWu+yxQL5c6oa1xpCyHoA96JiLIDPhmqEdscdRybcRQ2CYywzKA8jSwEQCnEK\nc8a74ceY352l/MEcOem0+AtKrOjqcjbXCayDwC9yTg/c78bkp+4T8AhSWgt6Tlrt\nY8jLE7zwojFtIYtMwobWRIW2O3nJDXiSBbTPG3M9kF1G43INshSdBcuq5Tmy8lpE\n/XiG/E7+hP63Hm+KAcdvl553Zs7pLhAZxV0kqlApqRRwhscw+JQci8sVONun5t9t\nNwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":3}} \ No newline at end of file diff --git a/pkg/tidbver/tidbver.go b/pkg/tidbver/tidbver.go new file mode 100644 index 0000000000..8f3b53d1a2 --- /dev/null +++ b/pkg/tidbver/tidbver.go @@ -0,0 +1,94 @@ +// Copyright 2022 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidbver + +import ( + "strings" + + "golang.org/x/mod/semver" +) + +// warning: invalid semantic version string is considered less than a valid one when using semver.Compare + +// TiDBSupportSecureBoot return if given version of TiDB support secure boot +func TiDBSupportSecureBoot(version string) bool { + return semver.Compare(version, "v5.3.0") >= 0 || strings.Contains(version, "nightly") +} + +// TiKVSupportAdvertiseStatusAddr return if given version of TiKV support --advertise-status-addr +func TiKVSupportAdvertiseStatusAddr(version string) bool { + // TiKV support --advertise-status-addr since v4.0.1 + return semver.Compare(version, "v4.0.1") >= 0 || strings.Contains(version, "nightly") +} + +// TiFlashSupportTLS return if given version of TiFlash support TLS +func TiFlashSupportTLS(version string) bool { + return semver.Compare(version, "v4.0.5") >= 0 || strings.Contains(version, "nightly") +} + +// TiFlashSupportAdvertiseStatusAddr return if given version of TiFlash support --advertise-status-addr +func TiFlashSupportAdvertiseStatusAddr(version string) bool { + // TiFlash support --advertise-status-addr since v4.0.5 + return semver.Compare(version, "v4.0.5") >= 0 || strings.Contains(version, "nightly") +} + +// TiFlashSupportMultiDisksDeployment return if given version of TiFlash support multi-disks deployment +func TiFlashSupportMultiDisksDeployment(version string) bool { + // https://github.com/pingcap/tiup/pull/931 + return semver.Compare(version, "v4.0.9") >= 0 || strings.Contains(version, "nightly") +} + +// TiFlashDeprecatedUsersConfig return if given version of TiFlash deprecated users.* config +func TiFlashDeprecatedUsersConfig(version string) bool { + // https://github.com/pingcap/tiup/pull/1211 + return semver.Compare(version, "v4.0.12") >= 0 && version != "v5.0.0-rc" || strings.Contains(version, "nightly") +} + +// TiFlashNotNeedSomeConfig return if given version of TiFlash do not need some config like runAsDaemon +func TiFlashNotNeedSomeConfig(version string) bool { + // https://github.com/pingcap/tiup/pull/1673 + return semver.Compare(version, "v5.4.0") >= 0 || strings.Contains(version, "nightly") +} + +// TiCDCSupportConfigFile return if given version of TiCDC support config file +func TiCDCSupportConfigFile(version string) bool { + // config support since v4.0.13, ignore v5.0.0-rc + return semver.Compare(version, "v4.0.13") >= 0 && version != "v5.0.0-rc" || strings.Contains(version, "nightly") +} + +// TiCDCSupportDataDir return if given version of TiCDC support --data-dir +func TiCDCSupportDataDir(version string) bool { + // TiCDC support --data-dir since v4.0.14 and v5.0.3 + if semver.Compare(version, "v5.0.3") >= 0 || strings.Contains(version, "nightly") { + return true + } + return semver.Major(version) == "v4" && semver.Compare(version, "v4.0.14") >= 0 +} + +// NgMonitorDeployByDefault return if given version of TiDB cluster should contain ng-monitoring +func NgMonitorDeployByDefault(version string) bool { + return semver.Compare(version, "v5.4.0") >= 0 || strings.Contains(version, "nightly") +} + +// PrometheusHasTiKVAccelerateRules return if given version of Prometheus has TiKV accelerateRules +func PrometheusHasTiKVAccelerateRules(version string) bool { + // tikv.accelerate.rules.yml was first introduced in v4.0.0 + return semver.Compare(version, "v4.0.0") >= 0 || strings.Contains(version, "nightly") +} + +// DMSupportDeploy return if given version of DM is supported bu tiup-dm +func DMSupportDeploy(version string) bool { + // tiup-dm only support version not less than v2.0 + return semver.Compare(version, "v2.0.0") >= 0 || strings.Contains(version, "nightly") +} diff --git a/pkg/version/version.go b/pkg/version/version.go index 9782d52200..fddd3dbd4f 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -23,7 +23,7 @@ var ( // TiUPVerMinor is the minor version of TiUP TiUPVerMinor = 9 // TiUPVerPatch is the patch version of TiUP - TiUPVerPatch = 4 + TiUPVerPatch = 6 // TiUPVerName is an alternative name of the version TiUPVerName = "tiup" // GitHash is the current git commit hash diff --git a/tests/tiup-cluster/script/detect_error.sh b/tests/tiup-cluster/script/detect_error.sh new file mode 100755 index 0000000000..b22c02397c --- /dev/null +++ b/tests/tiup-cluster/script/detect_error.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -eu + +err_num=$(find $1 -name "*.log" -exec grep "\[ERROR\]" {} \; | wc -l) +if [ ${err_num} != "0" ]; then + echo "detect ${err_num} [ERROR] log" + exit 1 +fi + +err_num=$(find $1 -name "*stderr.log" -exec cat {} \; | wc -l) +if [ ${err_num} != "0" ]; then + echo "detect ${err_num} stderr log" + exit 1 +fi + +echo "no error log found" diff --git a/tests/tiup-cluster/test_cmd_tls_native_ssh.sh b/tests/tiup-cluster/test_cmd_tls_native_ssh.sh index b6b42b39a4..e6ee83c2b0 100755 --- a/tests/tiup-cluster/test_cmd_tls_native_ssh.sh +++ b/tests/tiup-cluster/test_cmd_tls_native_ssh.sh @@ -6,6 +6,6 @@ source script/cmd_subtest.sh export GO_FAILPOINTS='github.com/pingcap/tiup/pkg/cluster/executor/assertNativeSSH=return(true)' echo "test cluster for version v4.0.12 w/ TLS, via native ssh" -cmd_subtest 4.0.12 true true +cmd_subtest 6.0.0 true true unset GO_FAILPOINTS diff --git a/tests/tiup-cluster/test_scale_core.sh b/tests/tiup-cluster/test_scale_core.sh index ecaeed92fa..d1e6fcdd65 100755 --- a/tests/tiup-cluster/test_scale_core.sh +++ b/tests/tiup-cluster/test_scale_core.sh @@ -5,4 +5,4 @@ set -eu source script/scale_core.sh echo "test scaling of core components in cluster for version v4.0.12 wo/ TLS, via easy ssh" -scale_core v4.0.12 false false +scale_core v6.0.0 false false diff --git a/tests/tiup-cluster/test_scale_core_tls.sh b/tests/tiup-cluster/test_scale_core_tls.sh index 5c09b082c8..0b9efabda2 100755 --- a/tests/tiup-cluster/test_scale_core_tls.sh +++ b/tests/tiup-cluster/test_scale_core_tls.sh @@ -5,4 +5,4 @@ set -eu source script/scale_core.sh echo "test scaling of core components in cluster for version v5.3.0 w/ TLS, via easy ssh" -scale_core v5.3.0 true false +scale_core v4.0.12 true false diff --git a/tests/tiup-cluster/test_scale_tools_tls.sh b/tests/tiup-cluster/test_scale_tools_tls.sh index b3b9aaddb6..f0060b60f9 100755 --- a/tests/tiup-cluster/test_scale_tools_tls.sh +++ b/tests/tiup-cluster/test_scale_tools_tls.sh @@ -5,4 +5,4 @@ set -eu source script/scale_tools.sh echo "test scaling of tools components in cluster for version v5.3.0 w/ TLS, via easy ssh" -scale_tools v5.3.0 true false +scale_tools v6.0.0 true false diff --git a/tests/tiup-cluster/test_upgrade_tls.sh b/tests/tiup-cluster/test_upgrade_tls.sh index 54f93198dd..de51d7bd6d 100755 --- a/tests/tiup-cluster/test_upgrade_tls.sh +++ b/tests/tiup-cluster/test_upgrade_tls.sh @@ -3,7 +3,7 @@ set -eu old_version=${old_version-v4.0.15} -version=${version-v5.3.0} +version=${version-v6.0.0} source script/upgrade.sh diff --git a/tests/tiup-playground/test_playground.sh b/tests/tiup-playground/test_playground.sh index 9eb8d0d7b4..58f5a3ba3c 100755 --- a/tests/tiup-playground/test_playground.sh +++ b/tests/tiup-playground/test_playground.sh @@ -47,11 +47,12 @@ function kill_all() { killall -9 grafana-server || true killall -9 tiup-playground || true killall -9 prometheus || true + killall -9 ng-monitoring-server || true cat $outfile } outfile=/tmp/tiup-playground-test.out -tiup-playground v5.0.1 > $outfile 2>&1 & +tiup-playground v6.0.0 > $outfile 2>&1 & # wait $outfile generated sleep 3 @@ -98,10 +99,10 @@ tiup-playground display | grep -E "terminated|exit" | wc -l | grep -q "1" killall -2 tiup-playground.test || killall -2 tiup-playground -sleep 60 +sleep 100 # test restart with same data -tiup-playground v5.0.1 > $outfile 2>&1 & +tiup-playground v6.0.0 > $outfile 2>&1 & # wait $outfile generated sleep 3