@@ -72,13 +72,16 @@ def test_migrate_from_forced_down_host(self):
72
72
source_compute_id = self .api .get_services (
73
73
host = 'src' , binary = 'nova-compute' )[0 ]['id' ]
74
74
self .api .put_service (source_compute_id , {'forced_down' : 'true' })
75
+ # NOTE(gibi): extra retries are needed as the default 10 retries with
76
+ # 0.5 second sleep is close to the 6 seconds down timeout
75
77
self ._wait_for_service_parameter (
76
78
'src' , 'nova-compute' ,
77
79
{
78
80
'forced_down' : True ,
79
81
'state' : 'down' ,
80
82
'status' : 'enabled'
81
- }
83
+ },
84
+ max_retries = 20 ,
82
85
)
83
86
84
87
# Assert that we cannot migrate from a forced down compute
@@ -94,12 +97,15 @@ def test_migrate_from_down_host(self):
94
97
95
98
# Stop the compute service and wait until it's down
96
99
self .computes ['src' ].stop ()
100
+ # NOTE(gibi): extra retries are needed as the default 10 retries with
101
+ # 0.5 second sleep is close to the 6 seconds down timeout
97
102
self ._wait_for_service_parameter (
98
103
'src' , 'nova-compute' ,
99
104
{
100
105
'state' : 'down' ,
101
106
'status' : 'enabled'
102
- }
107
+ },
108
+ max_retries = 20 ,
103
109
)
104
110
105
111
# Assert that requests to migrate from down computes are rejected
@@ -123,8 +129,10 @@ def test_migrate_from_disabled_down_host(self):
123
129
124
130
# Stop the compute service and wait until it's down
125
131
self .computes ['src' ].stop ()
132
+ # NOTE(gibi): extra retries are needed as the default 10 retries with
133
+ # 0.5 second sleep is close to the 6 seconds down timeout
126
134
self ._wait_for_service_parameter (
127
- 'src' , 'nova-compute' , {'state' : 'down' })
135
+ 'src' , 'nova-compute' , {'state' : 'down' }, max_retries = 20 )
128
136
129
137
ex = self .assertRaises (
130
138
client .OpenStackApiException , self .api .post_server_action ,
0 commit comments