summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Walters <drewwalters96@gmail.com>2019-02-07 02:34:00 -0600
committerDrew Walters <drewwalters96@gmail.com>2019-02-07 20:07:20 -0600
commit56ee364b753b9097ea7b4cf06b710ae2b59d536b (patch)
tree2f0ef8e5fbd4212d83e5cd6577d7744aa7f01887
parent5071ef0ca565e09946a6fddc83867222404e8729 (diff)
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
Notes
Notes (review): Code-Review+2: Bryan Strassner <strassner.bryan@gmail.com> Code-Review+2: Sean Eagan <sean.eagan@att.com> Workflow+1: Sean Eagan <sean.eagan@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 08 Feb 2019 05:34:21 +0000 Reviewed-on: https://review.openstack.org/635704 Project: openstack/airship-armada Branch: refs/heads/master
-rw-r--r--armada/handlers/wait.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/armada/handlers/wait.py b/armada/handlers/wait.py
index 0c80438..3b02180 100644
--- a/armada/handlers/wait.py
+++ b/armada/handlers/wait.py
@@ -560,7 +560,7 @@ class StatefulSetWait(ControllerWait):
560 msg.format(spec.update_strategy.type, 560 msg.format(spec.update_strategy.type,
561 ROLLING_UPDATE_STRATEGY_TYPE)) 561 ROLLING_UPDATE_STRATEGY_TYPE))
562 562
563 if (status.observed_generation == 0 or 563 if (not status.observed_generation or
564 sts.metadata.generation > status.observed_generation): 564 sts.metadata.generation > status.observed_generation):
565 msg = "Waiting for statefulset spec update to be observed..." 565 msg = "Waiting for statefulset spec update to be observed..."
566 return (msg, False) 566 return (msg, False)