From 9d4d1c248f923e0427ef0ecc9aa88aaaa293b661 Mon Sep 17 00:00:00 2001 From: Justin Cinkelj Date: Mon, 8 May 2023 10:42:07 +0200 Subject: [PATCH] Cleanup unneeded condition The version_update_status_info uses undocumented API endpoint, it is hard to know what is returned. I believe we wanted to have `==COMPLETE`, not `==COMPLETED`. I believe whole condition is there only to prevent starting second upgrade before the first one is finished - `.update_status != "IN PROGRESS"` is sufficient. A corner case would be if `.update_status == SOME_ERROR` or similar. In this case `!= "IN PROGRESS"` would still allow starting an upgrade. The `==COMPLETE` is again not needed - better to remove it, it just adds to confusion. Signed-off-by: Justin Cinkelj --- roles/version_update_single_node/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/version_update_single_node/tasks/main.yml b/roles/version_update_single_node/tasks/main.yml index b32ec8fd3..3fa273911 100644 --- a/roles/version_update_single_node/tasks/main.yml +++ b/roles/version_update_single_node/tasks/main.yml @@ -89,5 +89,4 @@ - cluster_info.record.icos_version != scale_computing_hypercore_desired_version - >- update_status_before_update.record == None or - update_status_before_update.record.update_status == "COMPLETED" or update_status_before_update.record.update_status != "IN PROGRESS"