Skip to content

Commit e4fd5a4

Browse files
committed
Fix version_update role - cluster never upgrade before case
hm... testing `ansible-test integration version_update` failed when run against NUC. NUC was never upgraded before. Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
1 parent 51ac1b0 commit e4fd5a4

File tree

1 file changed

+8
-2
lines changed
  • tests/integration/targets/version_update/tasks

1 file changed

+8
-2
lines changed

tests/integration/targets/version_update/tasks/main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
- name: Get status of the latest update applied
2525
scale_computing.hypercore.version_update_status_info:
2626
register: update_status
27+
# Fail early if update is in progress
2728
- ansible.builtin.assert:
2829
that:
29-
- update_status.record.update_status == "COMPLETE" or update_status.record.update_status == "TERMINATING" # Fail early if update in progress
30+
- >-
31+
update_status.record == None or
32+
update_status.record.update_status == "COMPLETE" or
33+
update_status.record.update_status == "TERMINATING"
3034
3135
- name: Update to the same hc version
3236
scale_computing.hypercore.version_update:
@@ -53,7 +57,9 @@
5357
- name: Get status of the latest update applied
5458
scale_computing.hypercore.version_update_status_info:
5559
register: update_status
56-
until: update_status.record.update_status == "EXECUTING"
60+
# It takes a while (2 minutes) for update_status.json to appear.
61+
# We get update_status.record=None on first invocation.
62+
until: update_status.record != None and update_status.record.update_status == "EXECUTING"
5763
retries: 100
5864
delay: 5
5965
- ansible.builtin.assert:

0 commit comments

Comments
 (0)