From 6a21f12ec616039dd48b5fd51fcfbc04f8b3282f Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 13 Apr 2022 11:31:47 +0200 Subject: [PATCH 1/2] Improve wait-for-ocis check Retry on all HTTP response codes indicating and error. --- .drone.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.star b/.drone.star index 67b0760d67..8126cdbb8e 100644 --- a/.drone.star +++ b/.drone.star @@ -1735,7 +1735,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = "name": "wait-for-ocis-server", "image": OC_CI_ALPINE, "commands": [ - "curl -k -u admin:admin --retry 10 --retry-all-errors 'https://ocis-server:9200/graph/v1.0/users/ddc2004c-0977-11eb-9d3f-a793888cd0f8'", + "curl -k -u admin:admin --fail --retry-connrefused --retry 10 --retry-all-errors 'https://ocis-server:9200/graph/v1.0/users/ddc2004c-0977-11eb-9d3f-a793888cd0f8'", ], "depends_on": depends_on, }, From 3e0158e4a6a6752283454200343485386bf85141 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 13 Apr 2022 12:22:15 +0200 Subject: [PATCH 2/2] Use a different wait for ocis check in the parallel deployment The routing in the parallel deployment is directed to oc10 by default, which might not have and admin user and does not provide the graph API. Switch back to the old wait-for image, which should be good enough in that specific test setup. --- .drone.star | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.drone.star b/.drone.star index 8126cdbb8e..d5f2a49222 100644 --- a/.drone.star +++ b/.drone.star @@ -1630,6 +1630,14 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = "ACCOUNTS_DEMO_USERS_AND_GROUPS": True, # deprecated, remove after switching to LibreIDM "IDM_CREATE_DEMO_USERS": True, } + wait_for_ocis = { + "name": "wait-for-ocis-server", + "image": OC_CI_ALPINE, + "commands": [ + "curl -k -u admin:admin --fail --retry-connrefused --retry 10 --retry-all-errors 'https://ocis-server:9200/graph/v1.0/users/ddc2004c-0977-11eb-9d3f-a793888cd0f8'", + ], + "depends_on": depends_on, + } else: user = "33:33" environment = { @@ -1710,6 +1718,14 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = "ACCOUNTS_DEMO_USERS_AND_GROUPS": True, # deprecated, remove after switching to LibreIDM "IDM_CREATE_DEMO_USERS": True, } + wait_for_ocis = { + "name": "wait-for-ocis-server", + "image": OC_CI_WAIT_FOR, + "commands": [ + "wait-for -it ocis-server:9200 -t 300", + ], + "depends_on": depends_on, + } # Pass in "default" accounts_hash_difficulty to not set this environment variable. # That will allow OCIS to use whatever its built-in default is. @@ -1731,14 +1747,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = "volumes": volumes, "depends_on": depends_on, }, - { - "name": "wait-for-ocis-server", - "image": OC_CI_ALPINE, - "commands": [ - "curl -k -u admin:admin --fail --retry-connrefused --retry 10 --retry-all-errors 'https://ocis-server:9200/graph/v1.0/users/ddc2004c-0977-11eb-9d3f-a793888cd0f8'", - ], - "depends_on": depends_on, - }, + wait_for_ocis, ] def middlewareService():