diff --git a/dm/_utils/terror_gen/errors_release.txt b/dm/_utils/terror_gen/errors_release.txt index fd6800be43f..177feaf5559 100644 --- a/dm/_utils/terror_gen/errors_release.txt +++ b/dm/_utils/terror_gen/errors_release.txt @@ -536,6 +536,7 @@ ErrSchedulerStopRelayOnSpecified,[code=46029:class=scheduler:scope=internal:leve ErrSchedulerStartRelayOnBound,[code=46030:class=scheduler:scope=internal:level=low], "Message: the source has `start-relay` automatically for bound worker, so it can't `start-relay` with worker name now, Workaround: Please stop relay by `stop-relay` without worker name first." ErrSchedulerStopRelayOnBound,[code=46031:class=scheduler:scope=internal:level=low], "Message: the source has `start-relay` automatically for bound worker, so it can't `stop-relay` with worker name now, Workaround: Please use `stop-relay` without worker name." ErrSchedulerPauseTaskForTransferSource,[code=46032:class=scheduler:scope=internal:level=low], "Message: failed to auto pause tasks %s when transfer-source, Workaround: Please pause task by `dmctl pause-task`." +ErrSchedulerWorkerNotFree,[code=46033:class=scheduler:scope=internal:level=low], "Message: dm-worker with name %s not free" ErrCtlGRPCCreateConn,[code=48001:class=dmctl:scope=internal:level=high], "Message: can not create grpc connection, Workaround: Please check your network connection." ErrCtlInvalidTLSCfg,[code=48002:class=dmctl:scope=internal:level=medium], "Message: invalid TLS config, Workaround: Please check the `ssl-ca`, `ssl-cert` and `ssl-key` config in command line." ErrCtlLoadTLSCfg,[code=48003:class=dmctl:scope=internal:level=high], "Message: can not load tls config, Workaround: Please ensure that the tls certificate is accessible on the node currently running dmctl." diff --git a/dm/dm/ctl/master/operate_source.go b/dm/dm/ctl/master/operate_source.go index c50e405217d..bba20d1c7b8 100644 --- a/dm/dm/ctl/master/operate_source.go +++ b/dm/dm/ctl/master/operate_source.go @@ -32,11 +32,12 @@ import ( // NewOperateSourceCmd creates a OperateSource command. func NewOperateSourceCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "operate-source [config-file ...] [--print-sample-config]", + Use: "operate-source [config-file ...] [-w worker] [--print-sample-config]", Short: "`create`/`update`/`stop`/`show` upstream MySQL/MariaDB source", RunE: operateSourceFunc, } cmd.Flags().BoolP("print-sample-config", "p", false, "print sample config file of source") + cmd.Flags().StringP("worker", "w", "", "specify bound worker for created source") return cmd } @@ -85,6 +86,20 @@ func operateSourceFunc(cmd *cobra.Command, _ []string) error { return errors.New("please check output to see error") } + var specifyWorker string + if op == pb.SourceOp_StartSource { + specifyWorker, err = cmd.Flags().GetString("worker") + if err != nil { + common.PrintLinesf("error in parse `--worker`") + return err + } + if specifyWorker != "" { + if len(cmd.Flags().Args()) > 2 { + common.PrintLinesf("operate-source create can't create multiple sources when specify worker") + } + } + } + contents := make([]string, 0, len(cmd.Flags().Args())-1) sourceID := make([]string, 0, len(cmd.Flags().Args())-1) sources, err := common.GetSourceArgs(cmd) @@ -132,9 +147,10 @@ func operateSourceFunc(cmd *cobra.Command, _ []string) error { ctx, "OperateSource", &pb.OperateSourceRequest{ - Config: contents, - Op: op, - SourceID: sourceID, + Config: contents, + Op: op, + SourceID: sourceID, + WorkerName: specifyWorker, }, &resp, ) diff --git a/dm/dm/master/scheduler/scheduler.go b/dm/dm/master/scheduler/scheduler.go index fd7ed6555d0..e5b899a4837 100644 --- a/dm/dm/master/scheduler/scheduler.go +++ b/dm/dm/master/scheduler/scheduler.go @@ -317,7 +317,7 @@ func (s *Scheduler) CloseAllWorkers() { } } -// AddSourceCfg adds the upstream source config to the cluster. +// AddSourceCfg adds the upstream source config to the cluster, and try to bound source to worker // NOTE: please verify the config before call this. func (s *Scheduler) AddSourceCfg(cfg *config.SourceConfig) error { s.mu.Lock() @@ -327,11 +327,49 @@ func (s *Scheduler) AddSourceCfg(cfg *config.SourceConfig) error { return terror.ErrSchedulerNotStarted.Generate() } + err := s.addSource(cfg) + if err != nil { + return err + } + + // try to bound it to a Free worker. + _, err = s.tryBoundForSource(cfg.SourceID) + return err +} + +// AddSourceCfgWithWorker adds the upstream source config to the cluster, and try to bound source to specify worker +// NOTE: please verify the config before call this. +func (s *Scheduler) AddSourceCfgWithWorker(cfg *config.SourceConfig, workerName string) error { + s.mu.Lock() + defer s.mu.Unlock() + + if !s.started.Load() { + return terror.ErrSchedulerNotStarted.Generate() + } + + // check whether worker exists. + w, ok := s.workers[workerName] + if !ok { + return terror.ErrSchedulerWorkerNotExist.Generate(workerName) + } + + if w.stage != WorkerFree { + return terror.ErrSchedulerWorkerNotFree.Generate(workerName) + } + + if err := s.addSource(cfg); err != nil { + return err + } + + return s.boundSourceToWorker(cfg.SourceID, w) +} + +// addSource adds the upstream source config to the cluster. +func (s *Scheduler) addSource(cfg *config.SourceConfig) error { // 1. check whether exists. if _, ok := s.sourceCfgs[cfg.SourceID]; ok { return terror.ErrSchedulerSourceCfgExist.Generate(cfg.SourceID) } - // 2. put the config into etcd. _, err := ha.PutSourceCfg(s.etcdCli, cfg) if err != nil { @@ -341,10 +379,7 @@ func (s *Scheduler) AddSourceCfg(cfg *config.SourceConfig) error { // 3. record the config in the scheduler. s.sourceCfgs[cfg.SourceID] = cfg s.unbounds[cfg.SourceID] = struct{}{} - - // 4. try to bound it to a Free worker. - _, err = s.tryBoundForSource(cfg.SourceID) - return err + return nil } // UpdateSourceCfg update the upstream source config to the cluster. diff --git a/dm/dm/master/scheduler/scheduler_test.go b/dm/dm/master/scheduler/scheduler_test.go index f2d254bf0f0..f045456407b 100644 --- a/dm/dm/master/scheduler/scheduler_test.go +++ b/dm/dm/master/scheduler/scheduler_test.go @@ -135,6 +135,7 @@ func (t *testScheduler) testSchedulerProgress(c *C, restart int) { // not started scheduler can't do anything. c.Assert(terror.ErrSchedulerNotStarted.Equal(s.AddSourceCfg(sourceCfg1)), IsTrue) + c.Assert(terror.ErrSchedulerNotStarted.Equal(s.AddSourceCfgWithWorker(sourceCfg1, workerName1)), IsTrue) c.Assert(terror.ErrSchedulerNotStarted.Equal(s.UpdateSourceCfg(sourceCfg1)), IsTrue) c.Assert(terror.ErrSchedulerNotStarted.Equal(s.RemoveSourceCfg(sourceID1)), IsTrue) c.Assert(terror.ErrSchedulerNotStarted.Equal(s.AddSubTasks(false, subtaskCfg1)), IsTrue) @@ -406,7 +407,7 @@ func (t *testScheduler) testSchedulerProgress(c *C, restart int) { t.relayStageMatch(c, s, sourceID2, pb.Stage_Running) rebuildScheduler(ctx) - // CASE 4.4: start a task with two sources. + // CASE 4.4.1: start a task with two sources. // can't add more than one tasks at a time now. c.Assert(terror.ErrSchedulerMultiTask.Equal(s.AddSubTasks(false, subtaskCfg1, subtaskCfg21)), IsTrue) // task2' config and stage not exists before. @@ -423,7 +424,7 @@ func (t *testScheduler) testSchedulerProgress(c *C, restart int) { t.subTaskStageMatch(c, s, taskName2, sourceID2, pb.Stage_Running) rebuildScheduler(ctx) - // CASE 4.4.1 fail to stop any task. + // CASE 4.4.2 fail to stop any task. // can call without tasks or sources, return without error, but take no effect. c.Assert(s.RemoveSubTasks("", sourceID1), IsNil) c.Assert(s.RemoveSubTasks(taskName1), IsNil) @@ -481,6 +482,38 @@ func (t *testScheduler) testSchedulerProgress(c *C, restart int) { t.relayStageMatch(c, s, sourceID2, pb.Stage_InvalidStage) rebuildScheduler(ctx) + // CASE 4.7.1: add source2 with specify worker1 + // source2 not exist, worker1 is bound + t.sourceCfgNotExist(c, s, sourceID2) + t.workerBound(c, s, ha.NewSourceBound(sourceID1, workerName1)) + c.Assert(terror.ErrSchedulerWorkerNotFree.Equal(s.AddSourceCfgWithWorker(&sourceCfg2, workerName1)), IsTrue) + // source2 is not created because expected worker1 is already bound + t.sourceCfgNotExist(c, s, sourceID2) + rebuildScheduler(ctx) + + // CASE 4.7.2: add source2 with specify worker2 + // source2 not exist, worker2 should be free + t.sourceCfgNotExist(c, s, sourceID2) + t.workerFree(c, s, workerName2) + c.Assert(s.AddSourceCfgWithWorker(&sourceCfg2, workerName2), IsNil) + t.workerBound(c, s, ha.NewSourceBound(sourceID2, workerName2)) + t.sourceBounds(c, s, []string{sourceID1, sourceID2}, []string{}) + c.Assert(s.StartRelay(sourceID2, []string{workerName2}), IsNil) + t.relayStageMatch(c, s, sourceID2, pb.Stage_Running) + rebuildScheduler(ctx) + + // CASE 4.7.3: remove source2 again. + c.Assert(s.StopRelay(sourceID2, []string{workerName2}), IsNil) + c.Assert(s.RemoveSourceCfg(sourceID2), IsNil) + c.Assert(terror.ErrSchedulerSourceCfgNotExist.Equal(s.RemoveSourceCfg(sourceID2)), IsTrue) // already removed. + // source2 removed. + t.sourceCfgNotExist(c, s, sourceID2) + // worker2 become Free now. + t.workerFree(c, s, workerName2) + t.sourceBounds(c, s, []string{sourceID1}, []string{}) + t.relayStageMatch(c, s, sourceID2, pb.Stage_InvalidStage) + rebuildScheduler(ctx) + // CASE 4.8: worker1 become offline. // before shutdown, worker1 bound source t.workerBound(c, s, ha.NewSourceBound(sourceID1, workerName1)) diff --git a/dm/dm/master/server.go b/dm/dm/master/server.go index 14fee188065..c67e8fc7802 100644 --- a/dm/dm/master/server.go +++ b/dm/dm/master/server.go @@ -1396,7 +1396,12 @@ func (s *Server) OperateSource(ctx context.Context, req *pb.OperateSourceRequest err error ) for _, cfg := range cfgs { - err = s.scheduler.AddSourceCfg(cfg) + // add source with worker when specify a worker name + if req.WorkerName != "" { + err = s.scheduler.AddSourceCfgWithWorker(cfg, req.WorkerName) + } else { + err = s.scheduler.AddSourceCfg(cfg) + } // return first error and try to revert, so user could copy-paste same start command after error if err != nil { resp.Msg = err.Error() diff --git a/dm/dm/pb/dmmaster.pb.go b/dm/dm/pb/dmmaster.pb.go index 790788ca74c..b70beb74973 100644 --- a/dm/dm/pb/dmmaster.pb.go +++ b/dm/dm/pb/dmmaster.pb.go @@ -1357,9 +1357,10 @@ func (m *CheckTaskResponse) GetMsg() string { } type OperateSourceRequest struct { - Op SourceOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.SourceOp" json:"op,omitempty"` - Config []string `protobuf:"bytes,2,rep,name=config,proto3" json:"config,omitempty"` - SourceID []string `protobuf:"bytes,3,rep,name=sourceID,proto3" json:"sourceID,omitempty"` + Op SourceOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.SourceOp" json:"op,omitempty"` + Config []string `protobuf:"bytes,2,rep,name=config,proto3" json:"config,omitempty"` + SourceID []string `protobuf:"bytes,3,rep,name=sourceID,proto3" json:"sourceID,omitempty"` + WorkerName string `protobuf:"bytes,4,opt,name=workerName,proto3" json:"workerName,omitempty"` } func (m *OperateSourceRequest) Reset() { *m = OperateSourceRequest{} } @@ -1416,6 +1417,13 @@ func (m *OperateSourceRequest) GetSourceID() []string { return nil } +func (m *OperateSourceRequest) GetWorkerName() string { + if m != nil { + return m.WorkerName + } + return "" +} + type OperateSourceResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` @@ -3206,138 +3214,139 @@ func init() { func init() { proto.RegisterFile("dmmaster.proto", fileDescriptor_f9bef11f2a341f03) } var fileDescriptor_f9bef11f2a341f03 = []byte{ - // 2090 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x5f, 0x6f, 0xe3, 0xc6, - 0x11, 0x17, 0x25, 0x59, 0x96, 0x46, 0xb6, 0x22, 0xaf, 0x65, 0x99, 0xc7, 0xf3, 0xe9, 0x1c, 0x36, - 0x09, 0x0c, 0xa3, 0x38, 0xe3, 0xdc, 0x3e, 0x05, 0x48, 0x81, 0x9c, 0x74, 0xb9, 0x18, 0xf5, 0xd5, - 0x29, 0xed, 0x4b, 0x11, 0x14, 0x28, 0x4a, 0x49, 0x2b, 0x59, 0x30, 0x45, 0xf2, 0x48, 0xca, 0xae, - 0x71, 0x48, 0x1f, 0xfa, 0x01, 0xfa, 0x07, 0x05, 0x9a, 0xc7, 0x3e, 0xf4, 0x9b, 0xf4, 0xa9, 0x8f, - 0x01, 0xfa, 0xd2, 0xc7, 0xe2, 0xae, 0x1f, 0xa4, 0xd8, 0xd9, 0x5d, 0x72, 0xf9, 0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0xfb, 0x71, 0x82, 0xad, - 0x1c, 0x0c, 0x4e, 0x43, 0x7d, 0x0d, 0x0d, 0xe2, 0x37, 0x8b, 0x47, 0x78, 0xeb, 0x8e, 0xe8, 0x58, - 0xaf, 0x21, 0x57, 0x50, 0xc4, 0x80, 0xfa, 0xc2, 0x15, 0x92, 0x75, 0x94, 0xc4, 0xb4, 0x39, 0x82, - 0x4e, 0xda, 0xcd, 0x95, 0x63, 0xfb, 0x3e, 0xac, 0x39, 0xec, 0xa7, 0x22, 0xb2, 0x4d, 0x16, 0x59, - 0xa1, 0xce, 0xe2, 0x12, 0xd3, 0x81, 0xce, 0x2b, 0x97, 0x7d, 0x4a, 0xbe, 0x08, 0x66, 0x36, 0x24, - 0x26, 0x6c, 0x04, 0xd4, 0x77, 0xec, 0x11, 0x3d, 0x43, 0x8f, 0xb9, 0x95, 0x14, 0x8f, 0xec, 0x43, - 0x73, 0xe2, 0x05, 0x23, 0x6a, 0x61, 0x93, 0x12, 0x2d, 0x4b, 0x65, 0x99, 0x9f, 0xc2, 0x4e, 0xc6, - 0xda, 0xaa, 0x3e, 0x99, 0x16, 0x3c, 0x10, 0x4d, 0x40, 0x96, 0xb7, 0x63, 0xdf, 0x4a, 0xd4, 0x0f, - 0x95, 0x56, 0x80, 0xde, 0xa2, 0x54, 0xf4, 0x82, 0xe5, 0xb5, 0xf0, 0x8d, 0x06, 0x46, 0x91, 0x52, - 0x01, 0xee, 0x4e, 0xad, 0xff, 0xdf, 0x0e, 0xf3, 0x8d, 0x06, 0xbb, 0x5f, 0x2c, 0x82, 0x69, 0x91, - 0xb3, 0x8a, 0x3f, 0x5a, 0xfa, 0xe8, 0x30, 0xa0, 0x3e, 0x73, 0xed, 0x51, 0x34, 0xbb, 0xa6, 0x02, - 0x55, 0x4c, 0x63, 0x6d, 0xb3, 0x13, 0x83, 0x01, 0xab, 0x58, 0xf8, 0xcd, 0xd6, 0x4f, 0x66, 0x0e, - 0xc5, 0xad, 0xcf, 0x4b, 0x39, 0xa6, 0xb1, 0x72, 0x17, 0xc3, 0xc1, 0x2c, 0xd0, 0xd7, 0x50, 0x22, - 0x28, 0xf3, 0x37, 0xa0, 0xe7, 0x81, 0xdd, 0x4b, 0xfb, 0xba, 0x86, 0x76, 0xff, 0x92, 0x8e, 0xae, - 0xbe, 0xab, 0xe9, 0x76, 0xa1, 0x46, 0x83, 0xa0, 0xef, 0xf2, 0xcc, 0x54, 0x2c, 0x41, 0xb1, 0xb8, - 0xdd, 0xd8, 0x81, 0xcb, 0x04, 0x3c, 0x08, 0x92, 0xfc, 0x8e, 0x23, 0xf5, 0x13, 0xd8, 0x52, 0xec, - 0xae, 0x5c, 0xb8, 0x97, 0xd0, 0x11, 0x35, 0x76, 0x8e, 0x8e, 0x48, 0xe8, 0x7b, 0x4a, 0x75, 0x6d, - 0x30, 0xef, 0xb9, 0x38, 0x29, 0xaf, 0x91, 0xe7, 0x4e, 0x66, 0x53, 0x51, 0xb3, 0x82, 0x62, 0x29, - 0xe3, 0xf1, 0x38, 0x19, 0x88, 0x73, 0x32, 0xa6, 0xcd, 0x05, 0xec, 0x64, 0x2c, 0xdd, 0x4b, 0x5e, - 0x9e, 0xc3, 0x8e, 0x45, 0xa7, 0x33, 0x36, 0x36, 0xc9, 0x25, 0x77, 0x9e, 0x2a, 0xf6, 0x78, 0x1c, - 0xd0, 0x30, 0x14, 0x66, 0x25, 0x69, 0x3e, 0x83, 0x6e, 0x56, 0xcd, 0xca, 0xb1, 0xfe, 0x09, 0x74, - 0xce, 0x26, 0x13, 0x67, 0xe6, 0xd2, 0x97, 0x74, 0x3e, 0x4c, 0x21, 0x89, 0x6e, 0xfd, 0x18, 0x09, - 0xfb, 0x2e, 0x1a, 0x42, 0x58, 0x9f, 0xca, 0xfc, 0x7e, 0x65, 0x08, 0x3f, 0x8e, 0xd3, 0x7d, 0x4a, - 0xed, 0x71, 0x02, 0x21, 0x97, 0x6e, 0x2e, 0xe6, 0xe9, 0x46, 0xc3, 0xe9, 0x5f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 0x8c, 0xe3, 0x32, 0xe6, 0x84, 0x83, 0x73, 0x5f, 0x32, 0x4e, 0x72, 0x3b, 0x45, - 0xd3, 0x28, 0xb7, 0x53, 0x38, 0x7b, 0xca, 0x4e, 0x47, 0x7a, 0x59, 0x3b, 0x8b, 0xa1, 0xda, 0xec, - 0xc8, 0x05, 0xd4, 0xf8, 0x7c, 0x48, 0xb6, 0x84, 0x32, 0x45, 0x3f, 0x51, 0x59, 0x42, 0xf1, 0x0f, - 0x50, 0xf1, 0x23, 0x72, 0x57, 0x0b, 0x25, 0xbf, 0x86, 0xa6, 0x32, 0x52, 0xf1, 0x3e, 0x9d, 0x1f, - 0xfb, 0x78, 0x9f, 0x2e, 0x98, 0xbd, 0x96, 0x46, 0x89, 0xb2, 0x55, 0xb8, 0x2d, 0xfa, 0xb0, 0xa1, - 0x8e, 0x9c, 0xbc, 0xe9, 0x15, 0xcc, 0xa6, 0x86, 0x9e, 0x17, 0xc4, 0x1b, 0xe2, 0x04, 0x5a, 0xe9, - 0xd9, 0x89, 0xef, 0xad, 0xc2, 0xc1, 0x8c, 0xef, 0xad, 0xe2, 0x51, 0xcb, 0x2c, 0x31, 0x3c, 0xea, - 0x70, 0x43, 0xd4, 0x23, 0x28, 0xd5, 0x94, 0xf4, 0xbc, 0x40, 0x2a, 0x79, 0xa6, 0xff, 0xe3, 0x6d, - 0x4f, 0xfb, 0xf6, 0x6d, 0x4f, 0xfb, 0xf7, 0xdb, 0x9e, 0xf6, 0xc7, 0x77, 0xbd, 0xd2, 0xb7, 0xef, - 0x7a, 0xa5, 0x7f, 0xbd, 0xeb, 0x95, 0x86, 0x35, 0xfc, 0x0f, 0xf0, 0x47, 0xff, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0x62, 0x01, 0x57, 0x61, 0x47, 0x1c, 0x00, 0x00, + // 2101 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59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81, 0x38, 0x28, 0x63, 0x9a, 0x8d, 0x0e, 0x7c, 0x54, 0xf9, 0x3c, + 0xc9, 0xa8, 0xc2, 0x31, 0x17, 0xb0, 0x93, 0x41, 0x72, 0x2f, 0x89, 0x7b, 0x06, 0x3b, 0x16, 0x9d, + 0xce, 0xd8, 0x5c, 0x25, 0x97, 0xdc, 0x79, 0xec, 0xd8, 0xe3, 0x71, 0x40, 0xc3, 0x50, 0x98, 0x95, + 0xa4, 0xf9, 0x14, 0xba, 0x59, 0x35, 0x2b, 0x27, 0xe3, 0x27, 0xd0, 0x39, 0x9b, 0x4c, 0x9c, 0x99, + 0x4b, 0x5f, 0xd0, 0xf9, 0x30, 0x85, 0x24, 0xba, 0xf5, 0x63, 0x24, 0xec, 0xbb, 0x68, 0x4a, 0x61, + 0x8d, 0x2c, 0xf3, 0xfb, 0x95, 0x21, 0xfc, 0x38, 0x2e, 0x87, 0x53, 0x6a, 0x8f, 0x13, 0x08, 0xb9, + 0x72, 0xe0, 0x62, 0x5e, 0x0e, 0x68, 0x38, 0xfd, 0xab, 0x95, 0x0d, 0xff, 0x5e, 0x03, 0x78, 0x81, + 0xd3, 0xed, 0x89, 0x3b, 0xf1, 0x0a, 0x83, 0x6f, 0x40, 0x7d, 0x8e, 0x7e, 0x9d, 0x0c, 0xf0, 0x97, + 0x55, 0x2b, 0xa6, 0xd9, 0xa1, 0x67, 0x3b, 0xb3, 0xb8, 0xbf, 0x73, 0x82, 0xfd, 0xc2, 0xa7, 0x34, + 0x78, 0x69, 0x9d, 0xf2, 0xee, 0xd6, 0xb0, 0x62, 0x9a, 0x95, 0xe3, 0xc8, 0x99, 0x51, 0x37, 0x42, + 0x29, 0x3f, 0x16, 0x15, 0x8e, 0x39, 0x04, 0xe0, 0x89, 0x5c, 0x8a, 0x87, 0x40, 0x95, 0x65, 0x5f, + 0xa6, 0x80, 0x7d, 0x33, 0x1c, 0x61, 0x64, 0x4f, 0xe5, 0x89, 0xcc, 0x09, 0x6c, 0x57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8, 0x7c, 0x76, 0x3d, + 0x1b, 0x45, 0x31, 0x4b, 0x23, 0xbb, 0xb0, 0xdd, 0xb7, 0xdd, 0x11, 0x75, 0xd2, 0x82, 0xf2, 0xa1, + 0x0b, 0xeb, 0x62, 0x5b, 0x33, 0x68, 0x42, 0x17, 0x23, 0xdb, 0x25, 0xb2, 0x01, 0x75, 0xd6, 0x64, + 0x90, 0xd2, 0x18, 0x0c, 0xbe, 0xe7, 0x90, 0x46, 0x98, 0x3c, 0x0a, 0x48, 0x73, 0x98, 0x08, 0x11, + 0xe9, 0x2a, 0xe9, 0x40, 0x1b, 0x7f, 0x4d, 0xe7, 0xbe, 0x63, 0x47, 0x9c, 0xbb, 0x76, 0x38, 0x80, + 0x46, 0x9c, 0x57, 0xb6, 0x44, 0x58, 0x8c, 0x79, 0xed, 0x12, 0x8b, 0x08, 0x86, 0x08, 0x79, 0x5f, + 0x1e, 0xb7, 0x35, 0x1e, 0x34, 0xcf, 0x97, 0x8c, 0xf2, 0xf1, 0xdf, 0x5b, 0x50, 0xe3, 0x60, 0xc8, + 0x57, 0xd0, 0x88, 0x5f, 0x12, 0x09, 0x1e, 0xee, 0xd9, 0x87, 0x4d, 0x63, 0x27, 0xc3, 0xe5, 0x49, + 0x33, 0x1f, 0xfd, 0xf6, 0x9f, 0xff, 0xf9, 0x73, 0xf9, 0x81, 0xd9, 0x39, 0xb2, 0xfd, 0x59, 0x78, + 0x74, 0xfd, 0xc4, 0x76, 0xfc, 0x4b, 0xfb, 0xc9, 0x11, 0xdb, 0xf2, 0xe1, 0x47, 0xda, 0x21, 0x99, + 0x40, 0x53, 0x79, 0xd0, 0x23, 0x5d, 0xa6, 0x26, 0xff, 0x84, 0x68, 0xec, 0xe6, 0xf8, 0xc2, 0xc0, + 0x87, 0x68, 0x60, 0xdf, 0x78, 0x58, 0x64, 0xe0, 0xe8, 0x35, 0xeb, 0x98, 0x5f, 0x33, 0x3b, 0x1f, + 0x03, 0x24, 0x8f, 0x6c, 0x04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, 0x57, + 0x30, 0x9b, 0x1a, 0x7a, 0x5e, 0x10, 0x6f, 0x88, 0x13, 0x68, 0xa5, 0x67, 0x27, 0xbe, 0xb7, 0x0a, + 0x07, 0x33, 0xbe, 0xb7, 0x8a, 0x47, 0x2d, 0xb3, 0xc4, 0xf0, 0xa8, 0xc3, 0x0d, 0x51, 0x8f, 0xa0, + 0x54, 0x53, 0xd2, 0xf3, 0x02, 0xa9, 0xe4, 0xa9, 0xfe, 0x8f, 0x37, 0x3d, 0xed, 0xdb, 0x37, 0x3d, + 0xed, 0xdf, 0x6f, 0x7a, 0xda, 0x1f, 0xdf, 0xf6, 0x4a, 0xdf, 0xbe, 0xed, 0x95, 0xfe, 0xf5, 0xb6, + 0x57, 0x1a, 0xd6, 0xf0, 0x4f, 0xc2, 0x1f, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xab, 0x51, 0x94, + 0xcf, 0x68, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5141,6 +5150,13 @@ func (m *OperateSourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.WorkerName) > 0 { + i -= len(m.WorkerName) + copy(dAtA[i:], m.WorkerName) + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.WorkerName))) + i-- + dAtA[i] = 0x22 + } if len(m.SourceID) > 0 { for iNdEx := len(m.SourceID) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SourceID[iNdEx]) @@ -7024,6 +7040,10 @@ func (m *OperateSourceRequest) Size() (n int) { n += 1 + l + sovDmmaster(uint64(l)) } } + l = len(m.WorkerName) + if l > 0 { + n += 1 + l + sovDmmaster(uint64(l)) + } return n } @@ -10443,6 +10463,38 @@ func (m *OperateSourceRequest) Unmarshal(dAtA []byte) error { } m.SourceID = append(m.SourceID, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmmaster + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmmaster + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDmmaster + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WorkerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDmmaster(dAtA[iNdEx:]) diff --git a/dm/dm/proto/dmmaster.proto b/dm/dm/proto/dmmaster.proto index f97bc200730..0ba158c8b8f 100644 --- a/dm/dm/proto/dmmaster.proto +++ b/dm/dm/proto/dmmaster.proto @@ -6,134 +6,134 @@ import "dmworker.proto"; // refine if needed import "google/api/annotations.proto"; service Master { - rpc StartTask (StartTaskRequest) returns (StartTaskResponse) { - option (google.api.http) = { - post: "/apis/v1alpha1/tasks" - body: "*" - }; - } - - rpc OperateTask (OperateTaskRequest) returns (OperateTaskResponse) { - option (google.api.http) = { - put: "/apis/v1alpha1/tasks/{name}" - body: "*" - }; - } - rpc UpdateTask (UpdateTaskRequest) returns (UpdateTaskResponse) {} - - rpc QueryStatus (QueryStatusListRequest) returns (QueryStatusListResponse) { - option (google.api.http) = { - get: "/apis/v1alpha1/status/{name}" - }; - } - - // show un-resolved DDL locks - rpc ShowDDLLocks (ShowDDLLocksRequest) returns (ShowDDLLocksResponse) {} - // used by dmctl to manually unlock DDL lock - rpc UnlockDDLLock (UnlockDDLLockRequest) returns (UnlockDDLLockResponse) {} - - // OperateWorkerRelayTask requests some dm-workers to operate relay unit - rpc OperateWorkerRelayTask (OperateWorkerRelayRequest) returns (OperateWorkerRelayResponse) {} - - // PurgeWorkerRelay purges relay log files for some dm-workers - rpc PurgeWorkerRelay(PurgeWorkerRelayRequest) returns (PurgeWorkerRelayResponse) {} - - // CheckTask checks legality of task configuration - rpc CheckTask(CheckTaskRequest) returns (CheckTaskResponse) {} - - // Operate an upstream MySQL source. - rpc OperateSource(OperateSourceRequest) returns (OperateSourceResponse) { - option (google.api.http) = { - put: "/apis/v1alpha1/sources" - body: "*" - }; - } - - // RegisterWorker register the dm-workers. - rpc RegisterWorker(RegisterWorkerRequest) returns(RegisterWorkerResponse) {} - - // OfflineMember offline the dm cluster's members (master/worker). - rpc OfflineMember(OfflineMemberRequest) returns(OfflineMemberResponse) { - option (google.api.http) = { - delete: "/apis/v1alpha1/members/{type}/{name}" - }; - } - - // OperateLeader do some operate on master: - // - evict leader: make the master resign if it is leader, and will not campaign the leader again - // - cancel evict leader: the master can campaign leader again. - rpc OperateLeader(OperateLeaderRequest) returns(OperateLeaderResponse) { - option (google.api.http) = { - put: "/apis/v1alpha1/leader/{op}" - body: "*" - }; - } - - // ListMember list member information - rpc ListMember(ListMemberRequest) returns(ListMemberResponse) { - option (google.api.http) = { - get: "/apis/v1alpha1/members" - }; - } - - rpc OperateSchema(OperateSchemaRequest) returns(OperateSchemaResponse) { - option (google.api.http) = { - put: "/apis/v1alpha1/schema" - body: "*" - }; - } - - rpc GetSubTaskCfg(GetSubTaskCfgRequest) returns(GetSubTaskCfgResponse) { - option (google.api.http) = { - get: "/apis/v1alpha1/subtasks/{name}" - }; - } - - // GetCfg get config - rpc GetCfg(GetCfgRequest) returns(GetCfgResponse) { - option (google.api.http) = { - get: "/apis/v1alpha1/tasks/{name}" - }; - } - - rpc HandleError(HandleErrorRequest) returns(HandleErrorResponse) { - option (google.api.http) = { - put: "/apis/v1alpha1/errors" - body: "*" - }; - } - - rpc GetMasterCfg(GetMasterCfgRequest) returns(GetMasterCfgResponse) {} - - rpc TransferSource(TransferSourceRequest) returns(TransferSourceResponse) {} - - rpc OperateRelay(OperateRelayRequest) returns(OperateRelayResponse) {} + rpc StartTask (StartTaskRequest) returns (StartTaskResponse) { + option (google.api.http) = { + post: "/apis/v1alpha1/tasks" + body: "*" + }; + } + + rpc OperateTask (OperateTaskRequest) returns (OperateTaskResponse) { + option (google.api.http) = { + put: "/apis/v1alpha1/tasks/{name}" + body: "*" + }; + } + rpc UpdateTask (UpdateTaskRequest) returns (UpdateTaskResponse) {} + + rpc QueryStatus (QueryStatusListRequest) returns (QueryStatusListResponse) { + option (google.api.http) = { + get: "/apis/v1alpha1/status/{name}" + }; + } + + // show un-resolved DDL locks + rpc ShowDDLLocks (ShowDDLLocksRequest) returns (ShowDDLLocksResponse) {} + // used by dmctl to manually unlock DDL lock + rpc UnlockDDLLock (UnlockDDLLockRequest) returns (UnlockDDLLockResponse) {} + + // OperateWorkerRelayTask requests some dm-workers to operate relay unit + rpc OperateWorkerRelayTask (OperateWorkerRelayRequest) returns (OperateWorkerRelayResponse) {} + + // PurgeWorkerRelay purges relay log files for some dm-workers + rpc PurgeWorkerRelay(PurgeWorkerRelayRequest) returns (PurgeWorkerRelayResponse) {} + + // CheckTask checks legality of task configuration + rpc CheckTask(CheckTaskRequest) returns (CheckTaskResponse) {} + + // Operate an upstream MySQL source. + rpc OperateSource(OperateSourceRequest) returns (OperateSourceResponse) { + option (google.api.http) = { + put: "/apis/v1alpha1/sources" + body: "*" + }; + } + + // RegisterWorker register the dm-workers. + rpc RegisterWorker(RegisterWorkerRequest) returns(RegisterWorkerResponse) {} + + // OfflineMember offline the dm cluster's members (master/worker). + rpc OfflineMember(OfflineMemberRequest) returns(OfflineMemberResponse) { + option (google.api.http) = { + delete: "/apis/v1alpha1/members/{type}/{name}" + }; + } + + // OperateLeader do some operate on master: + // - evict leader: make the master resign if it is leader, and will not campaign the leader again + // - cancel evict leader: the master can campaign leader again. + rpc OperateLeader(OperateLeaderRequest) returns(OperateLeaderResponse) { + option (google.api.http) = { + put: "/apis/v1alpha1/leader/{op}" + body: "*" + }; + } + + // ListMember list member information + rpc ListMember(ListMemberRequest) returns(ListMemberResponse) { + option (google.api.http) = { + get: "/apis/v1alpha1/members" + }; + } + + rpc OperateSchema(OperateSchemaRequest) returns(OperateSchemaResponse) { + option (google.api.http) = { + put: "/apis/v1alpha1/schema" + body: "*" + }; + } + + rpc GetSubTaskCfg(GetSubTaskCfgRequest) returns(GetSubTaskCfgResponse) { + option (google.api.http) = { + get: "/apis/v1alpha1/subtasks/{name}" + }; + } + + // GetCfg get config + rpc GetCfg(GetCfgRequest) returns(GetCfgResponse) { + option (google.api.http) = { + get: "/apis/v1alpha1/tasks/{name}" + }; + } + + rpc HandleError(HandleErrorRequest) returns(HandleErrorResponse) { + option (google.api.http) = { + put: "/apis/v1alpha1/errors" + body: "*" + }; + } + + rpc GetMasterCfg(GetMasterCfgRequest) returns(GetMasterCfgResponse) {} + + rpc TransferSource(TransferSourceRequest) returns(TransferSourceResponse) {} + + rpc OperateRelay(OperateRelayRequest) returns(OperateRelayResponse) {} } message StartTaskRequest { - string task = 1; // task's configuration, yaml format - repeated string sources = 2; // mysql source need to do start task, empty for all sources defined in the task config - bool removeMeta = 3; // whether to remove meta data for this task or not - string startTime = 4; // a highest priority field to specify starting of binlog replication + string task = 1; // task's configuration, yaml format + repeated string sources = 2; // mysql source need to do start task, empty for all sources defined in the task config + bool removeMeta = 3; // whether to remove meta data for this task or not + string startTime = 4; // a highest priority field to specify starting of binlog replication } message StartTaskResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } message OperateTaskRequest { - TaskOp op = 1; // Stop / Pause / Resume - string name = 2; // task's name - repeated string sources = 3; // sources need to do operation, empty for matched sources in processing the task + TaskOp op = 1; // Stop / Pause / Resume + string name = 2; // task's name + repeated string sources = 3; // sources need to do operation, empty for matched sources in processing the task } message OperateTaskResponse { - TaskOp op = 1; - bool result = 2; - string msg = 3; - repeated CommonWorkerResponse sources = 4; + TaskOp op = 1; + bool result = 2; + string msg = 3; + repeated CommonWorkerResponse sources = 4; } @@ -143,26 +143,26 @@ message OperateTaskResponse { // support update partial config for syncer, loader, etc later // sources need to do update, empty for all sources in processing the task message UpdateTaskRequest { - string task = 1; - repeated string sources = 2; + string task = 1; + repeated string sources = 2; } message UpdateTaskResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } message QueryStatusListRequest { - string name = 1; // task's name, empty for all tasks - repeated string sources = 2; // sources need to query, empty for all sources + string name = 1; // task's name, empty for all tasks + repeated string sources = 2; // sources need to query, empty for all sources } message QueryStatusListResponse { - bool result = 1; - string msg = 2; - repeated QueryStatusResponse sources = 3; + bool result = 1; + string msg = 2; + repeated QueryStatusResponse sources = 3; } // ShowDDLLocksRequest used to query DDL locks which are un-resolved @@ -171,8 +171,8 @@ message QueryStatusListResponse { // any DDL lock in which the source is synced or unsynced will return // if specify task and sources both, and sources not doing the task , it will return empty DDL locks message ShowDDLLocksRequest { - string task = 1; - repeated string sources = 2; // sources need to query, empty for all sources + string task = 1; + repeated string sources = 2; // sources need to query, empty for all sources } // DDLLock represents a DDL lock info (I known the name confused with DDLLockInfo, any suggestion?) @@ -185,19 +185,19 @@ message ShowDDLLocksRequest { // synced: already synced dm-workers // unsynced: pending to sync dm-workers message DDLLock { - string ID = 1; - string task = 2; - string mode = 3; - string owner = 4; - repeated string DDLs = 5; - repeated string synced = 6; - repeated string unsynced = 7; + string ID = 1; + string task = 2; + string mode = 3; + string owner = 4; + repeated string DDLs = 5; + repeated string synced = 6; + repeated string unsynced = 7; } message ShowDDLLocksResponse { - bool result = 1; - string msg = 2; - repeated DDLLock locks = 3; // all un-resolved DDL locks + bool result = 1; + string msg = 2; + repeated DDLLock locks = 3; // all un-resolved DDL locks } // UnlockDDLLockRequest used to unlock (resolve) DDL lock manually @@ -205,27 +205,27 @@ message ShowDDLLocksResponse { // replaceOwner: dm-worker used to replace the original DDL lock's owner // forceRemove: force to remove the DDL lock even fail to execute the DDL for the owner. message UnlockDDLLockRequest { - string ID = 1; - string replaceOwner = 2; - bool forceRemove = 3; + string ID = 1; + string replaceOwner = 2; + bool forceRemove = 3; } message UnlockDDLLockResponse { - bool result = 1; - string msg = 2; + bool result = 1; + string msg = 2; } // OperateWorkerRelayRequest represents a request for some dm-workers to operate relay unit message OperateWorkerRelayRequest { - RelayOp op = 1; // Stop / Pause / Resume - repeated string sources = 2; + RelayOp op = 1; // Stop / Pause / Resume + repeated string sources = 2; } message OperateWorkerRelayResponse { - RelayOp op = 1; - bool result = 2; - string msg = 3; - repeated CommonWorkerResponse sources = 4; + RelayOp op = 1; + bool result = 2; + string msg = 3; + repeated CommonWorkerResponse sources = 4; } // PurgeWorkerRelayRequest represents a request to purge relay log files for some dm-workers @@ -235,233 +235,234 @@ message OperateWorkerRelayResponse { // filename: whether purge relay log files before this filename // subDir: specify relay sub directory for @filename message PurgeWorkerRelayRequest { - repeated string sources = 1; - bool inactive = 2; - int64 time = 3; - string filename = 4; - string subDir = 5; + repeated string sources = 1; + bool inactive = 2; + int64 time = 3; + string filename = 4; + string subDir = 5; } message PurgeWorkerRelayResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } message CheckTaskRequest { - string task = 1; // task's configuration, yaml format - int64 errCnt = 2; // max error count to display - int64 warnCnt = 3; // max warn count to display - string startTime = 4; // a highest priority field to specify starting of binlog replication + string task = 1; // task's configuration, yaml format + int64 errCnt = 2; // max error count to display + int64 warnCnt = 3; // max warn count to display + string startTime = 4; // a highest priority field to specify starting of binlog replication } message CheckTaskResponse { - bool result = 1; - string msg = 2; + bool result = 1; + string msg = 2; } enum SourceOp { - InvalidSourceOp = 0; - StartSource = 1; - UpdateSource = 2; - StopSource = 3; - ShowSource = 4; + InvalidSourceOp = 0; + StartSource = 1; + UpdateSource = 2; + StopSource = 3; + ShowSource = 4; } message OperateSourceRequest { - SourceOp op = 1; - repeated string config = 2; - repeated string sourceID = 3; + SourceOp op = 1; + repeated string config = 2; + repeated string sourceID = 3; + string workerName = 4; } message OperateSourceResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } message RegisterWorkerRequest { - string name = 1; - string address = 2; + string name = 1; + string address = 2; } message RegisterWorkerResponse { - bool result = 1; - string msg = 2; + bool result = 1; + string msg = 2; } message OfflineMemberRequest { - string type = 1; - string name = 2; + string type = 1; + string name = 2; } message OfflineMemberResponse { - bool result = 1; - string msg = 2; + bool result = 1; + string msg = 2; } enum LeaderOp { - InvalidLeaderOp = 0; - EvictLeaderOp = 1; - CancelEvictLeaderOp = 2; + InvalidLeaderOp = 0; + EvictLeaderOp = 1; + CancelEvictLeaderOp = 2; } message OperateLeaderRequest { - LeaderOp op = 1; + LeaderOp op = 1; } message OperateLeaderResponse { - bool result = 1; - string msg = 2; + bool result = 1; + string msg = 2; } message MasterInfo { - string name = 1; - uint64 memberID = 2; - bool alive = 3; - repeated string peerURLs = 4; - repeated string clientURLs = 5; + string name = 1; + uint64 memberID = 2; + bool alive = 3; + repeated string peerURLs = 4; + repeated string clientURLs = 5; } message WorkerInfo { - string name = 1; - string addr = 2; - string stage = 3; - string source = 4; + string name = 1; + string addr = 2; + string stage = 3; + string source = 4; } message ListLeaderMember { - string msg = 1; - string name = 2; - string addr = 3; + string msg = 1; + string name = 2; + string addr = 3; } message ListMasterMember { - string msg = 1; - repeated MasterInfo masters = 2; + string msg = 1; + repeated MasterInfo masters = 2; } message ListWorkerMember { - string msg = 1; - repeated WorkerInfo workers = 2; + string msg = 1; + repeated WorkerInfo workers = 2; } message Members { - oneof member { - ListLeaderMember leader = 1; - ListMasterMember master = 2; - ListWorkerMember worker = 3; - } + oneof member { + ListLeaderMember leader = 1; + ListMasterMember master = 2; + ListWorkerMember worker = 3; + } } message ListMemberRequest { - bool leader = 1; - bool master = 2; - bool worker = 3; - repeated string names = 4; + bool leader = 1; + bool master = 2; + bool worker = 3; + repeated string names = 4; } message ListMemberResponse { - bool result = 1; - string msg = 2; - repeated Members members = 3; + bool result = 1; + string msg = 2; + repeated Members members = 3; } message OperateSchemaRequest { - SchemaOp op = 1; // operation type - string task = 2; // task name - repeated string sources = 3; // source ID list - string database = 4; // database name - string table = 5; // table name - string schema = 6; // schema content, a `CREATE TABLE` statement - bool flush = 7; // flush table info and checkpoint - bool sync = 8; // sync the table info to master - bool fromSource = 9; // update schema from source schema - bool fromTarget = 10; // update schema from target schema + SchemaOp op = 1; // operation type + string task = 2; // task name + repeated string sources = 3; // source ID list + string database = 4; // database name + string table = 5; // table name + string schema = 6; // schema content, a `CREATE TABLE` statement + bool flush = 7; // flush table info and checkpoint + bool sync = 8; // sync the table info to master + bool fromSource = 9; // update schema from source schema + bool fromTarget = 10; // update schema from target schema } message OperateSchemaResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } message GetSubTaskCfgRequest { - // the task name - string name = 1; + // the task name + string name = 1; } message GetSubTaskCfgResponse { - bool result = 1; - string msg = 2; - repeated string cfgs = 3; + bool result = 1; + string msg = 2; + repeated string cfgs = 3; } enum CfgType { - InvalidType = 0; - TaskType = 1; - MasterType = 2; - WorkerType = 3; - SourceType = 4; - TaskTemplateType = 5; + InvalidType = 0; + TaskType = 1; + MasterType = 2; + WorkerType = 3; + SourceType = 4; + TaskTemplateType = 5; } message GetCfgRequest { - CfgType type = 1; // the config type - string name = 2; // the config name + CfgType type = 1; // the config type + string name = 2; // the config name } message GetCfgResponse { - bool result = 1; - string msg = 2; - string cfg = 3; + bool result = 1; + string msg = 2; + string cfg = 3; } message GetMasterCfgRequest { } message GetMasterCfgResponse { - string cfg = 1; + string cfg = 1; } message HandleErrorRequest { - ErrorOp op = 1; // operation type - string task = 2; // the task name - repeated string sources = 3; // source ID list - string binlogPos = 4; // binlog-pos (that's file:pos format) - repeated string sqls = 5; // sqls (use for replace) + ErrorOp op = 1; // operation type + string task = 2; // the task name + repeated string sources = 3; // source ID list + string binlogPos = 4; // binlog-pos (that's file:pos format) + repeated string sqls = 5; // sqls (use for replace) } message HandleErrorResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } message TransferSourceRequest { - string source = 1; - string worker = 2; + string source = 1; + string worker = 2; } message TransferSourceResponse { - bool result = 1; - string msg = 2; + bool result = 1; + string msg = 2; } message OperateRelayRequest { - RelayOpV2 op = 1; - string source = 2; - repeated string worker = 3; + RelayOpV2 op = 1; + string source = 2; + repeated string worker = 3; } message OperateRelayResponse { - bool result = 1; - string msg = 2; - repeated CommonWorkerResponse sources = 3; + bool result = 1; + string msg = 2; + repeated CommonWorkerResponse sources = 3; } enum RelayOpV2 { - InvalidRelayOpV2 = 0; - StartRelayV2 = 1; - StopRelayV2 = 2; + InvalidRelayOpV2 = 0; + StartRelayV2 = 1; + StopRelayV2 = 2; } diff --git a/dm/errors.toml b/dm/errors.toml index 9f0e66dd73e..d35537ee54e 100644 --- a/dm/errors.toml +++ b/dm/errors.toml @@ -3226,6 +3226,12 @@ description = "" workaround = "Please pause task by `dmctl pause-task`." tags = ["internal", "low"] +[error.DM-scheduler-46033] +message = "dm-worker with name %s not free" +description = "" +workaround = "" +tags = ["internal", "low"] + [error.DM-dmctl-48001] message = "can not create grpc connection" description = "" diff --git a/dm/pkg/terror/error_list.go b/dm/pkg/terror/error_list.go index 49bd3d906d3..3d12368e2e8 100644 --- a/dm/pkg/terror/error_list.go +++ b/dm/pkg/terror/error_list.go @@ -653,6 +653,7 @@ const ( codeSchedulerStartRelayOnBound codeSchedulerStopRelayOnBound codeSchedulerPauseTaskForTransferSource + codeSchedulerWorkerNotFree ) // dmctl error code. @@ -1305,7 +1306,7 @@ var ( ErrSchedulerStartRelayOnBound = New(codeSchedulerStartRelayOnBound, ClassScheduler, ScopeInternal, LevelLow, "the source has `start-relay` automatically for bound worker, so it can't `start-relay` with worker name now", "Please stop relay by `stop-relay` without worker name first.") ErrSchedulerStopRelayOnBound = New(codeSchedulerStopRelayOnBound, ClassScheduler, ScopeInternal, LevelLow, "the source has `start-relay` automatically for bound worker, so it can't `stop-relay` with worker name now", "Please use `stop-relay` without worker name.") ErrSchedulerPauseTaskForTransferSource = New(codeSchedulerPauseTaskForTransferSource, ClassScheduler, ScopeInternal, LevelLow, "failed to auto pause tasks %s when transfer-source", "Please pause task by `dmctl pause-task`.") - + ErrSchedulerWorkerNotFree = New(codeSchedulerWorkerNotFree, ClassScheduler, ScopeInternal, LevelLow, "dm-worker with name %s not free", "") // dmctl. ErrCtlGRPCCreateConn = New(codeCtlGRPCCreateConn, ClassDMCtl, ScopeInternal, LevelHigh, "can not create grpc connection", "Please check your network connection.") ErrCtlInvalidTLSCfg = New(codeCtlInvalidTLSCfg, ClassDMCtl, ScopeInternal, LevelMedium, "invalid TLS config", "Please check the `ssl-ca`, `ssl-cert` and `ssl-key` config in command line.") diff --git a/dm/tests/_utils/env_variables b/dm/tests/_utils/env_variables index 2818e72294c..a0ae74c9ef1 100755 --- a/dm/tests/_utils/env_variables +++ b/dm/tests/_utils/env_variables @@ -27,6 +27,8 @@ WORKER2_PORT=8263 WORKER3_PORT=8264 WORKER4_PORT=18262 WORKER5_PORT=18263 +WORKER1_NAME=worker1 +WORKER2_NAME=worker2 SOURCE_ID1="mysql-replica-01" SOURCE_ID2="mysql-replica-02" RESET_MASTER=${RESET_MASTER:-true} diff --git a/dm/tests/dmctl_basic/check_list/operate_source.sh b/dm/tests/dmctl_basic/check_list/operate_source.sh index 58e82590db3..5c02f31443c 100644 --- a/dm/tests/dmctl_basic/check_list/operate_source.sh +++ b/dm/tests/dmctl_basic/check_list/operate_source.sh @@ -3,7 +3,7 @@ function operate_source_empty_arg() { run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ "operate-source" \ - "operate-source \[config-file ...\] \[--print-sample-config\] \[flags\]" 1 + "operate-source \[config-file ...\] \[-w worker\] \[--print-sample-config\] \[flags\]" 1 } function operate_source_wrong_config_file() { diff --git a/dm/tests/dmctl_command/run.sh b/dm/tests/dmctl_command/run.sh index 8d9ba8efbd4..2b73bb8ac55 100644 --- a/dm/tests/dmctl_command/run.sh +++ b/dm/tests/dmctl_command/run.sh @@ -81,7 +81,22 @@ function run() { cp $cur/conf/source1.yaml $WORK_DIR/source1.yaml cp $cur/conf/source2.yaml $WORK_DIR/source2.yaml sed -i "/relay-binlog-name/i\relay-dir: $WORK_DIR/worker1/relay_log" $WORK_DIR/source1.yaml - dmctl_operate_source create $WORK_DIR/source1.yaml $SOURCE_ID1 + run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ + "operate-source create $WORK_DIR/source1.yaml -w $WORKER1_NAME" \ + "\"result\": true" 2 \ + "\"source\": \"mysql-replica-01\"" 1 + run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \ + "list-member --name worker1" \ + "\"stage\": \"bound\"" 1 \ + "\"source\": \"mysql-replica-01\"" 1 + run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ + "operate-source create $WORK_DIR/source2.yaml -w wrong-worker" \ + "\"result\": false" 1 \ + "not exists" 1 + run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ + "operate-source create $WORK_DIR/source2.yaml -w worker1" \ + "\"result\": false" 1 \ + "not free" 1 dmctl_operate_source create $WORK_DIR/source2.yaml $SOURCE_ID2 # check wrong do-tables