neutron-db-manage autogenerate is generating empty upgrades

Bug #1612433 reported by Henry Gessau
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
networking-arista
New
Undecided
Unassigned
neutron
Invalid
Medium
Unassigned

Bug Description

The alembic autogenerate wrapper,

  neutron-db-manage revision -m "description" --[contract|expand]

is no longer collecting model/migration diffs and is generating empty upgrade scripts.

Not sure when this broke.

Tags: db
Henry Gessau (gessau)
tags: added: db
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Ann Taraday (akamyshnikova) wrote :

To have migration autogenerated we need to pass --autogenerate and --expand/contract: not allowed with argument --autogenerate.

.tox/py27/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf revision -m 'test' --autogenerate
  Running revision for neutron ...
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.ddl.postgresql] Detected sequence named 'nsxv_edge_vnic_bindings_vnic_index_seq' as owned by integer column 'nsxv_edge_vnic_bindings(vnic_index)', assuming $ERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'ml2_ucsm_port_profiles_vlan_id_seq' as owned by integer column 'ml2_ucsm_port_profiles(vlan_id)', assuming SERIAL a$d omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'routerrules_id_seq' as owned by integer column 'routerrules(id)', assuming SERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'cisco_ml2_nexus_nve_vni_seq' as owned by integer column 'cisco_ml2_nexus_nve(vni)', assuming SERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'cisco_ml2_nexusport_bindings_binding_id_seq' as owned by integer column 'cisco_ml2_nexusport_bindings(binding_id)', assuming SERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'ha_router_vrid_allocations_vr_id_seq' as owned by integer column 'ha_router_vrid_allocations(vr_id)', assuming SERI$L and omitting
INFO [alembic.autogenerate.compare] Detected added column 'ha_router_agent_port_bindings.test'
  Generating /opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/newton/expand/ce2aa5e76b04_test.py ... done
  OK

So, I think this bug is not valid as if we use autogenerate, it will generate migration in expand or contract branch itself, and --expand/contract are used for creation just empty migrations.

Changed in neutron:
status: Confirmed → Invalid
Revision history for this message
Mike Kolesnik (mkolesni) wrote :
Download full text (5.1 KiB)

This seems to not work properly in sub projects..

$ neutron-db-manage --subproject networking-odl revision -m "Add journal dependency table" --autogenerate
  Running revision for networking-odl ...
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_service_function_params'
INFO [alembic.autogenerate.compare] Detected removed table u'cisco_firewall_associations'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_port_pair_groups'
INFO [alembic.autogenerate.compare] Detected removed table u'bgpvpn_router_associations'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_l7rules'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_path_nodes'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_path_port_associations'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_chain_group_associations'
INFO [alembic.autogenerate.compare] Detected removed table u'physical_locators'
INFO [alembic.autogenerate.compare] Detected removed table u'l2gw_alembic_version'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_l7policies'
INFO [alembic.autogenerate.compare] Detected removed table u'firewall_rules_v2'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_port_pairs'
INFO [alembic.autogenerate.compare] Detected removed table u'alembic_version'
INFO [alembic.autogenerate.compare] Detected removed table u'firewall_groups_v2'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_uuid_intid_associations'
INFO [alembic.autogenerate.compare] Detected removed table u'l2gatewayinterfaces'
INFO [alembic.autogenerate.compare] Detected removed table u'alembic_version_lbaas'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_flow_classifiers'
INFO [alembic.autogenerate.compare] Detected removed table u'alembic_version_fwaas'
INFO [alembic.autogenerate.compare] Detected removed table u'firewall_group_port_associations_v2'
INFO [alembic.autogenerate.compare] Detected removed table u'opendaylightjournal'
INFO [alembic.autogenerate.compare] Detected removed table u'l2gatewaydevices'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_sessionpersistences'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_loadbalanceragentbindings'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_members'
INFO [alembic.autogenerate.compare] Detected removed table u'opendaylight_maintenance'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_loadbalancers'
INFO [alembic.autogenerate.compare] Detected removed table u'firewall_policy_rule_associations_v2'
INFO [alembic.autogenerate.compare] Detected removed table u'sfc_port_chain_parameters'
INFO [alembic.autogenerate.compare] Detected removed table u'physical_ports'
INFO [alembic.autogenerate.compare] Detected removed table u'lbaas_listeners'
INFO [alembic.autogenerate.compare] Detected removed table u'pending_ucast_macs_remotes'
INFO [alembic.autogenerate.compare] Detected removed tab...

Read more...

Changed in neutron:
status: Invalid → New
Revision history for this message
Lajos Katona (lajos-katona) wrote :

As this bug is inactive for years I close it now, feel free to reopen

Changed in neutron:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.