tiup
tiup copied to clipboard
Hope tiup patch/upgrade can be compatible with the feature of leader_priority in PD
Feature Request
Is your feature request related to a problem? Please describe:
Describe the feature you'd like:
Why the featue is needed:
If one pd was set high leader priority, during patching in this pd, PD leader was transferred to others by tiup, but there is a high probability that the leader will be migrated back, then tiup patching will fail.
here is the setting:
[2023/06/30 12:48:21.896 +08:00] [INFO] [pdutil.go:418] ["run pd ctl command"] [pdCmd="tiup ctl:v6.5.3 pd -u http://pd1-peer.e2e-dr-auto-sync-5r-func-tps-1813947-1-690:2379 member leader_priority pd-pd1-peer-2379 5"]
[2023/06/30 12:48:22.605 +08:00] [INFO] [pdutil.go:418] ["run pd ctl command"] [pdCmd="tiup ctl:v6.5.3 pd -u http://pd1-peer.e2e-dr-auto-sync-5r-func-tps-1813947-1-690:2379 member leader_priority pd-pd2-peer-2379 5"]
[2023/06/30 12:48:23.322 +08:00] [INFO] [pdutil.go:418] ["run pd ctl command"] [pdCmd="tiup ctl:v6.5.3 pd -u http://pd1-peer.e2e-dr-auto-sync-5r-func-tps-1813947-1-690:2379 member leader_priority pd-pd3-peer-2379 1"]
Below is the failure report by tiup.
2023-06-30T14:40:53.144+0800 ERROR CheckPoint {"instance": "pd1-peer:2379", "error": "failed to evict PD leader pd1-peer: error evicting PD leader, operation timed out after 10m0s", "errorVerbose": "error evicting PD leader, operation timed out after 10m0s\nfailed to evict PD leader pd1-peer\ngithub.com/pingcap/tiup/pkg/cluster/spec.(*PDInstance).PreRestart\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/pd.go:408\ngithub.com/pingcap/tiup/pkg/cluster/operation.upgradeInstance\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/upgrade.go:220\ngithub.com/pingcap/tiup/pkg/cluster/operation.Upgrade\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/upgrade.go:177\ngithub.com/pingcap/tiup/pkg/cluster/manager.(*Manager).Patch.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/manager/patch.go:106\ngithub.com/pingcap/tiup/pkg/cluster/task.(*Func).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/func.go:34\ngithub.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/task.go:86\ngithub.com/pingcap/tiup/pkg/cluster/manager.(*Manager).Patch\n\tgithub.com/pingcap/tiup/pkg/cluster/manager/patch.go:115\ngithub.com/pingcap/tiup/components/cluster/command.newPatchCmd.func1\n\tgithub.com/pingcap/tiup/components/cluster/command/patch.go:45\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/[email protected]/command.go:916\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/[email protected]/command.go:1044\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/[email protected]/command.go:968\ngithub.com/pingcap/tiup/components/cluster/command.Execute\n\tgithub.com/pingcap/tiup/components/cluster/command/root.go:297\nmain.main\n\tgithub.com/pingcap/tiup/components/cluster/main.go:23\nruntime.main\n\truntime/proc.go:250\nruntime.goexit\n\truntime/asm_amd64.s:1594", "__hash__": "f4dae709fa3e904958f3433b617a6bc4bd9049a3", "__func__": "github.com/pingcap/tiup/pkg/cluster/operation.upgradeInstance", "hit": false}
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy: