I am trying to upgrade database's schema of cinder from Newton to Ocata version. I found two command to do that is cinder-manage db sync
and cinder-manage db online_data_migrations
but can anyone explain for me what exactly those command do?
Thanks!
The difference here is that the db sync
command upgrades the database schema, while db online_data_migrations
migrates or re-formats data.
When running the migration command under Octata the following scripts would be invoked. 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
The general idea is that the implementation might have changed and data needs to be transformed or moved to work in a newer version of the service.