Browse Source

nlbaas2octavia: Script fails when no members found

The migration script breaks when there are no members in the nlbaas table.

Change-Id: Ia3a57adfe41dad9e87f5278317180ae7a6adb592
Kobi Samoray 8 months ago
parent
commit
10c5c2b940
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      tools/nlbaas2octavia/nlbaas2octavia.py

+ 3
- 2
tools/nlbaas2octavia/nlbaas2octavia.py View File

@@ -205,8 +205,9 @@ def process_members(LOG, n_session, o_session, project_id, pool_id):
205 205
              'updated_at': datetime.datetime.utcnow(),
206 206
              'provisioning_status': member[6], 'name': member[8],
207 207
              'backup': False})
208
-    if result.rowcount != 1:
209
-        raise Exception(_('Unable to create member in the Octavia database.'))
208
+        if result.rowcount != 1:
209
+            raise Exception(
210
+                _('Unable to create member in the Octavia database.'))
210 211
 
211 212
 
212 213
 def process_SNI(n_session, o_session, listener_id):

Loading…
Cancel
Save