Skip to content

Commit 1eeba86

Browse files
authored
Merge pull request #721 from rawmind0/clustersync
Updated WaitForClusterState() function to check for cluster transitioning before return error
2 parents 22d08a1 + ab69bc8 commit 1eeba86

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.17.0 (Unreleased)
1+
## 1.17.0 (August 12, 2021)
22

33
FEATURES:
44

@@ -13,16 +13,17 @@ FEATURES:
1313

1414
ENHANCEMENTS:
1515

16-
* Added tolerations schema, structure and tests
16+
* Added `tolerations` schema, structure and tests
1717
* Updated `rancher2_cluster` resource to properly generate cluster registration token
1818
* Minor `rancher2_catalog_v2` and `rancher2_secret_v2` datasource docs update
1919
* Added verb `deletecollection` to policy rule
20+
* Updated `WaitForClusterState` function to check for cluster transitioning before return error
2021

2122
BUG FIXES:
2223

2324
* Updated `rancher2_notifier` resource to be replaced on update
2425
* Fixed `rancher2_cluster.eks_config_v2` to avoid false diff
25-
* Updated rancher2_notifier resource to be replaced on update
26+
* Updated `rancher2_notifier` resource to be replaced on update
2627
* Updated `rancher2_cluster` docs to proper format yaml examples
2728

2829
## 1.16.0 (July 15, 2021)

rancher2/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,10 @@ func (c *Config) WaitForClusterState(clusterID, state string, interval time.Dura
735735
if obj.Conditions[i].Status == "True" {
736736
return obj, nil
737737
}
738+
// When condition is false, checking if the cluster is transitioning to still wait for condition
739+
if obj.Transitioning == "yes" {
740+
break
741+
}
738742
return nil, fmt.Errorf("Cluster ID %s: %s", clusterID, obj.Conditions[i].Message)
739743
}
740744
}

0 commit comments

Comments
 (0)