Hi,

I don't think pyc is problem, is it same file but byte compiled.

  1. .py: This is normally the input source code that you've written.
  2. .pyc: This is the compiled bytecode. If you import a module, python will build a *.pyc file that contains the bytecode to make importing it again later easier (and faster).

Two matches in the same layer of the same Docker volume:
/usr/lib/python3/dist-packages/neutron/db/migration/alembic_migrations/versions/wallaby/expand/__pycache__/6135a7bd4425_add_rbac_support_for_address_group.cpython-38.pyc
/usr/lib/python3/dist-packages/neutron/db/migration/alembic_migrations/versions/wallaby/expand/6135a7bd4425_add_rbac_support_for_address_group.py

Michal Arbet
Openstack Engineer

Ultimum Technologies a.s.
Na Poříčí 1047/26, 11000 Praha 1
Czech Republic

+420 604 228 897 
michal.arbet@ultimum.io
https://ultimum.io



po 17. 4. 2023 v 8:04 odesílatel Gregory Orange <gregory.orange@pawsey.org.au> napsal:
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.