Skip to content

Commit e60355d

Browse files
authored
Merge pull request #798 from stackhpc/upstream/2025.1-2025-09-29
Synchronise 2025.1 with upstream
2 parents f9cc1df + 1df47fe commit e60355d

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

ansible/roles/ovn-db/tasks/bootstrap-db.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,48 @@
1111

1212
- name: Get OVN_Northbound cluster leader
1313
become: true
14-
command: "{{ kolla_container_engine }} exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound"
14+
command: >-
15+
{{ kolla_container_engine }} exec ovn_nb_db
16+
ovs-appctl -t /var/run/ovn/ovnnb_db.ctl
17+
cluster/status OVN_Northbound
1518
changed_when: False
1619
register: ovn_nb_cluster_status
1720

1821
- name: Configure OVN NB connection settings
1922
vars:
2023
search_string: "Role: leader"
2124
become: true
22-
command: "{{ kolla_container_engine }} exec ovn_nb_db ovn-nbctl --inactivity-probe={{ ovn_nb_db_inactivity_probe }} set-connection ptcp:{{ ovn_nb_db_port }}:0.0.0.0"
25+
command: >-
26+
{{ kolla_container_engine }} exec ovn_nb_db
27+
ovn-nbctl --inactivity-probe={{ ovn_nb_db_inactivity_probe }}
28+
set-connection ptcp:{{ ovn_nb_db_port }}:0.0.0.0
29+
register: ovn_nb_set_connection_result
30+
retries: 3
31+
delay: 5
32+
until: ovn_nb_set_connection_result.rc == 0
2333
when: ovn_nb_cluster_status is search(search_string)
2434

2535
- name: Get OVN_Southbound cluster leader
2636
become: true
27-
command: "{{ kolla_container_engine }} exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound"
37+
command: >-
38+
{{ kolla_container_engine }} exec ovn_sb_db
39+
ovs-appctl -t /var/run/ovn/ovnsb_db.ctl
40+
cluster/status OVN_Southbound
2841
changed_when: False
2942
register: ovn_sb_cluster_status
3043

3144
- name: Configure OVN SB connection settings
3245
vars:
3346
search_string: "Role: leader"
3447
become: true
35-
command: "{{ kolla_container_engine }} exec ovn_sb_db ovn-sbctl --inactivity-probe={{ ovn_sb_db_inactivity_probe }} set-connection ptcp:{{ ovn_sb_db_port }}:0.0.0.0"
48+
command: >-
49+
{{ kolla_container_engine }} exec ovn_sb_db
50+
ovn-sbctl --inactivity-probe={{ ovn_sb_db_inactivity_probe }}
51+
set-connection ptcp:{{ ovn_sb_db_port }}:0.0.0.0
52+
register: ovn_sb_set_connection_result
53+
retries: 3
54+
delay: 5
55+
until: ovn_sb_set_connection_result.rc == 0
3656
when: ovn_sb_cluster_status is search(search_string)
3757

3858
- name: Wait for ovn-nb-db

tests/check-logs.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,22 @@ if sudo test -d /var/log/kolla; then
182182
fi
183183
done
184184

185+
# NOTE: Check if OpenSearch output plugin has connected in OpenSearch scenarios, otherwise
186+
# check_fluentd_missing_logs will fail because fluentd will only parse files when
187+
# output plugin is working.
188+
retries=0
189+
retries_max=10
190+
until [[ $(sudo tail -n 5 /var/log/kolla/fluentd/fluentd.log | grep "Could not communicate to OpenSearch" | wc -l) -eq 0 ]]; do
191+
echo "Found 'Could not communicate to OpenSearch' in last 5 lines of fluentd.log, sleeping 30 seconds"
192+
retries=$((retries + 1))
193+
if [[ $retries != $retries_max ]]; then
194+
sleep 30
195+
else
196+
echo "Found 'Could not communicate to OpenSearch' in last 5 lines of fluentd.log after 10 retries." | tee -a $fluentd_error_summary_file
197+
break
198+
fi
199+
done
200+
185201
if check_fluentd_missing_logs >/dev/null; then
186202
any_critical=1
187203
echo "(critical) Found some missing log files in fluentd logs. Matches in $fluentd_error_summary_file"

0 commit comments

Comments
 (0)