@@ -1750,7 +1750,17 @@ var _ = Describe("Operator", Label("e2e", "pr"), func() {
1750
1750
})
1751
1751
1752
1752
When ("running with tester processes" , func () {
1753
+ fdbAutomaticallyRemoveOldTester := false
1754
+
1753
1755
BeforeEach (func () {
1756
+ fdbVersion := fdbCluster .GetCluster ().GetRunningVersion ()
1757
+ version , err := fdbv1beta2 .ParseFdbVersion (fdbVersion )
1758
+ Expect (err ).NotTo (HaveOccurred ())
1759
+
1760
+ if version .AutomaticallyRemovesDeadTesterProcesses () {
1761
+ fdbAutomaticallyRemoveOldTester = true
1762
+ }
1763
+
1754
1764
// We will be restarting the CC, so we can ignore this check.
1755
1765
availabilityCheck = false
1756
1766
spec := fdbCluster .GetCluster ().Spec .DeepCopy ()
@@ -1789,25 +1799,27 @@ var _ = Describe("Operator", Label("e2e", "pr"), func() {
1789
1799
factory .Delete (& pod )
1790
1800
}
1791
1801
1792
- // Wait until the cluster shows the unreachable process.
1793
- Eventually (func () []string {
1794
- status := fdbCluster .GetStatus ()
1802
+ if ! fdbAutomaticallyRemoveOldTester {
1803
+ // Wait until the cluster shows the unreachable process.
1804
+ Eventually (func () []string {
1805
+ status := fdbCluster .GetStatus ()
1795
1806
1796
- messages := make ([]string , 0 , len (status .Cluster .Messages ))
1797
- for _ , message := range status .Cluster .Messages {
1798
- messages = append (messages , message .Name )
1799
- }
1807
+ messages := make ([]string , 0 , len (status .Cluster .Messages ))
1808
+ for _ , message := range status .Cluster .Messages {
1809
+ messages = append (messages , message .Name )
1810
+ }
1800
1811
1801
- log .Println ("current messages:" , messages )
1812
+ log .Println ("current messages:" , messages )
1802
1813
1803
- return messages
1804
- }).WithPolling (1 * time .Second ).WithTimeout (2 * time .Minute ).MustPassRepeatedly (5 ).Should (ContainElements ("status_incomplete" , "unreachable_processes" ))
1814
+ return messages
1815
+ }).WithPolling (1 * time .Second ).WithTimeout (2 * time .Minute ).MustPassRepeatedly (5 ).Should (ContainElements ("status_incomplete" , "unreachable_processes" ))
1816
+ }
1805
1817
1806
1818
// Let the operator fix the issue.
1807
1819
Expect (fdbCluster .SetSkipReconciliation (false )).NotTo (HaveOccurred ())
1808
1820
})
1809
1821
1810
- It ("should restart the cluster controller " , func () {
1822
+ It ("should show the status without any messages " , func () {
1811
1823
// The operator should be restarting the cluster controller and this should clean the unreachable_processes
1812
1824
Eventually (func () []string {
1813
1825
status := fdbCluster .GetStatus ()
@@ -1854,19 +1866,21 @@ var _ = Describe("Operator", Label("e2e", "pr"), func() {
1854
1866
chaosmesh .From ,
1855
1867
)
1856
1868
1857
- // Wait until the cluster shows the unreachable process.
1858
- Eventually (func () []string {
1859
- status := fdbCluster .GetStatus ()
1869
+ if ! fdbAutomaticallyRemoveOldTester {
1870
+ // Wait until the cluster shows the unreachable process.
1871
+ Eventually (func () []string {
1872
+ status := fdbCluster .GetStatus ()
1860
1873
1861
- messages := make ([]string , 0 , len (status .Cluster .Messages ))
1862
- for _ , message := range status .Cluster .Messages {
1863
- messages = append (messages , message .Name )
1864
- }
1874
+ messages := make ([]string , 0 , len (status .Cluster .Messages ))
1875
+ for _ , message := range status .Cluster .Messages {
1876
+ messages = append (messages , message .Name )
1877
+ }
1865
1878
1866
- log .Println ("current messages:" , messages )
1879
+ log .Println ("current messages:" , messages )
1867
1880
1868
- return messages
1869
- }).WithPolling (1 * time .Second ).WithTimeout (2 * time .Minute ).MustPassRepeatedly (5 ).Should (ContainElements ("status_incomplete" , "unreachable_processes" ))
1881
+ return messages
1882
+ }).WithPolling (1 * time .Second ).WithTimeout (2 * time .Minute ).MustPassRepeatedly (5 ).Should (ContainElements ("status_incomplete" , "unreachable_processes" ))
1883
+ }
1870
1884
1871
1885
// Let the operator fix the issue.
1872
1886
Expect (fdbCluster .SetSkipReconciliation (false )).NotTo (HaveOccurred ())
@@ -1876,8 +1890,7 @@ var _ = Describe("Operator", Label("e2e", "pr"), func() {
1876
1890
factory .DeleteChaosMeshExperimentSafe (exp )
1877
1891
})
1878
1892
1879
- // TODO what will be the status here?
1880
- It ("should restart the cluster controller" , func () {
1893
+ It ("should show the status without any messages" , func () {
1881
1894
// The operator should be restarting the cluster controller and this should clean the unreachable_processes
1882
1895
Eventually (func () []string {
1883
1896
status := fdbCluster .GetStatus ()
0 commit comments