Browse Source

NSX|V: Fix neutron lbaas migration

Previous migration to stein changed loadbalancers provisioning
status to ERROR if not found in the nsxv3 binding table.
This causes NSX-V loadbalancers to be in ERROr mode too.
This patch fixed the existing migration.

Change-Id: I1fb381c7b52907a78e5e0033784e3928e738fa5f
changes/19/702119/1
asarfaty 1 month ago
parent
commit
de22c6bc27
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      vmware_nsx/db/migration/alembic_migrations/versions/stein/expand/99bfcb6003c6_lbaas_error_no_member.py

+ 4
- 2
vmware_nsx/db/migration/alembic_migrations/versions/stein/expand/99bfcb6003c6_lbaas_error_no_member.py View File

@@ -30,9 +30,11 @@ down_revision = 'fc6308289aca'

def upgrade():
if (migration.schema_has_table('nsxv3_lbaas_loadbalancers') and
migration.schema_has_table('lbaas_loadbalancers')):
migration.schema_has_table('lbaas_loadbalancers') and
migration.schema_has_table('nsxv_lbaas_loadbalancer_bindings')):
# Mark as ERROR loadbalancers without nsx mapping
op.execute("UPDATE lbaas_loadbalancers "
"SET provisioning_status='ERROR' "
"WHERE id not in (SELECT loadbalancer_id FROM "
"nsxv3_lbaas_loadbalancers)")
"nsxv3_lbaas_loadbalancers) and id not in (SELECT "
"loadbalancer_id FROM nsxv_lbaas_loadbalancer_bindings)")

Loading…
Cancel
Save