Error message
[Email protected]:~# su-s/bin/sh-c "Neutron-db-manage--config-file/etc/neutron/neutron.conf \--config-file/etc/neutron/plugins/ml2/ml2_conf.ini upgrade Juno"Neutroninfo [alembic.migration] Context impl sqliteimpl.info [alembic.migration] would assume non-transactional DDL . INFO [alembic.migration] Running upgrade Havana, E197124D4B9, add unique constraint to Memberstraceback (most Recen T call last): File "/usr/bin/neutron-db-manage", line ten, in <module> Sys.exit (Main ()) File"/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 173, in main CONF.command.func (config, CONF.command.name) File"/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line, Do_upgrade_downgrade do_alembic_command (config, cmd, revision, sql=conf.command.sql) File"/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line, Do_alembic_command getattr (Alembic_command, cmd) (config, *args, **kwargs) File"/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 165, in Upgrade script.run_env () File"/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 390, in Run_env util.load_python_file (Self.dir, ' env.py ') file"/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 243, in load_python_file module = load_module_py (module_id, path) file"/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line +, in load_module_py mod = Imp.load_source (module_id, Path, FP) File"/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 108, in <module> run_migrations_online () File"/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/env.py", line +, in Run_migrations_online context.run_migrations () File"<string>", line 7, in Run_migrations File"/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 738, in Run_migrations self.get_context (). Run_migrations (**kw) File"/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 309, in Run_migrations step.migration_fn (**kw) File"/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py", line A, in upgrade local_cols=[' pool_id ', ' address ', ' protocol_port '] File"<string>", line 7, in Create_unique_constraint File"/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 805, in Create_unique_constraint Schema=schema, **kw) File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/sqlite.py", line, in Add_constraint"No Support forALTER of ConstraintsinchSQLite dialect") Notimplementederror:no support for ALTER's constraints in SQLite dialect
Cause of error
The database used now is MySQL, but when the software is installed it will automatically generate a SQLite lightweight database. Here the error is because SQLite is used here, and the above synchronization command does not conform to the syntax of SQLite, so there will be an error
Workaround
Disables SQLite. Comment out the SQLite connection in the [Database] section of the/etc/neutron/neutron.conf file, as follows:
# vim /etc/neutron/neutron.conf[database]connection = mysql://neutron:[email protected]/neutron#connection = sqlite:////var/lib/neutron/neutron.sqlite
Execute the synchronization statement again
[email protected]:~# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno" neutronINFO [alembic.migration] Context impl MySQLImpl.INFO [alembic.migration] Will assume non-transactional DDL.
That's OK.
Neutron database synchronization error Notimplementederror:no support for ALTER's constraints in SQLite dialect