From 5a577ebde9c7bad3848dce97b0a620a8f05f4ed2 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Wed, 2 Mar 2022 11:11:46 +0800 Subject: [PATCH] fix --ignore-config-check not working for deploy (#1774) --- components/cluster/command/deploy.go | 2 +- pkg/cluster/api/dmpb/dmmaster.pb.go | 7 ++++--- pkg/cluster/api/dmpb/dmworker.pb.go | 7 ++++--- pkg/cluster/manager/deploy.go | 15 +++++++-------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/components/cluster/command/deploy.go b/components/cluster/command/deploy.go index 15bf426f0b..77c4ca04eb 100644 --- a/components/cluster/command/deploy.go +++ b/components/cluster/command/deploy.go @@ -73,7 +73,7 @@ func newDeploy() *cobra.Command { cmd.Flags().BoolVarP(&opt.SkipCreateUser, "skip-create-user", "", false, "(EXPERIMENTAL) Skip creating the user specified in topology.") cmd.Flags().StringVarP(&opt.IdentityFile, "identity_file", "i", opt.IdentityFile, "The path of the SSH identity file. If specified, public key authentication will be used.") cmd.Flags().BoolVarP(&opt.UsePassword, "password", "p", false, "Use password of target hosts. If specified, password authentication will be used.") - cmd.Flags().BoolVarP(&opt.IgnoreConfigCheck, "ignore-config-check", "", opt.IgnoreConfigCheck, "Ignore the config check result") + cmd.Flags().BoolVarP(&gOpt.IgnoreConfigCheck, "ignore-config-check", "", false, "Ignore the config check result of components") cmd.Flags().BoolVarP(&opt.NoLabels, "no-labels", "", false, "Don't check TiKV labels") return cmd diff --git a/pkg/cluster/api/dmpb/dmmaster.pb.go b/pkg/cluster/api/dmpb/dmmaster.pb.go index d075ef95f7..fb452fa4b8 100644 --- a/pkg/cluster/api/dmpb/dmmaster.pb.go +++ b/pkg/cluster/api/dmpb/dmmaster.pb.go @@ -6,14 +6,15 @@ package dmpb import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/cluster/api/dmpb/dmworker.pb.go b/pkg/cluster/api/dmpb/dmworker.pb.go index 01efd3ac3b..a432114be4 100644 --- a/pkg/cluster/api/dmpb/dmworker.pb.go +++ b/pkg/cluster/api/dmpb/dmworker.pb.go @@ -7,13 +7,14 @@ import ( context "context" encoding_binary "encoding/binary" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/cluster/manager/deploy.go b/pkg/cluster/manager/deploy.go index 60e825c652..dd9ee7361a 100644 --- a/pkg/cluster/manager/deploy.go +++ b/pkg/cluster/manager/deploy.go @@ -40,14 +40,13 @@ import ( // DeployOptions contains the options for scale out. type DeployOptions struct { - User string // username to login to the SSH server - SkipCreateUser bool // don't create the user - IdentityFile string // path to the private key file - UsePassword bool // use password instead of identity file for ssh connection - IgnoreConfigCheck bool // ignore config check result - NoLabels bool // don't check labels for TiKV instance - Stage1 bool // don't start the new instance, just deploy - Stage2 bool // start instances and init Config after stage1 + User string // username to login to the SSH server + SkipCreateUser bool // don't create the user + IdentityFile string // path to the private key file + UsePassword bool // use password instead of identity file for ssh connection + NoLabels bool // don't check labels for TiKV instance + Stage1 bool // don't start the new instance, just deploy + Stage2 bool // start instances and init Config after stage1 } // DeployerInstance is a instance can deploy to a target deploy directory.