Commit 8245f53
authored
Fix panic on failure to get loadbalancer status (kubernetes#2512)
After loadbalancer creation, the controller calls a wait function that
polls the Octavia API until its state turns ACTIVE, or timeout is
reached.
Before this patch, a failure to GET the loadbalancer in the wait
function would result in a nil loadbalancer to be returned to the
caller, resulting in an immediate panic when accessing its members.
With this patch:
* GET failures are logged and don't break the polling;
* if the wait timeout is reached while GET is failing, the behaviour
exactly matches what happens when reaching the timeout.1 parent 1f9a46d commit 8245f53
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
1896 | 1896 | | |
1897 | 1897 | | |
1898 | 1898 | | |
1899 | | - | |
| 1899 | + | |
1900 | 1900 | | |
1901 | 1901 | | |
1902 | 1902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
0 commit comments