wait: Verify observed_generation exists

Currently, Armada checks if the observed generation of a resource is
zero for resource wait operations; however, the value can be None in
some cases. This change verifies that the value is not zero and exists.

Change-Id: Ib81be3468e73c72b4f20c11e18120d8a5b845e59
This commit is contained in:
Drew Walters 2019-02-07 02:34:00 -06:00
parent 5071ef0ca5
commit 56ee364b75
1 changed files with 1 additions and 1 deletions

View File

@ -560,7 +560,7 @@ class StatefulSetWait(ControllerWait):
msg.format(spec.update_strategy.type,
ROLLING_UPDATE_STRATEGY_TYPE))
if (status.observed_generation == 0 or
if (not status.observed_generation or
sts.metadata.generation > status.observed_generation):
msg = "Waiting for statefulset spec update to be observed..."
return (msg, False)