[neutron] [kolla-ansible] alembic mismatch, schema differences

Gregory Orange gregory.orange at pawsey.org.au
Mon Apr 17 05:59:41 UTC 2023


Solution: Manually revert the database schema changes.

We found that `neutron-db-manage downgrade` has been unsupported for 
quite some time, so that avenue was closed to us. So, we restored 
backups of before and after to some temporary mariadb servers, to look 
at and compare the data. In the end this is how we reverted it (mysql < 
revert_wallaby_schema.sql):

use neutron

alter table address_scopes alter column shared drop default;
alter table meteringlabelrules drop column source_ip_prefix;
alter table meteringlabelrules drop column destination_ip_prefix;
alter table ml2_vlan_allocations drop constraint 
check_ml2_vlan_allocations0vlan_id;
alter table networkdhcpagentbindings drop index 
uniq_network_dhcp_agent_binding0network_id0binding_index0;
alter table networkdhcpagentbindings drop column binding_index;
alter table networks modify mtu int(11) null default null;
alter table portforwardings drop constraint portforwardings_ibfk_3;
alter table portforwardings drop index 
uniq_portforwardings0standard_attr_id;
alter table portforwardings drop column standard_attr_id;
alter table portuplinkstatuspropagation alter column 
propagate_uplink_status set default 0;
alter table quotas drop index uniq_quotas0project_id0resource;
alter table securitygroups drop constraint CONSTRAINT_1;
alter table securitygroups drop column stateful;
alter table securitygrouprules drop constraint securitygrouprules_ibfk_4;
alter table securitygrouprules drop column remote_address_group_id;
alter table subnetpools alter column shared drop default;
alter table subnets drop constraint CONSTRAINT_1;
alter table subnets drop column in_use;

update alembic_version set version_num='c613d0b82681' where 
version_num='6135a7bd4425';

drop table address_associations;
drop table addressgrouprbacs;
drop table address_groups;
drop table addressscoperbacs;
drop table dvr_fip_gateway_port_network;
drop table network_subnet_lock;
drop table ovn_hash_ring;
drop table ovn_revision_numbers;
drop table portdeviceprofiles;
drop table portnumaaffinitypolicies;
drop table subnet_dns_publish_fixed_ips;
drop table subnetpoolrbacs;


And everything is fine again.

Greg.



More information about the openstack-discuss mailing list