Remove placement migration code

These tasks were only necessary for migrating placement from nova to a
separate service. Since the stable/stein branch has been cut, it is safe
to remove these migration tasks in master.

Change-Id: I4d477efad7ab6247aaff57d31ee83e137eb3f796
This commit is contained in:
Mark Goddard 2019-04-05 19:40:21 +01:00
parent d93c604d7a
commit 649fdfbaf5
2 changed files with 0 additions and 36 deletions

View File

@ -33,33 +33,5 @@
- database.changed - database.changed
- not use_preconfigured_databases | bool - not use_preconfigured_databases | bool
# TODO(egonzalez): Remove this task once stein is release as will not be required to migrate data.
# Error codes https://github.com/openstack/placement/blob/master/tools/mysql-migrate-db.sh#L230
- name: Migrate placement database
vars:
placement_api: "{{ placement_services['placement-api'] }}"
become: true
kolla_docker:
action: "start_container"
command: bash -c 'sudo -E kolla_set_configs && bash /opt/mysql-migrate-db.sh --migrate /etc/placement/migrate-db.rc'
common_options: "{{ docker_common_options }}"
detach: False
image: "{{ placement_api.image }}"
labels:
BOOTSTRAP:
name: "migrate_placement_database"
restart_policy: "never"
volumes: "{{ placement_api.volumes|reject('equalto', '')|list }}"
register: migrate_placement
changed_when:
- migrate_placement is success
- migrate_placement.rc == 0
failed_when:
- migrate_placement.rc not in [0, 3, 4]
run_once: True
delegate_to: "{{ groups[placement_api.group][0] }}"
when:
- kolla_action == "upgrade"
- include_tasks: bootstrap_service.yml - include_tasks: bootstrap_service.yml
when: database.changed or use_preconfigured_databases | bool when: database.changed or use_preconfigured_databases | bool

View File

@ -5,14 +5,6 @@
- include_tasks: clone.yml - include_tasks: clone.yml
when: placement_dev_mode | bool when: placement_dev_mode | bool
# TODO(mgoddard): Remove this in Train once all old containers have been
# stopped.
- name: "Stopping old placement-api containers"
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "placement_api"
- include_tasks: config.yml - include_tasks: config.yml
- include_tasks: bootstrap.yml - include_tasks: bootstrap.yml