openstack-ansible/playbooks/os-placement-install.yml
Georgina Shippey 41fa313250 Install galera client for placement migration
The placement migration tool interacts directly with the galera database
and needs the client libraries and command line tools in order to do this.
On a metal deploy the placement and database may be co-located so these
libraries are present, but on an LXC deployment they are not available
in the placement container.

During upgrade from stein to train received the error:
"Failed to connect to NOVA_API database", "/openstack/venvs/placement
-20.0.0.0rc2.dev17/lib/python3.6/site-packages/placement_db_tools/
mysql-migrate-db.sh: line 79: mysql: command not found


Change-Id: I85b97d1f503bfbda5a893b9afbf74bd28f732882
2019-11-21 09:49:03 +00:00

56 lines
1.8 KiB
YAML

---
# Copyright 2019, VEXXHOST, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Install placement components
hosts: placement_all
gather_facts: "{{ osa_gather_facts | default(True) }}"
environment: "{{ deployment_environment_variables | default({}) }}"
user: root
vars_files:
- "defaults/repo_packages/openstack_services.yml"
- "defaults/{{ install_method }}_install.yml"
tags:
- placement
pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml
when:
- hostvars['localhost']['resolvconf_enabled'] | bool
- name: Configure package proxy cache
include_tasks: common-tasks/package-cache-proxy.yml
when: install_method == "source"
- name: Stop nova-placement-api services for the upgrade
delegate_to: "{{ item }}"
service:
name: nova-placement-api
state: stopped
enabled: no
when: placement_migrate_flag | default(False)
with_items: "{{ groups['nova_api_placement'] }}"
run_once: true
ignore_errors: true
roles:
- role: "galera_client"
when: placement_migrate_flag | default(False)
- role: "os_placement"
- role: "system_crontab_coordination"
tags:
- crontab