`cinder-manage db sync` 和 `cinder-manage db online_data_migrations` 命令有什么区别?

What diff between `cinder-manage db sync` and `cinder-manage db online_data_migrations` command?

我正在尝试将数据库的 cinder 模式从 Newton 升级到 Ocata 版本。我发现有两个命令可以做到这一点,它们是 cinder-manage db synccinder-manage db online_data_migrations 但谁能为我解释一下这些命令到底做了什么? 谢谢!

此处的区别在于 db sync 命令升级数据库架构,而 db online_data_migrations 迁移或重新格式化数据。

当运行 Octata 下的迁移命令时,将调用以下脚本。 https://github.com/openstack/cinder/blob/ocata-em/cinder/db/sqlalchemy/api.py#L5854 https://github.com/openstack/cinder/blob/ocata-em/cinder/db/sqlalchemy/api.py#L5537

总体思路是实施可能已更改,需要转换或移动数据以在较新版本的服务中工作。