mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #82721 from hwdef/add-err-handling-in-images/etcd/migrate
add-err-handling-in-images/etcd/migrate
This commit is contained in:
commit
8453e90500
@ -151,9 +151,12 @@ func TestBackup(t *testing.T) {
|
||||
|
||||
func newTestPath(t *testing.T) string {
|
||||
path, err := ioutil.TempDir("", "etcd-migrate-test-")
|
||||
os.Chmod(path, 0777)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create tmp dir for test: %v", err)
|
||||
}
|
||||
err = os.Chmod(path, 0777)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to granting permission to tmp dir for test: %v", err)
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
@ -77,7 +77,10 @@ func main() {
|
||||
flags.StringVar(&opts.targetVersion, "target-version", "", "version of etcd to migrate to. Format must be '<major>.<minor>.<patch>'")
|
||||
flags.StringVar(&opts.targetStorage, "target-storage", "", "storage version of etcd to migrate to, one of: etcd2, etcd3")
|
||||
flags.StringVar(&opts.etcdServerArgs, "etcd-server-extra-args", "", "additional etcd server args for starting etcd servers during migration steps, --peer-* TLS cert flags should be added for etcd clusters with more than 1 member that use mutual TLS for peer communication.")
|
||||
migrateCmd.Execute()
|
||||
err := migrateCmd.Execute()
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to execute migratecmd: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// runMigrate validates the command line flags and starts the migration.
|
||||
|
Loading…
Reference in New Issue
Block a user