equinix / terraform-equinix-metal-openstack

OpenStack Cloud on Equinix Metal
https://registry.terraform.io/modules/equinix/openstack/metal/latest
Apache License 2.0
13 stars 12 forks source link

CI: controller neutron fails to modify network_id in SQL migration #69

Open displague opened 1 year ago

displague commented 1 year ago

controller neutron fails to modify network_id in SQL migration:

null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade 61663558142c -> 867d39095bf4, port forwarding
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade 867d39095bf4 -> d72db3e25539, modify uniq port forwarding
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade d72db3e25539 -> cada2437bf41
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade cada2437bf41 -> 195176fb410d, router gateway IP QoS
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade 195176fb410d -> fb0167bd9639
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade fb0167bd9639 -> 0ff9e3881597
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade 0ff9e3881597 -> 9bfad3f1e780
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade 9bfad3f1e780 -> 63fd95af7dcd
null_resource.controller-neutron (remote-exec): INFO  [alembic.runtime.migration] Running upgrade 63fd95af7dcd -> c613d0b82681
null_resource.controller-neutron (remote-exec): Traceback (most recent call last):
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
null_resource.controller-neutron (remote-exec):     cursor, statement, parameters, context
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 581, in do_execute
null_resource.controller-neutron (remote-exec):     cursor.execute(statement, parameters)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 165, in execute
null_resource.controller-neutron (remote-exec):     result = self._query(query)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 321, in _query
null_resource.controller-neutron (remote-exec):     conn.query(q)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 860, in query
null_resource.controller-neutron (remote-exec):     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1061, in _read_query_result
null_resource.controller-neutron (remote-exec):     result.read()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1349, in read
null_resource.controller-neutron (remote-exec):     first_packet = self.connection._read_packet()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1018, in _read_packet
null_resource.controller-neutron (remote-exec):     packet.check_error()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 384, in check_error
null_resource.controller-neutron (remote-exec):     err.raise_mysql_exception(self._data)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
null_resource.controller-neutron (remote-exec):     raise errorclass(errno, errval)
null_resource.controller-neutron (remote-exec): pymysql.err.InternalError: (1832, "Cannot change column 'network_id': used in a foreign key constraint 'subnets_ibfk_1'")

null_resource.controller-neutron (remote-exec): The above exception was the direct cause of the following exception:

