Skip to content

Commit

Permalink
fix(CCE/node_pool): add new pending status in wairfor (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang authored Nov 25, 2023
1 parent 3cef16f commit 27fedef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flexibleengine/resource_flexibleengine_cce_node_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions flexibleengine/resource_flexibleengine_cce_node_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 27fedef

Please sign in to comment.