Merge "Insert physnet1 in ml2_flat_allocations"
This commit is contained in:
commit
8a4278e3b9
|
@ -107,10 +107,17 @@ def fix_neutron_migrations(node):
|
|||
"UPDATE ml2_network_segments " \
|
||||
"SET network_type='flat',physical_network='physnet1' " \
|
||||
"WHERE network_id IN (SELECT network_id FROM externalnetworks);"
|
||||
|
||||
insert_physnet1 = \
|
||||
"INSERT INTO ml2_flat_allocations " \
|
||||
"SELECT b.* FROM (SELECT 'physnet1') AS b " \
|
||||
"WHERE NOT EXISTS (" \
|
||||
"SELECT 1 FROM ml2_flat_allocations " \
|
||||
"WHERE physical_network = 'physnet1'" \
|
||||
");"
|
||||
cmd = ['sudo', '-iu', 'root', 'mysql', 'neutron']
|
||||
with ssh.popen(cmd, node=node, stdin=ssh.PIPE) as proc:
|
||||
proc.stdin.write(add_networksecuritybindings_sql)
|
||||
proc.stdin.write(insert_physnet1)
|
||||
proc.stdin.write(update_network_segments_sql)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue