|
11 | 11 |
|
12 | 12 | - name: Get OVN_Northbound cluster leader |
13 | 13 | 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 |
15 | 18 | changed_when: False |
16 | 19 | register: ovn_nb_cluster_status |
17 | 20 |
|
18 | 21 | - name: Configure OVN NB connection settings |
19 | 22 | vars: |
20 | 23 | search_string: "Role: leader" |
21 | 24 | 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 |
23 | 33 | when: ovn_nb_cluster_status is search(search_string) |
24 | 34 |
|
25 | 35 | - name: Get OVN_Southbound cluster leader |
26 | 36 | 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 |
28 | 41 | changed_when: False |
29 | 42 | register: ovn_sb_cluster_status |
30 | 43 |
|
31 | 44 | - name: Configure OVN SB connection settings |
32 | 45 | vars: |
33 | 46 | search_string: "Role: leader" |
34 | 47 | 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 |
36 | 56 | when: ovn_sb_cluster_status is search(search_string) |
37 | 57 |
|
38 | 58 | - name: Wait for ovn-nb-db |
|
0 commit comments