From 3a94996b41122450a54288dd690e34d5bb0f87cc Mon Sep 17 00:00:00 2001
From: Michal Nasiadka <mnasiadka@gmail.com>
Date: Fri, 9 Dec 2022 12:43:56 +0100
Subject: [PATCH] ovn: Change order of deployment

ovn-controller should be deployed first according to OVN upgrade guide.
Since we are getting newer OVN/OVS versions from RDO/Ubuntu in a cycle,
let's apply that to deployment.

Closes-Bug: #1979329

Change-Id: I017aec611a057db1634cfc2634164b21cb210193
---
 ansible/site.yml                              | 20 +++++++++----------
 .../ovn-revert-order-a824e0fe4440be46.yaml    |  5 +++++
 2 files changed, 15 insertions(+), 10 deletions(-)
 create mode 100644 releasenotes/notes/ovn-revert-order-a824e0fe4440be46.yaml

diff --git a/ansible/site.yml b/ansible/site.yml
index 968549b5d6..a8e107179b 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -602,27 +602,27 @@
         tags: ovs-dpdk,
         when: "(enable_openvswitch | bool) and (enable_ovs_dpdk | bool)"}
 
-- name: Apply role ovn-db
+- name: Apply role ovn-controller
   gather_facts: false
   hosts:
-    - ovn-nb-db
-    - ovn-northd
-    - ovn-sb-db
+    - ovn-controller
     - '&enable_ovn_True'
   serial: '{{ kolla_serial|default("0") }}'
   roles:
-    - { role: ovn-db,
-        tags: [ovn, ovn-db] }
+    - { role: ovn-controller,
+        tags: [ovn, ovn-controller] }
 
-- name: Apply role ovn-controller
+- name: Apply role ovn-db
   gather_facts: false
   hosts:
-    - ovn-controller
+    - ovn-nb-db
+    - ovn-northd
+    - ovn-sb-db
     - '&enable_ovn_True'
   serial: '{{ kolla_serial|default("0") }}'
   roles:
-    - { role: ovn-controller,
-        tags: [ovn, ovn-controller] }
+    - { role: ovn-db,
+        tags: [ovn, ovn-db] }
 
 - name: Apply role neutron
   gather_facts: false
diff --git a/releasenotes/notes/ovn-revert-order-a824e0fe4440be46.yaml b/releasenotes/notes/ovn-revert-order-a824e0fe4440be46.yaml
new file mode 100644
index 0000000000..0f3cb143ab
--- /dev/null
+++ b/releasenotes/notes/ovn-revert-order-a824e0fe4440be46.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    Fixes OVN deployment order - as recommended in OVN docs.
+    `LP#1979329 <https://launchpad.net/bugs/1979329>`__
-- 
GitLab