From bb47fb518d2c25599e181209695bd04e8d735d3e Mon Sep 17 00:00:00 2001 From: mozillazg Date: Wed, 27 Nov 2024 10:56:57 +0800 Subject: [PATCH] rrsa: add sleep 30s before check task state --- pkg/ctl/rrsa/disable/disable.go | 1 + pkg/ctl/rrsa/enable/enable.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/ctl/rrsa/disable/disable.go b/pkg/ctl/rrsa/disable/disable.go index 858d13e8..bf62be4c 100644 --- a/pkg/ctl/rrsa/disable/disable.go +++ b/pkg/ctl/rrsa/disable/disable.go @@ -40,6 +40,7 @@ var cmd = &cobra.Command{ spin.Stop() ctlcommon.ExitByError(fmt.Sprintf("Failed to disable RRSA feature for cluster %s: %+v", clusterId, err)) } + time.Sleep(time.Second * 30) ctx, cancel := context.WithTimeout(ctx, time.Minute*15) defer cancel() if err := common.WaitClusterUpdateFinished(ctx, clusterId, task.TaskId, client); err != nil { diff --git a/pkg/ctl/rrsa/enable/enable.go b/pkg/ctl/rrsa/enable/enable.go index 812f9e30..586ff18f 100644 --- a/pkg/ctl/rrsa/enable/enable.go +++ b/pkg/ctl/rrsa/enable/enable.go @@ -41,6 +41,7 @@ var cmd = &cobra.Command{ spin.Stop() ctlcommon.ExitByError(fmt.Sprintf("Failed to enable RRSA feature for cluster %s: %+v", clusterId, err)) } + time.Sleep(time.Second * 30) ctx, cancel := context.WithTimeout(ctx, time.Minute*15) defer cancel() if err := common.WaitClusterUpdateFinished(ctx, clusterId, task.TaskId, client); err != nil {