null_resource.controller-neutron (remote-exec): Traceback (most recent call last):
null_resource.controller-neutron (remote-exec):   File "/usr/bin/neutron-db-manage", line 10, in <module>
null_resource.controller-neutron (remote-exec):     sys.exit(main())
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/neutron/db/migration/cli.py", line 658, in main
null_resource.controller-neutron (remote-exec):     return_val |= bool(CONF.command.func(config, CONF.command.name))
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/neutron/db/migration/cli.py", line 182, in do_upgrade
null_resource.controller-neutron (remote-exec):     desc=branch, sql=CONF.command.sql)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/neutron/db/migration/cli.py", line 83, in do_alembic_command
null_resource.controller-neutron (remote-exec):     getattr(alembic_command, cmd)(config, *args, **kwargs)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/command.py", line 279, in upgrade
null_resource.controller-neutron (remote-exec):     script.run_env()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/script/base.py", line 475, in run_env
null_resource.controller-neutron (remote-exec):     util.load_python_file(self.dir, "env.py")
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/util/pyfiles.py", line 98, in load_python_file
null_resource.controller-neutron (remote-exec):     module = load_module_py(module_id, path)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/util/compat.py", line 174, in load_module_py
null_resource.controller-neutron (remote-exec):     spec.loader.exec_module(module)
null_resource.controller-neutron (remote-exec):   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
null_resource.controller-neutron (remote-exec):   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 120, in <module>
null_resource.controller-neutron (remote-exec):     run_migrations_online()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 114, in run_migrations_online
null_resource.controller-neutron (remote-exec):     context.run_migrations()
null_resource.controller-neutron (remote-exec):   File "<string>", line 8, in run_migrations
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/runtime/environment.py", line 846, in run_migrations
null_resource.controller-neutron (remote-exec):     self.get_context().run_migrations(**kw)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/runtime/migration.py", line 365, in run_migrations
null_resource.controller-neutron (remote-exec):     step.migration_fn(**kw)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/neutron/db/migration/alembic_migrations/versions/train/expand/c613d0b82681_subnet_force_network_id.py", line 40, in upgrade
null_resource.controller-neutron (remote-exec):     existing_type=sa.String(36))
null_resource.controller-neutron (remote-exec):   File "<string>", line 8, in alter_column
null_resource.controller-neutron (remote-exec):   File "<string>", line 3, in alter_column
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/operations/ops.py", line 1775, in alter_column
null_resource.controller-neutron (remote-exec):     return operations.invoke(alt)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/operations/base.py", line 345, in invoke
null_resource.controller-neutron (remote-exec):     return fn(self, operation)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/operations/toimpl.py", line 56, in alter_column
null_resource.controller-neutron (remote-exec):     **operation.kw
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/ddl/mysql.py", line 98, in alter_column
null_resource.controller-neutron (remote-exec):     else existing_comment,
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/alembic/ddl/impl.py", line 134, in _exec
null_resource.controller-neutron (remote-exec):     return conn.execute(construct, *multiparams, **params)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 982, in execute
null_resource.controller-neutron (remote-exec):     return meth(self, multiparams, params)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
null_resource.controller-neutron (remote-exec):     return connection._execute_ddl(self, multiparams, params)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1044, in _execute_ddl
null_resource.controller-neutron (remote-exec):     compiled,
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1250, in _execute_context
null_resource.controller-neutron (remote-exec):     e, statement, parameters, cursor, context
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1474, in _handle_dbapi_exception
null_resource.controller-neutron (remote-exec):     util.raise_from_cause(newraise, exc_info)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
null_resource.controller-neutron (remote-exec):     reraise(type(exception), exception, tb=exc_tb, cause=cause)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 152, in reraise
null_resource.controller-neutron (remote-exec):     raise value.with_traceback(tb)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
null_resource.controller-neutron (remote-exec):     cursor, statement, parameters, context
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 581, in do_execute
null_resource.controller-neutron (remote-exec):     cursor.execute(statement, parameters)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 165, in execute
null_resource.controller-neutron (remote-exec):     result = self._query(query)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 321, in _query
null_resource.controller-neutron (remote-exec):     conn.query(q)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 860, in query
null_resource.controller-neutron (remote-exec):     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1061, in _read_query_result
null_resource.controller-neutron (remote-exec):     result.read()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1349, in read
null_resource.controller-neutron (remote-exec):     first_packet = self.connection._read_packet()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1018, in _read_packet
null_resource.controller-neutron (remote-exec):     packet.check_error()
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 384, in check_error
null_resource.controller-neutron (remote-exec):     err.raise_mysql_exception(self._data)
null_resource.controller-neutron (remote-exec):   File "/usr/lib/python3/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
null_resource.controller-neutron (remote-exec):     raise errorclass(errno, errval)
null_resource.controller-neutron (remote-exec): oslo_db.exception.DBError: (pymysql.err.InternalError) (1832, "Cannot change column 'network_id': used in a foreign key constraint 'subnets_ibfk_1'")
null_resource.controller-neutron (remote-exec): [SQL: ALTER TABLE subnets MODIFY network_id VARCHAR(36) NOT NULL]
null_resource.controller-neutron (remote-exec): (Background on this error at: http://sqlalche.me/e/2j85)
null_resource.controller-neutron: Creation complete after 1m4s [id=920363323014[978](https://github.com/equinix/terraform-metal-openstack/actions/runs/4981221529/jobs/8915180596#step:12:979)7266]