Browse Source

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
Drew Walters 2 months ago
parent
commit
56ee364b75
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      armada/handlers/wait.py

+ 1
- 1
armada/handlers/wait.py View File

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

Loading…
Cancel
Save