From 27fedef3bbc465d464d9a5ba8c4c551ae53838b3 Mon Sep 17 00:00:00 2001 From: wangzepeng <65212374+Zippo-Wang@users.noreply.github.com> Date: Sat, 25 Nov 2023 10:39:29 +0800 Subject: [PATCH] fix(CCE/node_pool): add new pending status in wairfor (#1071) --- flexibleengine/resource_flexibleengine_cce_node_pool.go | 4 ++-- flexibleengine/resource_flexibleengine_cce_node_v3.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flexibleengine/resource_flexibleengine_cce_node_pool.go b/flexibleengine/resource_flexibleengine_cce_node_pool.go index e297bbdb..b9c5baa8 100644 --- a/flexibleengine/resource_flexibleengine_cce_node_pool.go +++ b/flexibleengine/resource_flexibleengine_cce_node_pool.go @@ -315,7 +315,7 @@ func resourceCCENodePoolCreate(d *schema.ResourceData, meta interface{}) error { // wait for the cce cluster to become available clusterid := d.Get("cluster_id").(string) stateCluster := &resource.StateChangeConf{ - Pending: []string{"PENDING"}, + Pending: []string{"Available", "PENDING"}, Target: []string{"COMPLETED"}, Refresh: clusterStateRefreshFunc(nodePoolClient, clusterid, []string{"Available"}), Timeout: d.Timeout(schema.TimeoutCreate), @@ -528,7 +528,7 @@ func resourceCCENodePoolUpdate(d *schema.ResourceData, meta interface{}) error { } stateConf := &resource.StateChangeConf{ - Pending: []string{"PENDING"}, + Pending: []string{"Synchronizing", "Synchronized", "PENDING"}, Target: []string{"COMPLETED"}, Refresh: waitForCceNodePoolActive(nodePoolClient, clusterid, d.Id()), Timeout: d.Timeout(schema.TimeoutCreate), diff --git a/flexibleengine/resource_flexibleengine_cce_node_v3.go b/flexibleengine/resource_flexibleengine_cce_node_v3.go index 5111fd7e..fa01003a 100644 --- a/flexibleengine/resource_flexibleengine_cce_node_v3.go +++ b/flexibleengine/resource_flexibleengine_cce_node_v3.go @@ -507,7 +507,7 @@ func resourceCCENodeV3Create(d *schema.ResourceData, meta interface{}) error { clusterid := d.Get("cluster_id").(string) stateCluster := &resource.StateChangeConf{ Pending: []string{"PENDING"}, - Target: []string{"COMPLETED"}, + Target: []string{"Available", "COMPLETED"}, Refresh: clusterStateRefreshFunc(nodeClient, clusterid, []string{"Available"}), Timeout: d.Timeout(schema.TimeoutCreate), Delay: 5 * time.Second, @@ -541,7 +541,7 @@ func resourceCCENodeV3Create(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Waiting for CCE Node (%s) to become available", s.Metadata.Name) stateConf := &resource.StateChangeConf{ - Pending: []string{"PENDING"}, + Pending: []string{"Build", "Installing", "PENDING"}, Target: []string{"Active"}, Refresh: waitForCceNodeActive(nodeClient, clusterid, nodeID), Timeout: d.Timeout(schema.TimeoutCreate),