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

Slawek Kaplonski skaplons at redhat.com
Tue Apr 18 12:56:26 UTC 2023


Hi,

Dnia wtorek, 18 kwietnia 2023 13:37:12 CEST Eugen Block pisze:
> Hi, I'm glad you worked that out. But one thing I'm wondering since  
> I'm not familiar with kolla (as I'm stating repeatedly), why does the  
> compute node have the capabilities to manipulate the neutron database?  
> Is that by design? 

It shouldn't. Only neutron-server should have access to the DB.

> We have our own deployment mechanism on baremetal  
> and there's no "connection =..." string available on compute nodes.  
> Maybe I misunderstood something, but I find it strange that such a  
> thing could happen that easily.
> 
> Thanks,
> Eugen
> 
> Zitat von Gregory Orange <gregory.orange at pawsey.org.au>:
> 
> > 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.
> 
> 
> 
> 
> 


-- 
Slawek Kaplonski
Principal Software Engineer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20230418/e88a2f00/attachment.sig>


More information about the openstack-discuss mailing list