Skip to content

Commit 55b60c0

Browse files
authored
Merge pull request #994 from stackhpc/fix-ubuntu-upgrade
Run OVN playbook without limit during upgrade
2 parents 33328d9 + d2ed09e commit 55b60c0

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

etc/kayobe/ansible/ovn-fix-chassis-priorities.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,25 @@
2121
- name: Find OVN DB DB Leader
2222
hosts: "{{ ovn_nb_db_group | default('controllers') }}"
2323
tasks:
24-
- name: Find the OVN NB DB leader
25-
ansible.builtin.command: docker exec ovn_nb_db ovn-nbctl get-connection
26-
changed_when: false
27-
failed_when: false
28-
register: ovn_check_result
29-
check_mode: false
24+
- name: Find OVN DB Leader
25+
when: kolla_enable_ovn | bool
26+
block:
27+
- name: Find the OVN NB DB leader
28+
ansible.builtin.command: docker exec ovn_nb_db ovn-nbctl get-connection
29+
changed_when: false
30+
failed_when: false
31+
register: ovn_check_result
32+
check_mode: false
3033

31-
- name: Group hosts by leader/follower role
32-
ansible.builtin.group_by:
33-
key: "ovn_nb_{{ 'leader' if ovn_check_result.rc == 0 else 'follower' }}"
34-
changed_when: false
34+
- name: Group hosts by leader/follower role
35+
ansible.builtin.group_by:
36+
key: "ovn_nb_{{ 'leader' if ovn_check_result.rc == 0 else 'follower' }}"
37+
changed_when: false
3538

36-
- name: Assert one leader exists
37-
ansible.builtin.assert:
38-
that:
39-
- groups['ovn_nb_leader'] | default([]) | length == 1
39+
- name: Assert one leader exists
40+
ansible.builtin.assert:
41+
that:
42+
- groups['ovn_nb_leader'] | default([]) | length == 1
4043

4144
- name: Fix OVN chassis priorities
4245
hosts: ovn_nb_leader

etc/kayobe/ansible/ubuntu-upgrade.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,3 @@
104104
that:
105105
- ansible_facts.distribution_major_version == '22'
106106
- ansible_facts.distribution_release == 'jammy'
107-
108-
- name: Run the OVN chassis priority fix playbook
109-
import_playbook: "{{ lookup('ansible.builtin.env', 'KAYOBE_CONFIG_PATH') }}/ansible/ovn-fix-chassis-priorities.yml"
110-
when: kolla_enable_ovn

tools/ubuntu-upgrade-overcloud.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ set -x
3131

3232
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ubuntu-upgrade.yml -e os_release=jammy --limit $1
3333

34+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ovn-fix-chassis-priorities.yml
35+
3436
kayobe overcloud host configure --limit $1 --kolla-limit $1 -e os_release=jammy

0 commit comments

Comments
 (0)