From 3a854e93e41af54826a175ccfb27c93b7ea23c4a Mon Sep 17 00:00:00 2001 From: mohitrajain Date: Wed, 29 Apr 2026 15:51:07 +0200 Subject: [PATCH 1/4] fix: WPB-24090 update reference for 5.25 to 5.25.21 without any pinned component --- changelog.d/2-wire-builds/release-5.25 | 1 + offline/tasks/proc_pull_charts.sh | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) create mode 100644 changelog.d/2-wire-builds/release-5.25 diff --git a/changelog.d/2-wire-builds/release-5.25 b/changelog.d/2-wire-builds/release-5.25 new file mode 100644 index 000000000..877ba08a2 --- /dev/null +++ b/changelog.d/2-wire-builds/release-5.25 @@ -0,0 +1 @@ +Fixed: update reference for 5.25 to 5.25.21 without any pinned component diff --git a/offline/tasks/proc_pull_charts.sh b/offline/tasks/proc_pull_charts.sh index c069320c2..20b1e7fb1 100755 --- a/offline/tasks/proc_pull_charts.sh +++ b/offline/tasks/proc_pull_charts.sh @@ -82,17 +82,7 @@ pull_charts() { done echo "Pulling charts done." - # Patch bitnami repository references in pulled charts - # Remove the extraction and replacement when there will be no more bitnami charts - #echo "Patching bitnami repository references..." - #SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - #PATCH_SCRIPT="${SCRIPT_DIR}/patch-chart-images.sh" - #if [[ -f "$PATCH_SCRIPT" ]]; then - # "$PATCH_SCRIPT" "${OUTPUT_DIR}/charts" - #else - # echo "Warning: patch-chart-images.sh not found at $PATCH_SCRIPT, skipping chart patching" - #fi } -wire_build="https://raw.githubusercontent.com/wireapp/wire-builds/pinned-offline-multi-20260224-142104/build.json" +wire_build="https://raw.githubusercontent.com/wireapp/wire-builds/f941851bee7666441a23ba782766cd8d7de5043e/build.json" wire_build_chart_release "$wire_build" | pull_charts From 4aa9d946b23730fbb9c1bf6e247d1417fede9b80 Mon Sep 17 00:00:00 2001 From: mohitrajain Date: Wed, 29 Apr 2026 16:15:18 +0200 Subject: [PATCH 2/4] fix: WPB-24090 remove rust-sft and fluent-bit helm chart to ignore busybox --- offline/default-build/build.sh | 2 +- offline/demo-build/build.sh | 2 +- offline/min-build/build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/offline/default-build/build.sh b/offline/default-build/build.sh index 23e608dc6..a94855536 100755 --- a/offline/default-build/build.sh +++ b/offline/default-build/build.sh @@ -26,7 +26,7 @@ TASKS_DIR="${SCRIPT_DIR}/../tasks" # -------------------------- # pulling the charts based on builds.json, charts to be skipped are passed as arguments HELM_CHART_EXCLUDE_LIST -"${TASKS_DIR}"/proc_pull_charts.sh OUTPUT_DIR="${OUTPUT_DIR}" HELM_CHART_EXCLUDE_LIST="inbucket,wire-server-enterprise,postgresql" +"${TASKS_DIR}"/proc_pull_charts.sh OUTPUT_DIR="${OUTPUT_DIR}" HELM_CHART_EXCLUDE_LIST="inbucket,wire-server-enterprise,postgresql,rust-sft,fluent-bit" # pulling the charts from helm-charts repo, charts to be included are passed as arguments HELM_CHART_INCLUDE_LIST # "${TASKS_DIR}"/proc_pull_ext_charts.sh OUTPUT_DIR="${OUTPUT_DIR}" HELM_CHART_INCLUDE_LIST="postgresql-external" diff --git a/offline/demo-build/build.sh b/offline/demo-build/build.sh index 9b00679e2..7aafee54f 100755 --- a/offline/demo-build/build.sh +++ b/offline/demo-build/build.sh @@ -20,7 +20,7 @@ TASKS_DIR="${SCRIPT_DIR}/../tasks" # Processing helm charts # -------------------------- -HELM_CHART_EXCLUDE_LIST="inbucket,wire-server-enterprise,k8ssandra-operator,k8ssandra-test-cluster,elasticsearch-curator,keycloakx,openebs,nginx-ingress-controller,kibana,restund,fluent-bit,aws-ingress,redis-cluster,calling-test,demo-smtp,cassandra-external,elasticsearch-external,minio-external,postgresql-external,rabbitmq-external" +HELM_CHART_EXCLUDE_LIST="inbucket,wire-server-enterprise,k8ssandra-operator,k8ssandra-test-cluster,elasticsearch-curator,keycloakx,openebs,nginx-ingress-controller,kibana,restund,fluent-bit,aws-ingress,redis-cluster,calling-test,demo-smtp,cassandra-external,elasticsearch-external,minio-external,postgresql-external,rabbitmq-external,rust-sft,fluent-bit" # pulling the charts, charts to be skipped are passed as arguments HELM_CHART_EXCLUDE_LIST "${TASKS_DIR}"/proc_pull_charts.sh OUTPUT_DIR="${OUTPUT_DIR}" HELM_CHART_EXCLUDE_LIST="${HELM_CHART_EXCLUDE_LIST}" diff --git a/offline/min-build/build.sh b/offline/min-build/build.sh index 8aff72848..00f0f2421 100755 --- a/offline/min-build/build.sh +++ b/offline/min-build/build.sh @@ -26,7 +26,7 @@ TASKS_DIR="${SCRIPT_DIR}/../tasks" # -------------------------- # pulling the charts, charts to be skipped are passed as arguments HELM_CHART_EXCLUDE_LIST -HELM_CHART_EXCLUDE_LIST="inbucket,wire-server-enterprise,k8ssandra-operator,k8ssandra-test-cluster,elasticsearch-ephemeral,elasticsearch-curator,rabbitmq,smtp,fake-aws,fake-aws-s3,postgresql,keycloakx,openebs,nginx-ingress-controller,kibana,restund,fluent-bit,aws-ingress,databases-ephemeral,redis-cluster,calling-test,cert-manager,kube-prometheus-stack,demo-smtp,wire-utility" +HELM_CHART_EXCLUDE_LIST="inbucket,wire-server-enterprise,k8ssandra-operator,k8ssandra-test-cluster,elasticsearch-ephemeral,elasticsearch-curator,rabbitmq,smtp,fake-aws,fake-aws-s3,postgresql,keycloakx,openebs,nginx-ingress-controller,kibana,restund,fluent-bit,aws-ingress,databases-ephemeral,redis-cluster,calling-test,cert-manager,kube-prometheus-stack,demo-smtp,wire-utility,rust-sft,fluent-bit" "${TASKS_DIR}"/proc_pull_charts.sh OUTPUT_DIR="${OUTPUT_DIR}" HELM_CHART_EXCLUDE_LIST="${HELM_CHART_EXCLUDE_LIST}" From ae088559c16e2b4e1f07e7946969e7245943e57c Mon Sep 17 00:00:00 2001 From: mohitrajain Date: Mon, 4 May 2026 22:09:12 +0200 Subject: [PATCH 3/4] fix: WPB-24090 added logging in case of helm chart failure --- ansible/inventory/demo/host.yml | 3 + ansible/wiab-demo/helm_install.yml | 106 ++++++++++++++++++++++++----- 2 files changed, 93 insertions(+), 16 deletions(-) diff --git a/ansible/inventory/demo/host.yml b/ansible/inventory/demo/host.yml index b7e2493a2..1ef28e0a5 100644 --- a/ansible/inventory/demo/host.yml +++ b/ansible/inventory/demo/host.yml @@ -39,6 +39,9 @@ wiab: pod_network_cidr: "10.233.0.0/16" minikube_node_subnet: "192.168.99.0/24" + # will dump logs on failure when deploying helm charts + dump_logs_on_failure: true + # will use certmanager for certs use_cert_manager: true # networking iptables dnat rules http_dnat_rules: diff --git a/ansible/wiab-demo/helm_install.yml b/ansible/wiab-demo/helm_install.yml index 669598ea1..f4f0b7b98 100644 --- a/ansible/wiab-demo/helm_install.yml +++ b/ansible/wiab-demo/helm_install.yml @@ -117,6 +117,13 @@ - name: Deploy core Wire service Helm charts block: + - name: Reset core Helm deployment status + set_fact: + helm_deploy_failed: false + helm_deploy_failure_task: '' + helm_deploy_failure_message: '' + deployment_messages: [] + - name: Display charts that will be deployed debug: msg: "Following charts will be deployed: {{ charts_to_deploy | join(', ') }}" @@ -165,32 +172,46 @@ loop: "{{ charts_to_deploy }}" register: helm_deploy_result - - name: Report deployment status for all core charts - block: + rescue: + - name: Store core Helm deployment failure details + set_fact: + helm_deploy_failed: true + helm_deploy_failure_task: "{{ ansible_failed_task.name | default('Deploy core Wire charts using their available configuration files') }}" + helm_deploy_failure_message: "{{ ansible_failed_result.msg | default(ansible_failed_result.stderr | default('Unknown error during Helm chart deployment')) }}" + + always: - name: Build deployment status list set_fact: - deployment_messages: "{{ deployment_messages | default([]) + [item.item + ': ' + ('Deployed' if item.changed else 'Already up-to-date')] }}" - loop: "{{ helm_deploy_result.results }}" - when: helm_deploy_result.results is defined + deployment_messages: "{{ deployment_messages + [item.item + ': ' + ('Failed' if item.failed | default(false) else ('Deployed' if item.changed | default(false) else 'Already up-to-date'))] }}" + loop: "{{ helm_deploy_result.results | default([]) }}" no_log: true - name: Display chart deployment status debug: msg: "{{ ['Chart deployment status:'] + (deployment_messages | map('regex_replace', '^', '- ') | list) }}" - when: helm_deploy_result.results is defined + when: deployment_messages | length > 0 - - name: Retrieve running pods from default namespace - kubernetes.core.k8s_info: - kind: Pod - namespace: default - kubeconfig: "{{ kube_config }}" - register: pods_info + - name: Display core Helm deployment failure details + debug: + msg: + - "Core Wire chart deployment failed." + - "Failed task: {{ helm_deploy_failure_task }}" + - "Error: {{ helm_deploy_failure_message }}" + when: helm_deploy_failed | default(false) + + - name: Retrieve running pods from default namespace + kubernetes.core.k8s_info: + kind: Pod + namespace: default + kubeconfig: "{{ kube_config }}" + register: pods_info - - name: Display running pods sorted by creation time - block: - name: Count running pods set_fact: - running_pods_count: "{{ pods_info.resources | length }}" + total_pods_count: "{{ pods_info.resources | length }}" + all_pods: "{{ pods_info.resources | map(attribute='metadata.name') | list }}" + failing_pod_resources: "{{ pods_info.resources | rejectattr('status.phase', 'equalto', 'Running') | rejectattr('status.phase', 'equalto', 'Succeeded') | list }}" + failing_pods: "{{ pods_info.resources | rejectattr('status.phase', 'equalto', 'Running') | rejectattr('status.phase', 'equalto', 'Succeeded') | map(attribute='metadata.name') | list }}" running_pods: "{{ pods_info.resources | selectattr('status.phase', 'equalto', 'Running') | map(attribute='metadata.name') | list }}" succeeded_pods: "{{ pods_info.resources | selectattr('status.phase', 'equalto', 'Succeeded') | map(attribute='metadata.name') | list }}" pending_pods: "{{ pods_info.resources | selectattr('status.phase', 'equalto', 'Pending') | map(attribute='metadata.name') | list }}" @@ -198,7 +219,7 @@ - name: Display pods summary debug: msg: - - "Total running pods: {{ running_pods_count }}" + - "Total pods: {{ total_pods_count }}" - "" - "Running ({{ running_pods | length }}):" - "{{ running_pods | map('regex_replace', '^', ' - ') | list }}" @@ -209,6 +230,59 @@ - "Pending ({{ pending_pods | length }}):" - "{{ pending_pods | map('regex_replace', '^', ' - ') | list }}" + - name: Display failing pod details + debug: + msg: | + Failing pod details: + {{ failing_pod_resources | to_nice_yaml }} + when: + - helm_deploy_failed | default(false) + - dump_logs_on_failure | default(false) + - failing_pod_resources | length > 0 + + - name: Note when no failing pods were found + debug: + msg: "No failing pods found in pod inventory; skipping pod detail dump." + when: + - helm_deploy_failed | default(false) + - dump_logs_on_failure | default(false) + - failing_pod_resources | length == 0 + + - name: Collect logs from all pods + kubernetes.core.k8s_log: + name: "{{ item }}" + namespace: default + kubeconfig: "{{ kube_config }}" + tail_lines: 30 + all_containers: true + failed_when: false + register: pod_logs + loop: "{{ all_pods }}" + when: + - helm_deploy_failed | default(false) + - dump_logs_on_failure | default(false) + + - name: Display pod logs + debug: + msg: | + Pod logs for {{ item.item }}: + {% if item.failed | default(false) %} + Failed to collect logs: {{ item.msg | default('Unknown error') }} + {% else %} + {{ item.log | default(item.content | default('No logs returned')) }} + {% endif %} + loop: "{{ pod_logs.results | default([]) }}" + loop_control: + label: "{{ item.item }}" + when: + - helm_deploy_failed | default(false) + - dump_logs_on_failure | default(false) + + - name: Stop play after core Helm deployment failure + fail: + msg: "Core Wire chart deployment failed in task '{{ helm_deploy_failure_task }}': {{ helm_deploy_failure_message }}" + when: helm_deploy_failed | default(false) + - name: Deploy nginx-ingress-services with TLS configuration block: From 28751eed7a444cc789459a76e876c68b95b50891 Mon Sep 17 00:00:00 2001 From: mohitrajain Date: Mon, 4 May 2026 22:09:58 +0200 Subject: [PATCH 4/4] fix: WPB-24090 add a changelog --- changelog.d/2-wire-builds/release-5.25 | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.d/2-wire-builds/release-5.25 b/changelog.d/2-wire-builds/release-5.25 index 877ba08a2..fb05a2866 100644 --- a/changelog.d/2-wire-builds/release-5.25 +++ b/changelog.d/2-wire-builds/release-5.25 @@ -1 +1,2 @@ Fixed: update reference for 5.25 to 5.25.21 without any pinned component +Added: logging in case of helm chart failure