From b5581d2b2f7bc510e3fcdf5230e1386d26b8f003 Mon Sep 17 00:00:00 2001 From: Peter Braun Date: Fri, 13 Jul 2018 19:28:04 +0200 Subject: [PATCH 1/2] dont require service binding id --- roles/bind-unifiedpush-apb/tasks/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/bind-unifiedpush-apb/tasks/main.yml b/roles/bind-unifiedpush-apb/tasks/main.yml index 568b55c..00e2b5b 100644 --- a/roles/bind-unifiedpush-apb/tasks/main.yml +++ b/roles/bind-unifiedpush-apb/tasks/main.yml @@ -1,10 +1,15 @@ # Store the name of the service instance. It's required for some purposes like adding # annotations to the mobile client -- name: "Get the name of the service insance" +- name: "Get the name of the service instance" shell: oc get serviceinstance --namespace={{ namespace }} -o jsonpath='{.items[?(@.spec.externalID=="{{ _apb_service_instance_id }}")].metadata.name}' register: serviceinstance_name +- name: "Ensure compatibility with older ASB versions" + set_fact: + _apb_service_binding_id: "DUMMY" + when: _apb_service_binding_id is not defined + - set_fact: UPS_NAME: "{{ serviceinstance_name.stdout }}" From b5350d2263c329fb62cf84d729e060468601bc28 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Mon, 16 Jul 2018 15:09:50 +0100 Subject: [PATCH 2/2] allow more retries when create push application --- Dockerfile | 1 + roles/provision-unifiedpush-apb/tasks/provision-ups.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d03b3a2..ef289f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,7 @@ OiBpb3NJc1Byb2R1Y3Rpb24KICAgICAgdGl0bGU6IElzIHRoaXMgYSBwcm9kdWN0aW9uIGNlcnRp\ ZmljYXRlPwogICAgICBkZWZhdWx0OiBmYWxzZQogICAgICB0eXBlOiBib29sZWFuCiAgICAgIGRp\ c3BsYXlfdHlwZTogY2hlY2tib3gKICAgICAgZGlzcGxheV9ncm91cDogaU9TCg==" + COPY playbooks /opt/apb/actions COPY roles /opt/ansible/roles COPY vars /opt/ansible/vars diff --git a/roles/provision-unifiedpush-apb/tasks/provision-ups.yml b/roles/provision-unifiedpush-apb/tasks/provision-ups.yml index 320f760..2df8904 100644 --- a/roles/provision-unifiedpush-apb/tasks/provision-ups.yml +++ b/roles/provision-unifiedpush-apb/tasks/provision-ups.yml @@ -118,7 +118,7 @@ until: ups_result.stdout.find("3") != -1 retries: 30 delay: 5 - + - name: "Create {{ namespace }} PushApplication on service host {{ unifiedpush_service.service.spec.cluster_ip }}" uri: url: "http://{{ unifiedpush_service.service.spec.cluster_ip }}/rest/applications" @@ -127,7 +127,7 @@ validate_certs: no body_format: json status_code: 201 - retries: 5 + retries: 30 until: namespace_push_app.status == 201 delay: 5 register: namespace_push_app