From 085130c7043aa15d451d2000d895707902378cd2 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 26 Sep 2024 16:40:57 +0200 Subject: [PATCH] Remove db_sync --migrate command The `keystone-manage db_sync --migrate` comand has been removed from Keystone with migration to alembic [1] and is just no-op. [1] https://opendev.org/openstack/keystone/commit/f174b4fa7c4fb010bbacc8c5a5f3625a8fcb41f3 Change-Id: I4563c993eb8d4a26ef384e8fb43517dd1943f4d8 --- tasks/keystone_db_sync.yml | 15 +-------------- tasks/keystone_install.yml | 6 ------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/tasks/keystone_db_sync.yml b/tasks/keystone_db_sync.yml index 49ed1f89..9a68994c 100644 --- a/tasks/keystone_db_sync.yml +++ b/tasks/keystone_db_sync.yml @@ -32,8 +32,6 @@ with_items: - name: "need_db_expand" state: "{{ (keystone_db_sync_check.rc | int == 2) | bool }}" - - name: "need_db_migrate" - state: "{{ (keystone_db_sync_check.rc | int in [2, 3]) | bool }}" - name: "need_db_contract" state: "{{ (keystone_db_sync_check.rc | int in [2, 3, 4]) | bool }}" @@ -63,8 +61,7 @@ delay: 2 with_items: "{{ keystone_service_exists.results }}" when: - - "(ansible_local['openstack_ansible']['keystone']['need_db_expand'] | bool) or - (ansible_local['openstack_ansible']['keystone']['need_db_migrate'] | bool)" + - "(ansible_local['openstack_ansible']['keystone']['need_db_expand'] | bool)" - "(item.status['LoadState'] == 'loaded' | bool)" notify: - Restart uWSGI @@ -79,16 +76,6 @@ run_once: yes notify: flush cache -- name: Perform a Keystone DB sync migrate - command: "{{ keystone_bin }}/keystone-manage db_sync --migrate" - changed_when: false - become: yes - become_user: "{{ keystone_system_user_name }}" - when: - - "ansible_local['openstack_ansible']['keystone']['need_db_migrate'] | bool" - run_once: yes - notify: flush cache - - name: Perform a Keystone DB sync contract command: "{{ keystone_bin }}/keystone-manage db_sync --contract" changed_when: false diff --git a/tasks/keystone_install.yml b/tasks/keystone_install.yml index 18cae5d8..22716a18 100644 --- a/tasks/keystone_install.yml +++ b/tasks/keystone_install.yml @@ -84,9 +84,6 @@ - section: "keystone" option: "need_db_expand" value: "True" - - section: "keystone" - option: "need_db_migrate" - value: "True" - section: "keystone" option: "need_db_contract" value: "True" @@ -134,8 +131,6 @@ with_items: - name: "need_db_expand" state: "True" - - name: "need_db_migrate" - state: "True" - name: "need_db_contract" state: "True" - name: "install_method" @@ -145,7 +140,6 @@ ('openstack_ansible' not in ansible_local) or ('keystone' not in ansible_local['openstack_ansible']) or ('need_db_expand' not in ansible_local['openstack_ansible']['keystone']) or - ('need_db_migrate' not in ansible_local['openstack_ansible']['keystone']) or ('need_db_contract' not in ansible_local['openstack_ansible']['keystone']) - name: Create WSGI symlinks